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

IFeedback that is child of IFeedback gets added to the FEEDBACK_LIST too late

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.4.9
    • 1.4.11, 1.5-M2.1
    • wicket
    • None

    Description

      Consider the following scenario:

      • I have a BasePage that I add a feedback panel to. I want it to only render feedback messages that have not been rendered by any other feedback panels
      • I have a feedback border that implements IFeedback, and inside it, I also have a FeedbackPanel. I want the feedback panel to only render the messages pertaining to the components within the border.

      To accomplish this, I put the creation of the feedback panel in the BasePage in onBeforeRender so that my component hierarchy (including the border and it's child feedback panel) is created before I add myself to the hierarchy. By doing this, I expect my page to be the last IFeedback to appear in the feedback list.

      But alas, when Component#beforeRender creates the list of IFeedback components, it effectively stops the traversal of any IFeedback#beforeRender calls because it does not call internalBeforeRender().

      The attached quickstart demonstrates the problem, and the patch fixes it.

      Attachments

        1. WICKET-2974.patch
          2 kB
          Jeremy Thomerson
        2. quickstart.tar.gz
          5 kB
          Jeremy Thomerson

        Activity

          People

            ivaynberg Igor Vaynberg
            jthomerson Jeremy Thomerson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: