Wicket
  1. Wicket
  2. WICKET-4867

Detach the object before calculating its size

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.2.0, 1.5.9
    • Fix Version/s: 6.3.0, 1.5.10
    • Component/s: wicket
    • Labels:
      None

      Description

      The debug panel in wicket-devutils uses WicketObjects#sizeOf() to calculate
      the size of the page and the session.

      The "problem" that I see is that it calculates the size of the non-detached
      object. I think what really matters is the size after detaching it, because
      this is what is being saved in the http session and the disk, and I guess
      this is what the developer needs to know actually.

        Issue Links

          Activity

          Hide
          Sven Meier added a comment -

          With WICKET-4878 FeedbackPanel is no longer in need of the missing messages.

          Show
          Sven Meier added a comment - With WICKET-4878 FeedbackPanel is no longer in need of the missing messages.
          Hide
          Ernesto Reinaldo Barreiro added a comment -

          Maybe debug bar should be reworked in way that it does't matter where it is "placed". Something on the lines

          1-Via some "listener" call WicketObjects.sizeOf() at the end of the request cycle.
          2-Put resulting size info (some how) on response.
          3-Debug bar reads this info from response (on client).

          Show
          Ernesto Reinaldo Barreiro added a comment - Maybe debug bar should be reworked in way that it does't matter where it is "placed". Something on the lines 1-Via some "listener" call WicketObjects.sizeOf() at the end of the request cycle. 2-Put resulting size info (some how) on response. 3-Debug bar reads this info from response (on client).
          Hide
          Sven Meier added a comment - - edited

          I'm looking at WicketExamplePage->WicketExampleHeader. FormInput adds a Feedback later on.

          We'll have to move <span wicket:id="mainNavigation"/> down in all markups :/.

          Show
          Sven Meier added a comment - - edited I'm looking at WicketExamplePage->WicketExampleHeader. FormInput adds a Feedback later on. We'll have to move <span wicket:id="mainNavigation"/> down in all markups :/.
          Hide
          Martin Grigorov added a comment -

          Is PageSizeDebugPanel rendered before your feedback panel ?
          As discussed in the mail thread any debug panel that uses WicketObjects.sizeOf() should be placed after other components which do something meaningful in their #detach(). In the thread LoadableDetachableModel is used as example but the case is the same.

          Show
          Martin Grigorov added a comment - Is PageSizeDebugPanel rendered before your feedback panel ? As discussed in the mail thread any debug panel that uses WicketObjects.sizeOf() should be placed after other components which do something meaningful in their #detach(). In the thread LoadableDetachableModel is used as example but the case is the same.
          Hide
          Sven Meier added a comment -

          A detached component loses all rendered FeedbackMassages. Note that FeedbackMessages are marked rendered in FeedbackPanel$MessageListView#polpulateItem() already. During rendering the access to the FeedbackMessage fails because it is already removed.

          Show
          Sven Meier added a comment - A detached component loses all rendered FeedbackMassages. Note that FeedbackMessages are marked rendered in FeedbackPanel$MessageListView#polpulateItem() already. During rendering the access to the FeedbackMessage fails because it is already removed.
          Hide
          Sven Meier added a comment -

          This breaks FeedbackMessages when PageSizeDebugPanel calculates component sizes.

          Show
          Sven Meier added a comment - This breaks FeedbackMessages when PageSizeDebugPanel calculates component sizes.

            People

            • Assignee:
              Martin Grigorov
              Reporter:
              Martin Grigorov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development