[ 
https://issues.apache.org/jira/browse/WICKET-4577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288071#comment-13288071
 ] 

Martin Grigorov commented on WICKET-4577:
-----------------------------------------

With the fix in WICKET-4286 Wicket do not increase the page id during the 
rendering of the page.
If the click of a link or submit of a form does some change (component added, 
removed, model changed, etc.) of the page hierarchy then this will increase the 
page id during the "action" processing phase and all should be fine.
                
> Page version not incremented modifying page components hierarchy
> ----------------------------------------------------------------
>
>                 Key: WICKET-4577
>                 URL: https://issues.apache.org/jira/browse/WICKET-4577
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5.6
>            Reporter: Andrea Del Bene
>         Attachments: LifeCycleStages.zip
>
>
> Starting from version 1.5.6 I started to notice a strange behavior with page 
> versions management. Let's consider a simple page that displays alternatively 
> two labels each time is rendered:
> public HomePage(){
>               firstLabel = new Label("label", "First label");
>               secondLabel = new Label("label", "Second label");
>               
>               add(firstLabel);
>               add(new Link("reload"){
>                       @Override
>                       public void onClick() {                         
>                       }
>               });
>                       
>       }
>       
>       @Override
>       protected void onBeforeRender() {
>               super.onBeforeRender();
>               if(contains(firstLabel, true))
>                       replace(secondLabel);
>               else
>                       replace(firstLabel);
>                                       
>       }
> Until Wicket 1.5.5 the page id is incremented each time I reload the page, 
> and this is the expected behavior. But with Wicket 1.5.6 this doesn't happen 
> anymore and the version id remains unchanged when I reload the page. This 
> breaks back button support and I doesn't seem correct since we should obtain 
> a new page version when we change page components hierarchy.
> Quickstart attached.  

--
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

        

Reply via email to