You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Andrea Del Bene (JIRA)" <ji...@apache.org> on 2012/05/30 14:06:23 UTC

[jira] [Updated] (WICKET-4577) Page version not incremented modifying page components hierarchy

     [ https://issues.apache.org/jira/browse/WICKET-4577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Del Bene updated WICKET-4577:
------------------------------------

    Attachment: LifeCycleStages.zip
    
> 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