iirc, onBeforeRender must always call super.onBeforeRender.

so put super.onBeforeRender on the first line

ckuehne a écrit :
I have the following use case:
I go from Page A to Page B passing an instance of A as return page to B. In
B I click a link which brings me back to the (cached(?)) instance of A. In
the onBeforeRender-method of a child component of A I want to redirect if
some condition is
                protected void onBeforeRender() {
                        if(condition){
                                throw new 
RestartResponseException(RedirectPage.class);
                        }
                        super.onBeforeRender();
                }

This fails with the following:
WicketMessage: Error attaching this container for rendering:
[MarkupContainer [Component id = tabs]]

Root cause:

org.apache.wicket.RestartResponseException

Complete stack:

org.apache.wicket.WicketRuntimeException: Error attaching this container for
rendering: [MarkupContainer [Component id = tabs]]
     at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1601)
     at org.apache.wicket.Component.onBeforeRender(Component.java:3682)
     at
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:205)
     at org.apache.wicket.Component.internalBeforeRender(Component.java:1002

I use wicket 1.3.5





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to