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:04:24 UTC

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

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

        

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

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
     [ 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

        

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

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
    [ 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

        

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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13285610#comment-13285610 ] 

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

This is related to the ticket about ListView modifying the page id.
See WICKET-4286 and c21b5cb8b55bc5118cdb8ea35baa0af88b0d4543
                
> 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

        

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

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288410#comment-13288410 ] 

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

Ok, so I guess we can close this issue :)
                
> 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

        

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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4577.
-------------------------------------

    Resolution: Not A Problem
    
> 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

        

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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ 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