Hello,

The problem was solved by the advice I got from a wiquery developer.

He said it was a common problem which happens when double ajax
requests are issued where the first ajax request rewrite a component,
and the next one refer to it.

I solved the problem by preventing it by using the technique
introduced at the following link, and it works.
http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/

Thanks,
Takeo Hosomi

On Thu, Dec 9, 2010 at 4:56 PM, Takeo Hosomi <[email protected]> wrote:
> I attached it to a JIRA.
> https://issues.apache.org/jira/browse/WICKET-3248
>
> Thanks,
> Takeo Hosomi
>
> On Thu, Dec 9, 2010 at 4:12 PM, Jeremy Thomerson
> <[email protected]> wrote:
>> Attach the zip of the quickstart to a JIRA.
>>
>> Jeremy Thomerson
>> http://wickettraining.com
>> -- sent from my "smart" phone, so please excuse spelling, formatting, or
>> compiler errors
>>
>> On Dec 9, 2010 4:15 PM, "Takeo Hosomi" <[email protected]> wrote:
>>
>> 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).
>>
>> Thanks,
>> Takeo Hosomi
>>
>> Step1.
>> Use following source code to reproduce the problem.
>>
>> Java:
>>
>> import java.io.Serializable;
>> import java.util.ArrayList;
>> import java.util.List;
>>
>> import org.apache.wicket.Component;
>> import org.apache.wicket.ajax.AjaxRequestTarget;
>> import
>> org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
>> import org.apache.wicket.behavior.SimpleAttributeModifier;
>> import org.apache.wicket.markup.html.CSSPackageResource;
>> import org.apache.wicket.markup.html.WebMarkupContainer;
>> import org.apache.wicket.markup.html.basic.Label;
>> import org.apache.wicket.markup.html.list.ListItem;
>> import org.apache.wicket.markup.html.list.PageableListView;
>> import org.apache.wicket.markup.html.panel.Panel;
>> import org.odlabs.wiquery.ui.themes.ThemeUiHelper;
>> import org.odlabs.wiquery.ui.themes.UiIcon;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior;
>> import
>> org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour.IToolTipOnBeforeShowUIEventHandler;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Offset;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Position;
>>
>> public class TestPanel extends Panel {
>>       private static final long serialVersionUID = 1L;
>>
>>       private static int rowHeight = 40;
>>
>>       public TestPanel(String id) {
>>               super(id);
>>               setOutputMarkupId(true);
>>
>>
>>  add(CSSPackageResource.getHeaderContribution(TooltipBehavior.CSS));
>>
>>       // Tooltip Indicator
>>       final WebMarkupContainer indiIcon = new
>> WebMarkupContainer("indiIcon");
>>       ThemeUiHelper.iconComponent(indiIcon, UiIcon.CARAT_1_EAST);
>>       final WebMarkupContainer tooltipIndicator = new
>> WebMarkupContainer("indi");
>>       tooltipIndicator.add(indiIcon);
>>       tooltipIndicator.add(new SimpleAttributeModifier("style",
>>
>>  "display:none;background-color:#C4C4C4;" +
>>                                       "height:"+20+"px;" +
>>
>>  "padding-top:"+((rowHeight-20)/2-1)+"px;padding-bottom:"+((rowHeight-20)/2-1)+"px;"));
>>       tooltipIndicator.setOutputMarkupId(true);
>>       add(tooltipIndicator);
>>
>>           // Container
>>       WebMarkupContainer container = new WebMarkupContainer("container");
>>       container.setOutputMarkupId(true);
>>       add(container);
>>
>>               PageableListView<DummyUser> users = new
>> PageableListView<DummyUser>("user", dummyUsers(), 3){
>>               /***/
>>                       private static final long serialVersionUID = 1L;
>>
>>                       @Override
>>                       protected void populateItem(ListItem<DummyUser> item)
>> {
>>                               item.add(new
>> SimpleAttributeModifier("style","height:"+rowHeight+"px;"));
>>                               item.add(new Label("name",
>> item.getModelObject().getName()));
>>                               item.add(new Label("first",
>> item.getModelObject().getFirst()));
>>                               item.add(new Label("last",
>> item.getModelObject().getLast()));
>>                       item.add(new TooltipAjaxBehaviour()
>>                               .setDelay(0) // TODO magic number 400ms
>>                               .setPredelay(0)
>>                               .setPosition(Position.bottom_right)
>>                               .setOffset(new Offset(-(rowHeight-1),-15)) //
>> y,x
>>                               .setTip(tooltipIndicator)
>>                               .setOnBeforeShow(new
>> IToolTipOnBeforeShowUIEventHandler() {
>>                                       private static final long
>> serialVersionUID = 1L;
>>
>>                                       public void onEvent(AjaxRequestTarget
>> target, Component
>> component, int top, int left) {
>>                                               // do something...
>>                                       }
>>                               })
>>                       );
>>                       }
>>           };
>>           container.add(users);
>>           container.add(new AjaxPagingNavigator("navigator", users));
>>       }
>>
>>       private List<DummyUser> dummyUsers() {
>>               List<DummyUser> ret = new ArrayList<DummyUser>();
>>               for (int i=0; i<10 ; i++){
>>                       ret.add(new DummyUser("name"+i,"first"+i,"last"+i));
>>               }
>>               return ret;
>>       }
>>
>>       private class DummyUser implements Serializable {
>>               private static final long serialVersionUID = 1L;
>>               private String name;
>>               private String first;
>>               private String last;
>>
>>               public DummyUser(String name, String first, String last){
>>                       this.name = name;
>>                       this.first = first;
>>                       this.last = last;
>>               }
>>               public String getName() {
>>                       return name;
>>               }
>>               public String getFirst() {
>>                       return first;
>>               }
>>               public String getLast() {
>>                       return last;
>>               }
>>       }
>> }
>>
>>
>> HTML:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <html xmlns="http://www.w3.org/1999/xhtml";;
>>       xmlns:wicket="
>> http://svn.apache.org/repos/asf/wicket/trunk/wicket/wicket-xhtml1-strict.dtd
>> ";>
>>
>> <wicket:panel>
>>       <br/>
>>       <div wicket:id="container">
>>               <table>
>>                       <tr>
>>                           <th>User Name</th>
>>                           <td>First Name</td>
>>                           <td>Last Name</td>
>>                       </tr>
>>                       <tr wicket:id="user">
>>                               <th  wicket:id="name">g1</th>
>>                               <td  wicket:id="first">g1</td>
>>                               <td  wicket:id="last">g1</td>
>>                       </tr>
>>               </table>
>>               <div wicket:id="navigator"></div>
>>       </div>
>>       <div wicket:id="indi">
>>               <div wicket:id="indiIcon"></div>
>>       </div>
>> </wicket:panel>
>> </html>
>>
>>
>>
>> Step2.
>> 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(WebRequestCycleProcessor.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.java:1216)
>>       at
>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>>       at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>>       at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java: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(ContextHandlerCollection.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(HttpConnection.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:489)
>>       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.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
>>       at
>> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
>>       at
>> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>>       ... 33 more
>>
>> ---------------------------------------------------------------------
>> 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]

Reply via email to