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

Andrea Del Bene commented on WICKET-4577:
-----------------------------------------

Is there any way to know if the current request has been triggered by a 
ILinkListener or  by a IFormSubmittingComponent? I mean, it would be nice if we 
were able to not freeze page id if user has explicitly clicked on a link or on 
a button. 
This would solve both WICKET-4286  and the problem with back button. IMHO since 
page versioning's main goal is to support back button, it would make perfect 
sense if we create a new page version when user interacts with page (i.e. when 
she clicks on a link or on a submit button) .
                
> 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