禁用整體形成時,我有這種形式在檢票,其具有當與一定的作用的用戶在將被記錄到被禁用。異常在檢票
在我檢查角色的onConfigure()方法,和如果它是不允許更改任何一個我禁用表:
getForm().setEnabled(!isSponsor());
但後來,我得到這個錯誤:
org.apache.wicket.markup.MarkupException: file:/bla/bla/bla/Panel.html: Component [printButton] (path = [1:work:child:bla:7:bla:fieldContainer:field:modal:content:form:Panel:printButton]) must be applied to a tag of type [button,input,a], not: '<span wicket:id="printButton" id="printButtonb3">' (line 0, column 0)
at de.agilecoders.wicket.core.util.Components.createMarkupException(Components.java:96) ~[wicket-bootstrap-core-0.8.4.jar:?]
at de.agilecoders.wicket.core.util.Components.assertTag(Components.java:80) ~[wicket-bootstrap-core-0.8.4.jar:?]
at de.agilecoders.wicket.core.util.Components.assertTag(Components.java:65) ~[wicket-bootstrap-core-0.8.4.jar:?]
at de.agilecoders.wicket.core.markup.html.bootstrap.button.ButtonBehavior.onComponentTag(ButtonBehavior.java:134) ~[wicket-bootstrap-core-0.8.4.jar:?]
at org.apache.wicket.Component.renderComponentTag(Component.java:3970) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRenderComponent(Component.java:2540) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRender(Component.java:2379) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.render(Component.java:2307) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:689) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:76) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:112) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRenderComponent(Component.java:2549) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRender(Component.java:2379) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.render(Component.java:2307) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1484) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRenderComponent(Component.java:2549) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRender(Component.java:2379) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.render(Component.java:2307) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1484) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRenderComponent(Component.java:2549) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRender(Component.java:2379) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.render(Component.java:2307) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1484) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1683) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRenderComponent(Component.java:2549) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRender(Component.java:2379) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.render(Component.java:2307) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:689) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:76) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:112) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRenderComponent(Component.java:2549) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRender(Component.java:2379) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.render(Component.java:2307) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:689) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:76) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:112) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRenderComponent(Component.java:2549) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.internalRender(Component.java:2379) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.Component.render(Component.java:2307) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.ajax.XmlAjaxResponse.writeComponent(XmlAjaxResponse.java:127) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.ajax.AbstractAjaxResponse.writeComponents(AbstractAjaxResponse.java:213) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.ajax.AbstractAjaxResponse.writeTo(AbstractAjaxResponse.java:145) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:363) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861) ~[wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) ~[wicket-request-6.9.0.jar:6.9.0]
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:97) ~[wicket-request-6.9.0.jar:6.9.0]
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261) [wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218) [wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289) [wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) [wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) [wicket-core-6.9.0.jar:6.9.0]
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137) [wicket-core-6.9.0.jar:6.9.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [servlet-api-2.5-20081211.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [servlet-api-2.5-20081211.jar:?]
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148) [jetty-6.1.15.jar:6.1.15]
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:180) [spring-orm-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1139) [jetty-6.1.15.jar:6.1.15]
at org.apache.logging.log4j.core.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:66) [log4j-core-2.0-beta9.jar:2.0-beta9]
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1139) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:378) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.Server.handle(Server.java:324) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) [jetty-6.1.15.jar:6.1.15]
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) [jetty-util-6.1.15.jar:6.1.15]
2014-10-27 12:22:10,627 WARN [[email protected] RequestCycleExtra] ********************************
2014-10-27 12:22:10,627 ERROR [[email protected] DefaultExceptionMapper] Unexpected error occurred
但在標記我有這樣的:
<a wicket:id="printButton">Print View</a>
而在java文件printButton中是BootstrapAjaxLink
。
如果我刪除禁用的形式,則是一切OK行...
從歷史上看,Wicket的鏈接在禁用時將標記更改爲跨度,這將在Wicket 7中更改(請參閱WICKET-4904)。請注意,它是投訴標籤名稱的wicket-bootstrap。 – svenmeier 2014-10-27 13:30:11