I am shooting in the dark but I thought I would post the error I am
getting.
 
I get this error.  "Cannot modify component hierarchy after render phase
has started".  The full stack trace is at the bottom of this post.
 
During the form submission process (user clicks on link) then I get the
error above but ONLY when I have a dynamic component with
isTransparentResolver = true.
 
If I restructure my hierarchy such that transparentResolver is false
then I don't get the same error.   Why do you think I get the error?
 
...
 final WebMarkupContainer container = new WebMarkupContainer(
"container" ) {            
           public boolean isTransparentResolver() {
               return false; // true causes error
           }
            @Override
            public boolean isVisible() {
                return logic();               
            }            
        };
 
Cannot modify component hierarchy after render phase has started (page
version cant change then anymore)
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:3598)
 at org.apache.wicket.Component.modelChanging(Component.java:2260)
 at
org.apache.wicket.Component.setDefaultModelObject(Component.java:3124)
 at
org.apache.wicket.markup.html.form.FormComponent.updateModel(FormCompone
nt.java:1168)
 at
org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component
(Form.java:229)
 at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrde
rHelper(FormComponent.java:514)
 at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrde
rHelper(FormComponent.java:493)
 at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrde
r(FormComponent.java:465)
 at
org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModel
s(Form.java:2110)
 at
org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.j
ava:2078)
 at org.apache.wicket.markup.html.form.Form.process(Form.java:1028)
 at org.apache.wicket.markup.html.form.Form.process(Form.java:955)
 at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:920)
 at
org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
177)
 at
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDef
aultAjaxBehavior.java:300)
 at
org.apache.wicket.request.target.component.listener.BehaviorRequestTarge
t.processEvents(BehaviorRequestTarget.java:142)
 at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Ab
stractRequestCycleProcessor.java:92)
 at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:1250)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484
)
 at
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:
160)

Reply via email to