Andrea Del Bene created WICKET-4577:
---------------------------------------

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


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