Hi,

it seems your TabbedPanel is rendered as an "auto" component, i.e. it is resolved late during rendering and thus cannot alter its state any more (it tries to initialize the selected tab state).

As a workaround you might try to call setSelectedTab(0).

But this error shouldn't happen - which Wicket version is this?

Regards
Sven


On 11.04.2017 20:25, Sokab wrote:
Hi Sven



Stacktrace

Root cause:

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:3662)
      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:2218)
      at
org.apache.wicket.Component.setDefaultModelObject(Component.java:3121)
      at
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.setSelectedTab(TabbedPanel.java:393)
      at
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:268)
      at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
      at org.apache.wicket.Component.beforeRender(Component.java:1018)
      at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1836)
      at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
      at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
      at org.apache.wicket.Component.beforeRender(Component.java:1018)
      at
org.apache.wicket.Component.internalPrepareForRender(Component.java:2236)
      at org.apache.wicket.Component.render(Component.java:2325)
      at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526)
      at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729)
      at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1704)
      at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1659)
      at
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:517)
      at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:70)
      at
org.apache.wicket.Component.internalRenderComponent(Component.java:2601)
      at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668)
      at
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onRender(Border.java:527)
      at org.apache.wicket.Component.internalRender(Component.java:2401)
      at org.apache.wicket.Component.render(Component.java:2329)
      at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526)
      at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729)
      at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1704)
      at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:799)
      at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:77)
      at
org.apache.wicket.markup.html.panel.BorderMarkupSourcingStrategy.onComponentTagBody(BorderMarkupSourcingStrategy.java:46)
      at
org.apache.wicket.Component.internalRenderComponent(Component.java:2601)
      at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668)
      at org.apache.wicket.Component.internalRender(Component.java:2401)
      at org.apache.wicket.Component.render(Component.java:2329)
      at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526)
      at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729)
      at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1704)
      at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:799)
      at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:77)
      at
org.apache.wicket.markup.html.panel.BorderMarkupSourcingStrategy.onComponentTagBody(BorderMarkupSourcingStrategy.java:46)
      at
org.apache.wicket.Component.internalRenderComponent(Component.java:2601)
      at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668)
      at org.apache.wicket.Component.internalRender(Component.java:2401)
      at org.apache.wicket.Component.render(Component.java:2329)
      at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526)
      at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729)
      at org.apache.wicket.Page.onRender(Page.java:879)
      at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:141)
      at org.apache.wicket.Component.internalRender(Component.java:2401)
      at org.apache.wicket.Component.render(Component.java:2329)
      at org.apache.wicket.Page.renderPage(Page.java:1018)
      at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
      at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:236)
      at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
      at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
      at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
      at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
      at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
      at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
      at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
      at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
      at
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
      at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      at
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
      at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      at
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      at
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      at
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      at
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      at
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      at
io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      at
io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)
      at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)
      at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)
      at
io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
      at
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)
      at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-tabs-does-not-work-properly-tp4677657p4677660.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to