need to distinguish between statechange and hierarchychange
-----------------------------------------------------------

                 Key: WICKET-776
                 URL: https://issues.apache.org/jira/browse/WICKET-776
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.3.0-beta2, 1.2.6
            Reporter: Igor Vaynberg
             Fix For: 1.4.0-alpha


currently we do not distinguish between state changes that result in hierarchy 
change and those that do not. this causes problems for versioning because it is 
impossible to version fields during render phase. for example:

abstractpageableview.getcurrentpage() is called during render to determine the 
current page, but inside it also has the ability to trim the returned page 
against getpagecount() - so sometimes it is necessary to set currentpage to 
some value during render phase. however, we cannot do so AND make the change 
versioned because it will result in:

 org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy 
during render phase
               at 
org.apache.wicket.Component.checkHierarchyChange(Component.java:2885)
               at 
org.apache.wicket.Component.addStateChange(Component.java:2817)
               at 
org.apache.wicket.markup.repeater.AbstractPageableView.setCurrentPage(AbstractPageableView.java:273)
               at 
org.apache.wicket.markup.repeater.AbstractPageableView.getCurrentPage(AbstractPageableView.java:251)
 

i am temporarily removing versioning during this usecase in 
abstractpageableview.getcurrentpage() until we fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to