Hi,
the request comes in when the component is already/again invisible on
the server.
Try adding the behavior higher up in the component hierarchy with
AjaxRequestAttributes#childSelector.
Sven
On 07/29/2014 04:12 PM, Lorne Malvo wrote:
I'm getting an intermittent ListenerInvocationNotAllowedException when using
an AjaxEventBehaviors.
(stacktrace below)
This is my code:
----------------------------
WebMarkupContainer con = new WebMarkupContainer( "container" ) {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible( someFlag);
}
};
con.setOutputMarkupId( true );
con.setOutputMarkupPlaceholderTag( true );
con.add( new AjaxEventBehavior( "onmouseover" ) {
@Override
protected void onEvent(AjaxRequestTarget target) {
someFlag = true;
target.add( someLargerContainerComponent );
}
} );
---------------------
In the same panel, I have a second container with a second AjaxEventBehavior
attached. The code is the same as above, except that the behavior uses the
"onmouseout" event and the someFlag logic is reversed. The idea is that a
visible <div> is swapped out for another <div> on mouseover, and then the
swap is reversed on mouseout.
This works fine - except sometimes it doesn't. I would say the exception
occurs in about 1 out of 40 mouseovers/mouseouts. I can't discern a pattern.
I've tested this in FF and Chrome on Windows and the problem occurs in both
browsers.
I did read
https://issues.apache.org/jira/browse/WICKET-5603
which seems to suggest that this problem has been fixed - but I guess it
hasn't. I'm using Wicket 6.16.0.
(the workaround suggested in the jira comments doesn't apply to me since my
behaviors are not attached to form components)
Any suggestions on how to catch this exception or for another workaround?
Thanks!
29 Jul 2014 15:44:21,930 WARN RequestCycleExtra 342:
********************************
29 Jul 2014 15:44:21,932 WARN RequestCycleExtra 343: Handling the following
exception
org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException:
Behavior rejected interface invocation. Component: [WebMarkupContainer
[Component id = myComponentId]] Behavior:
com.myDomain.web.myPanel$2@293d7910 Listener: [RequestListenerInterface
name=IBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:237)
at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
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:240)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
29 Jul 2014 15:44:21,933 WARN RequestCycleExtra 344:
********************************
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Getting-intermittent-ListenerInvocationNotAllowedException-with-AjaxEventBehavior-tp4666782.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]