You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sebastian Gooren (Created) (JIRA)" <ji...@apache.org> on 2012/03/25 17:53:27 UTC

[jira] [Created] (WICKET-4468) Stateful components which are invisible force page to be stateful

Stateful components which are invisible force page to be stateful
-----------------------------------------------------------------

                 Key: WICKET-4468
                 URL: https://issues.apache.org/jira/browse/WICKET-4468
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.5.5
            Reporter: Sebastian Gooren
            Priority: Minor


Stateful components which are not rendered (setVisible(false)) force the page to be stateful.

Page#isPageStateless() visits all components to check Component#isStateless(), whether they are visible or not.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WICKET-4468) Stateful components which are invisible force page to be stateful

Posted by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4468.
-------------------------------------

    Resolution: Fixed

I applied the patch.

I'll experiment soon with another approach whether a page is stateless based on the generation of a callback url to that page. If there is at least one callback url to a page then it is stateful. It will be tracked in a different ticket.

The last patch will stay even if the new approach works because it is a good optimization.
                
> Stateful components which are invisible force page to be stateful
> -----------------------------------------------------------------
>
>                 Key: WICKET-4468
>                 URL: https://issues.apache.org/jira/browse/WICKET-4468
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.5
>            Reporter: Sebastian Gooren
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 1.5.6, 6.0.0-RC1
>
>         Attachments: WICKET-4468.patch
>
>
> Stateful components which are not rendered (setVisible(false)) force the page to be stateful.
> Page#isPageStateless() visits all components to check Component#isStateless(), whether they are visible or not.
> Please change this so invisible components no longer force a page to be stateful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4468) Stateful components which are invisible force page to be stateful

Posted by "Sebastian Gooren (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastian Gooren updated WICKET-4468:
-------------------------------------

    Description: 
Stateful components which are not rendered (setVisible(false)) force the page to be stateful.

Page#isPageStateless() visits all components to check Component#isStateless(), whether they are visible or not.

Please change this so invisible components no longer force a page to be stateful.

  was:
Stateful components which are not rendered (setVisible(false)) force the page to be stateful.

Page#isPageStateless() visits all components to check Component#isStateless(), whether they are visible or not.

    
> Stateful components which are invisible force page to be stateful
> -----------------------------------------------------------------
>
>                 Key: WICKET-4468
>                 URL: https://issues.apache.org/jira/browse/WICKET-4468
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.5
>            Reporter: Sebastian Gooren
>            Priority: Minor
>
> Stateful components which are not rendered (setVisible(false)) force the page to be stateful.
> Page#isPageStateless() visits all components to check Component#isStateless(), whether they are visible or not.
> Please change this so invisible components no longer force a page to be stateful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4468) Stateful components which are invisible force page to be stateful

Posted by "Martin Grigorov (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-4468:
------------------------------------

    Attachment: WICKET-4468.patch

Here is a simple patch that doesn't check whether a page is  stateless before touching it because the page itself comes from the store, so there is a session already.
                
> Stateful components which are invisible force page to be stateful
> -----------------------------------------------------------------
>
>                 Key: WICKET-4468
>                 URL: https://issues.apache.org/jira/browse/WICKET-4468
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.5
>            Reporter: Sebastian Gooren
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 1.5.6, 6.0.0-RC1
>
>         Attachments: WICKET-4468.patch
>
>
> Stateful components which are not rendered (setVisible(false)) force the page to be stateful.
> Page#isPageStateless() visits all components to check Component#isStateless(), whether they are visible or not.
> Please change this so invisible components no longer force a page to be stateful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WICKET-4468) Stateful components which are invisible force page to be stateful

Posted by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4468.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.0.0-RC1
                   1.5.6
         Assignee: Martin Grigorov
    
> Stateful components which are invisible force page to be stateful
> -----------------------------------------------------------------
>
>                 Key: WICKET-4468
>                 URL: https://issues.apache.org/jira/browse/WICKET-4468
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.5
>            Reporter: Sebastian Gooren
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 1.5.6, 6.0.0-RC1
>
>
> Stateful components which are not rendered (setVisible(false)) force the page to be stateful.
> Page#isPageStateless() visits all components to check Component#isStateless(), whether they are visible or not.
> Please change this so invisible components no longer force a page to be stateful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4468) Stateful components which are invisible force page to be stateful

Posted by "Igor Vaynberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238551#comment-13238551 ] 

Igor Vaynberg commented on WICKET-4468:
---------------------------------------

fix for this breaks wicket-cdi.

imagine a component that is visible only if the user is logged in. to do this it overrides onconfigure() { setvisible(logins.getcurrentuser()!=null); }

where logins is a cdi bean.

Page#isPageStateless() is called as soon as the page is pulled from the page store, which means now onconfigure() is called when wicket cdi retrieves the page instance and before it is able to figure out what conversation to wrap the page in.

