Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0.0-beta2
    • Fix Version/s: 6.0.0
    • Component/s: wicket-extensions
    • Labels:
      None

      Description

      TabbedPanel should obey changes in its model, so it could be bound bi-directional to use objects.

      1. WICKET-4593.patch
        3 kB
        Martin Grigorov

        Issue Links

          Activity

          Hide
          Martin Grigorov added a comment - - edited

          Hi Sven,

          With bf96810d00d0eb916a0425dc413afef6f2fb5b57 you added a call to #updateTab() in TabbedPanel#onBeforeRender().
          This causes a call to ITab#getPanel() at line 427 for each render of the TabbedPanel and thus re-creates the panel for the selected tab and looses the state I may have in the previous panel instance.

          I believe this is a bug.
          It is easy to reproduce with Wicket Examples - http://localhost:8080/ajax/tabbed-panel. Click on a tab and you will see that ITab#getPanel() is called twice - once by setSelectedTab() and once by onBeforeRender(). The real problem is when the TabbedPanel itself is repainted, then onBeforeRender() reconstructs the selected tab's panel.

          Show
          Martin Grigorov added a comment - - edited Hi Sven, With bf96810d00d0eb916a0425dc413afef6f2fb5b57 you added a call to #updateTab() in TabbedPanel#onBeforeRender(). This causes a call to ITab#getPanel() at line 427 for each render of the TabbedPanel and thus re-creates the panel for the selected tab and looses the state I may have in the previous panel instance. I believe this is a bug. It is easy to reproduce with Wicket Examples - http://localhost:8080/ajax/tabbed-panel . Click on a tab and you will see that ITab#getPanel() is called twice - once by setSelectedTab() and once by onBeforeRender(). The real problem is when the TabbedPanel itself is repainted, then onBeforeRender() reconstructs the selected tab's panel.
          Hide
          Martin Grigorov added a comment -

          Here is a patch that partially reverts your change and allows me to continue my work.
          Please review.

          Show
          Martin Grigorov added a comment - Here is a patch that partially reverts your change and allows me to continue my work. Please review.
          Hide
          Sven Meier added a comment -

          So in the examples Tab#getPanel() returns a new instance on each invocation? I haven't though of that.

          I'll check asap.

          Show
          Sven Meier added a comment - So in the examples Tab#getPanel() returns a new instance on each invocation? I haven't though of that. I'll check asap.

            People

            • Assignee:
              Sven Meier
              Reporter:
              Sven Meier
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development