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

Changes in WicketObjects.sizeof(final Serializable object) clashes with <header-contribution> in AjaxResponse



    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.3.0, 6.4.0, 6.5.0
    • 6.6.0, 1.5.10
    • wicket, wicket-devutils
    • None


      I am currently developing on a RIA with wicket. Therefore 90 % of our request are Ajax-based.

      In my development process I start the application with the development configuration and I like to display the DebugBar in our page. I implemented an AjaxRequestTargetListener that adds the DebugBar to the AjaxRequestTarget each time an ajax call is done. This AjaxRequestTargetListener is added and initialized in the Application as follows:

      getAjaxRequestTargetListeners().add(new AjaxUpdateRequestTargetListener())

      This configuration worked fine for every wicket version until 6.3.0. Then I got problems with the XMLAjaxResponse. The "header-contribution"-XML Element does not get rendered in the AjaxResponse anymore and the corresponding HeaderItems of the ajax-updated components do not get rendered into the page.

      After some debugging I found out, that the problem is connected with the "WicketObjects.sizeof" method change in version 6.3.0:
      The method is called in the PageSizeDebugBarPanel for the whole page. That is why the onDetach method is called on every component of the page. Also the onDetach method is called on the HtmlHeaderContainer where the HeaderResponse gets resetted to 'null'. So every HeaderItem added to the HeaderResponse so far gets lost and no "header-contribution" XML-Element is rendered to the AjaxResponse.

      To understand this problem a little bit easier, I will add a quickstart example to this issue.


        1. wicket-quickstart.zip
          21 kB
          Christian Wellekötter

        Issue Links



              mgrigorov Martin Tzvetanov Grigorov
              cwellekoetter Christian Wellekötter
              0 Vote for this issue
              4 Start watching this issue