Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5960

Page header isn't rendered for pages where URL has changed during render

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 7.0.0
    • 6.21.0, 7.1.0
    • wicket
    • None

    Description

      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:

      	// 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))
      

      The re-render causes the <head> section to be empty because it was already rendered in the first try.

      Attachments

        Activity

          People

            svenmeier Sven Meier
            dashorst Martijn Dashorst
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: