google-code-export / wiquery

Automatically exported from code.google.com/p/wiquery
MIT License
1 stars 1 forks source link

WicketRuntimeException: component not found on page #145

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, 

I have the same issue which is discussed in the following link: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-component-not-
found-on-page-td3055902.html 

I made a quickstart to reproduce it. Any idea on how to workaround this 
behavior? 
I'm using wicket 1.4.12, wiquery 1.1.2, and wiquery-plugin for tooltip 
(other-plugins-1.1.jar). 

How to reproduce: 

When clicking the paging navigator, quickly move the mouse to the table region. 
Then sometimes following error messages are shown: 

ERROR - RequestCycle - 
org.apache.wicket.WicketRuntimeException: component 
tabs:container:user:2 not found on page gvc.web.webpages.TestPage[id = 4], 
listener interface = [RequestListenerInterface 
name=IActivePageBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()] 
org.apache.wicket.protocol.http.request.InvalidUrlException: 
org.apache.wicket.WicketRuntimeException: component 
tabs:container:user:2 not found on page gvc.web.webpages.TestPage[id = 4], 
listener interface = [RequestListenerInterface 
name=IActivePageBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()] 
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycle
Processor.java:262) 
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) 
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) 
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) 
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484) 
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) 
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:527) 
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1216) 
at 
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInter
nal(OpenSessionInViewFilter.java:198) 
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76) 
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1187) 
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:421) 
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) 
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:493) 
at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225
) 
at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:930
) 
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:358) 
at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)

at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:866)

at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) 
at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerC
ollection.java:245) 
at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java
:126) 
at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) 
at org.eclipse.jetty.server.Server.handle(Server.java:351) 
at 
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:594) 
at 
org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnec
tion.java:1041) 
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:549) 
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:211) 
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:424) 
at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:48
9) 
at 
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) 
at java.lang.Thread.run(Thread.java:619) 
Caused by: org.apache.wicket.WicketRuntimeException: component 
tabs:container:user:2 not found on page gvc.web.webpages.TestPage[id = 4], 
listener interface = [RequestListenerInterface 
name=IActivePageBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()] 
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterface
Target(AbstractRequestCycleProcessor.java:426) 
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(Abst
ractRequestCycleProcessor.java:471) 
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycle
Processor.java:144) 
... 33 more 

Original issue reported on code.google.com by Takeo.Ho...@gmail.com on 11 Dec 2010 at 6:03

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

wiquery-plugins is a different project. Please, if you have issues for it file 
them at 

http://code.google.com/p/wiquery-plugins/issues/list

Will try to look to your quick-start today. But I think you might be doing 
something wrong as I'm using the same component to implement different 
functionality on one of our applications (e.g.  master-detail on tables, 
tooltips for form fields, and son on) and I haven't found such problems.   

Ernesto

Original comment by reier...@gmail.com on 13 Dec 2010 at 6:36

GoogleCodeExporter commented 9 years ago
Hi,

I have played with your example for a couple of minutes and I can't reproduce 
the problem you mention, neither see the tooltil. What are you trying to 
achieve? Kind of master detail? If so, I would do the following:

1-Place the "tooltip contents" on a single element that is outside the repeater.
2-Associate the tooltip to a column on each row and use AJAX to update when it 
is about to be shown.

Please, let me know if you want me to build an example showing how to achieve 
this.

Ernesto

Original comment by reier...@gmail.com on 13 Dec 2010 at 7:18

GoogleCodeExporter commented 9 years ago
Hi Ernesto,

Thanks for look to the issue.

1. Tooltips become visible at the right side of each row of the table, if you 
hover the mouse on the row. It looks like an indicator. In my applicataion, I 
add another tooltip to show more details of each item shown in the row when you 
hover the mouse on the indicator. But I do not include it in the quick-start, 
since it is not required to reproduce the problem.
I put tooltips inside the repeater because the position of tooltip is 
relational to that of the row (repeater-item). But I will check my source code 
that is it possible to make the tooltip outside the repeater.

2. If no tooltip is shown, could you check the html on the browser? Is it 
includes following lines?
<script type="text/javascript" 
src="resources/org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference/j
query/jquery-1.4.4.js"></script>
If not, add the wiquery initialization code at WicketApplication.init()
 >> WiQueryInitializer w = new WiQueryInitializer();
 >> w.init(this);
I think this is not in your case, though.

Thanks,
Takeo Hosomi

Original comment by Takeo.Ho...@gmail.com on 13 Dec 2010 at 7:51

GoogleCodeExporter commented 9 years ago
Takeo,

The kind of error you are seen is typical of the following situation:

1-You click on one of the navigate buttons of table. An AJAX request is sent to 
the server.
2-While request is processed you move the mouse over a row. A new AJAX request 
is queued in order to display the tooltip.
3-First request finish and the server side  component hierarchy is altered so 
that request in Step 2 is referring to a component that no longer exists on 
page.

One way to prevent this is try to use a "veil" so that request on step 2 is 
never triggered when you are navigating between pages.

Regards,

Ernesto

Original comment by reier...@gmail.com on 13 Dec 2010 at 9:45

GoogleCodeExporter commented 9 years ago
Hi Ernesto,

Thanks for the suggestion.
I looked the following links and it solves the problem.
http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-
code/

I attach the modified source code.

Thanks,
Takeo Hosomi

Original comment by Takeo.Ho...@gmail.com on 13 Dec 2010 at 7:33

Attachments: