You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Dirk Forchel (JIRA)" <ji...@apache.org> on 2017/01/16 07:52:26 UTC

[jira] [Created] (WICKET-6306) Changing model object of Panel added to a Border not allowed

Dirk Forchel created WICKET-6306:
------------------------------------

             Summary: Changing model object of Panel added to a Border not allowed
                 Key: WICKET-6306
                 URL: https://issues.apache.org/jira/browse/WICKET-6306
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 7.6.0, 7.5.0
            Reporter: Dirk Forchel
         Attachments: testproject.zip

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)




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)