我想使用 inlinframe 显示弹出预览打印页面,这是我的问题:
爪哇:
Form form = new Form("form");
form.setOutputMarkupId(true);
form.add(new AjaxSubmitLink("test") {
@Override
protected void onSubmit(AjaxRequestTarget art, Form<?> form) {
containerPrint.add(/*another inlineframe*/)
art.addComponent(containerPrint);
}
});
add(form);
html:
<form wicket:id="form">
<input type="button" wicket:id="test"></input>
</form>
<div wicket:id="page" style="width: 0px;height: 0px">
<iframe wicket:id="printPage" width="0px" height="0px">
</iframe>
</div>
我想通过单击测试按钮将 inlineiframe 替换为另一个 inlineiframe 但通过单击按钮我得到了这个问题
WicketMessage: org.apache.wicket.WicketRuntimeException: component form:panel:panel:panel:mcGridViewInfo:GridViewInfo:form:<b>test not found on page</b> ir.mersad.ui.authenticationAndAuthorization.Office[id = 1], listener interface = [RequestListenerInterface name=IActivePageBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
Root cause:
org.apache.wicket.WicketRuntimeException: component form:panel:panel:panel:mcGridViewInfo:GridViewInfo:form:test not found on page ir.mersad.ui.authenticationAndAuthorization.Office[id = 1], listener interface = [RequestListenerInterface name=IActivePageBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:427)
at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:472)
at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1339)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Complete stack:
org.apache.wicket.protocol.http.request.InvalidUrlException: org.apache.wicket.WicketRuntimeException: component form:panel:panel:panel:mcGridViewInfo:GridViewInfo:form:test not found on page ir.mersad.ui.authenticationAndAuthorization.Office[id = 1], listener interface = [RequestListenerInterface name=IActivePageBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1339)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
我已经知道问题出在:
container.add(new InlineFrame("printPage", new EmptyPage()));
当我用标签替换它时导致它工作正常但我不知道是什么问题