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

Changing model object of Panel added to a Border not allowed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 7.5.0, 7.6.0
    • 7.7.0, 8.0.0-M4
    • wicket
    • None

    Description

      It is not allowed to change the model object of a panel added to a border component (see attachment).
      The quickstart demonstrates the problem. Here you can find 3 test pages all with a TextField and a Panel with a TextField. For each component, the model object is set at the onConfigure method. At the first page both components are added to the page itself. At the second page both components are added to the border body container of a Border component. At the third page both components are added to a "Layout" container (a Border component too). The third page is not rendered with Wicket 7.5.0 (see stacktrace).
      It was working for Wicket 7.4.0

      org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy after render phase has started (page version cant change then anymore)
      at org.apache.wicket.Component.checkHierarchyChange(Component.java:3674)
      at org.apache.wicket.Page.dirty(Page.java:271)
      at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:332)
      at org.apache.wicket.Page.dirty(Page.java:250)
      at org.apache.wicket.Page.componentModelChanging(Page.java:904)
      at org.apache.wicket.Component.modelChanging(Component.java:2230)
      at org.apache.wicket.Component.setDefaultModelObject(Component.java:3133)
      at org.apache.wicket.markup.html.form.FormComponent.setModelObject(FormComponent.java:1579)
      at com.mycompany.front.wicket.components.TestPanel.onConfigure(TestPanel.java:30)

      Attachments

        1. testproject.zip
          45 kB
          Dirk Forchel

        Issue Links

          Activity

            People

              bitstorm Andrea Del Bene
              forchel Dirk Forchel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: