Hi all,

My wicket app is coming along very nicely, however I have another ajax
problem with switching components in an ajax call.  here's a simple example:

- I have a page consisting of Panel A. Panel A has a custom component which
is a graphical scrollling list.  It has custom behavior I wrote which
refreshes the list with new images every few seconds.

- I have a button to switch out Panel A to Panel B using Ajax. If I click
it, then whilst the request is in progress,  Panel A's custom component
fires its ajax, the request appears to get buffered as my debug window says
' Channel busy - postponing'.  Then when the first request returns (having
swapped out Panel A for B) the postponed request fires.  When it hits the
server I get an error message (correctly) stating that the behavior couldn't
be found.   The error and full stack trace is shown below.  I don't mind
that the second ajax request is being sent but I really need some way of
telling Wicket (or getting wicket to understand) that a previous ajax
request changed my page and to just ignore this request if its behavior
doesn't exist, rather than throw up a nasty exception.

Any ideas on ways I could fix this problem?
Thanks,
Dean

Full error and trace:


WicketMessage: component mainPage:current_tab:current_tab:userinfolist not
found on page jumbuck.ffweb.wicket.page.FFWeb[id = 0], listener interface =
[RequestListenerInterface name=IBehaviorListener, method=public abstract
void org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Root cause:

org.apache.wicket.WicketRuntimeException: component
mainPage:current_tab:current_tab:userinfolist not found on page
jumbuck.ffweb.wicket.page.FFWeb[id = 0], listener interface =
[RequestListenerInterface name=IBehaviorListener, method=public abstract
void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:136)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1067)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1153)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:251)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:125)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)


-- 
View this message in context: 
http://www.nabble.com/More-Ajax-woes-with-behaviors-and-component-replacing..-tf3832524.html#a10850261
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to