{code}
org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.ConversationScoped
        at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:664)
        at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:77)
        at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:124)
        at xxx.dao.UserLogManager.findLoggedInUser(UserLogManager.java:122)
        at xxx.security.WeldUserFactories.getLoggedInUser(WeldUserFactories.java:67)
        at xxx.security.WeldUserFactories.getLoggedInAdmin(WeldUserFactories.java:226)
        at xxx.security.WeldUserFactories.getCurrentUser(WeldUserFactories.java:239)
        at xxx.lms.frontend.template.FrontEndTemplate$LogoutLink.isVisible(FrontEndTemplate.java:725)
        at org.apache.wicket.Component.determineVisibility(Component.java:4381)
        at org.apache.wicket.Component.isVisibleInHierarchy(Component.java:2160)
        at org.apache.wicket.Component.isStateless(Component.java:2081)
        at org.apache.wicket.Page$2.component(Page.java:503)
        at org.apache.wicket.Page$2.component(Page.java:500)
        at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:143)
        at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:161)
        at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:122)
        at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:866)
        at org.apache.wicket.Page.isPageStateless(Page.java:498)
        at org.apache.wicket.page.AbstractPageManager.touchPage(AbstractPageManager.java:123)
        at org.apache.wicket.page.AbstractPageManager.getPage(AbstractPageManager.java:105)
        at org.apache.wicket.page.PageManagerDecorator.getPage(PageManagerDecorator.java:50)
        at org.apache.wicket.page.PageAccessSynchronizer$2.getPage(PageAccessSynchronizer.java:257)
        at org.apache.wicket.DefaultMapperContext.getPageInstance(DefaultMapperContext.java:117)
        at org.apache.wicket.request.handler.PageProvider.getStoredPage(PageProvider.java:292)
        at org.apache.wicket.request.handler.PageProvider.hasPageInstance(PageProvider.java:380)
        at org.apache.wicket.request.handler.RenderPageRequestHandler.isPageInstanceCreated(RenderPageRequestHandler.java:181)
        at net.ftlines.wicket.cdi.ConversationPropagator.getPage(ConversationPropagator.java:261)
        at net.ftlines.wicket.cdi.ConversationPropagator.onRequestHandlerResolved(ConversationPropagator.java:111)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:145)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:142)
        at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onRequestHandlerResolved(RequestCycleListenerCollection.java:141)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:145)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:142)
        at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onRequestHandlerResolved(RequestCycleListenerCollection.java:141)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:145)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:142)
        at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onRequestHandlerResolved(RequestCycleListenerCollection.java:141)
        at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)
        at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
        at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
        at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:185)
        at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:241)
{code}

                
> Stateful components which are invisible force page to be stateful
> -----------------------------------------------------------------
>
>                 Key: WICKET-4468
>                 URL: https://issues.apache.org/jira/browse/WICKET-4468
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.5
>            Reporter: Sebastian Gooren
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 1.5.6, 6.0.0-RC1
>
>
> Stateful components which are not rendered (setVisible(false)) force the page to be stateful.
> Page#isPageStateless() visits all components to check Component#isStateless(), whether they are visible or not.
> Please change this so invisible components no longer force a page to be stateful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (WICKET-4468) Stateful components which are invisible force page to be stateful

Posted by "Igor Vaynberg (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reopened WICKET-4468:
-----------------------------------

    
> Stateful components which are invisible force page to be stateful
> -----------------------------------------------------------------
>
>                 Key: WICKET-4468
>                 URL: https://issues.apache.org/jira/browse/WICKET-4468
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.5
>            Reporter: Sebastian Gooren
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 1.5.6, 6.0.0-RC1
>
>
> Stateful components which are not rendered (setVisible(false)) force the page to be stateful.
> Page#isPageStateless() visits all components to check Component#isStateless(), whether they are visible or not.
> Please change this so invisible components no longer force a page to be stateful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4468) Stateful components which are invisible force page to be stateful

Posted by "Igor Vaynberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238595#comment-13238595 ] 

Igor Vaynberg commented on WICKET-4468:
---------------------------------------

will probably need a unit test as well to make sure we dont break this in the future
                
> Stateful components which are invisible force page to be stateful
> -----------------------------------------------------------------
>
>                 Key: WICKET-4468
>                 URL: https://issues.apache.org/jira/browse/WICKET-4468
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.5
>            Reporter: Sebastian Gooren
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 1.5.6, 6.0.0-RC1
>
>         Attachments: WICKET-4468.patch
>
>
> Stateful components which are not rendered (setVisible(false)) force the page to be stateful.
> Page#isPageStateless() visits all components to check Component#isStateless(), whether they are visible or not.
> Please change this so invisible components no longer force a page to be stateful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira