You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martijn Dashorst (JIRA)" <ji...@apache.org> on 2015/08/13 15:08:45 UTC

[jira] [Comment Edited] (WICKET-5960) Page header isn't rendered for pages where URL has changed during render

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

Martijn Dashorst edited comment on WICKET-5960 at 8/13/15 1:07 PM:
-------------------------------------------------------------------

https://github.com/dashorst/wicket-5960

Scenario:
 - have ajax update render a component
 - click on normal submit
 - see background go from gray to white
(and header be empty)



was (Author: dashorst):
https://github.com/dashorst/wicket-5960

> Page header isn't rendered for pages where URL has changed during render
> ------------------------------------------------------------------------
>
>                 Key: WICKET-5960
>                 URL: https://issues.apache.org/jira/browse/WICKET-5960
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 7.0.0
>            Reporter: Martijn Dashorst
>            Assignee: Sven Meier
>             Fix For: 6.21.0, 7.1.0
>
>
> Due to the changes in WICKET-5309, a page is re-rendered when any of the URL segments is modified during the request:
> From WebPageRenderer.java:
> {code}
> 	// the url might have changed after page has been rendered (e.g. the
> 	// stateless flag might have changed because stateful components
> 	// were added)
> 	final Url afterRenderUrl = requestCycle
> 		.mapUrlFor(getRenderPageRequestHandler());
> 	if (beforeRenderUrl.getSegments().equals(afterRenderUrl.getSegments()) == false)
> 	{
> 		// the amount of segments is different - generated relative URLs
> 		// will not work, we need to rerender the page. This can happen
> 		// with IRequestHandlers that produce different URLs with
> 		// different amount of segments for stateless and stateful pages
> 		response = renderPage(afterRenderUrl, requestCycle);
> 	}
> 	if (currentUrl.equals(afterRenderUrl))
> {code}
> The re-render causes the <head> section to be empty because it was already rendered in the first try.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)