我将我的应用程序从 Wicket 6.x 升级到 Wicket 8.x,并将Button和AjaxButton类替换为IndicatingAjaxButton类。单击提交按钮链接时出现以下错误。
IndicatingAjaxButton btnSubmit = new IndicatingAjaxButton("submit") {
private static final long serialVersionUID = 1L;
@SuppressWarnings("rawtypes")
@Override
protected void onSubmit(AjaxRequestTarget target) {
AjaxLazyLoadPanel panel = new AjaxLazyLoadPanel("cnt2") {
private static final long serialVersionUID = 1L;
@Override
public Component getLazyLoadComponent(String markupId) {
try {
return new ContractClassPanel(markupId, null, getIdentifier(), getTimelines());
} catch (ContractException e) {
throw new RuntimeException("", e);
}
}
};
panel.setOutputMarkupId(true);
form.setVisible(false);
AbstractContractsClassPage.this.replace(panel);
target.focusComponent(AbstractContractsClassPage.this);
}
@Override
protected void onError(AjaxRequestTarget target) {
super.onError();
}
};
错误 | 发生异常:org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException:行为拒绝接口调用。组件:[AjaxButton [Component id = submit]] 行为:org.apache.wicket.ajax.markup.html.form.AjaxButton$1@591549f6 at org.apache.wicket.core.request.handler.ListenerRequestHandler.invoke(ListenerRequestHandler. java:276) 在 org.apache.wicket.core.request.handler.ListenerRequestHandler.invokeListener(ListenerRequestHandler.java:222) 在 org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:208)在 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:914) 在 org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:65) 在 org.apache.wicket.request .cycle.RequestCycle.execute(RequestCycle.java: