Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior
Thanks, that seems to do the trick... Fernando: Returning null does not work since the resolve method requires a not null return value. But if the AjaxLink trick works, it seems I wont be needing to modify the resolve method anyway... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2327012.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior
Daniel, It is better to return just a null. A null is translate it as "...the page you already are...". On Fri, Jul 2, 2010 at 8:39 AM, bjolletz wrote: > > Hi, > > My conclusion is that this is not really a wicket error, since we're > clicking a link which no longer exists after the Ajax update. > > My solution to this has been to catch these exceptions in my > WebRequestCycleProcessor, like this: > >@Override >public IRequestTarget resolve(RequestCycle requestCycle, > RequestParameters requestParameters) { >try { >return super.resolve(requestCycle, requestParameters); >} catch (InvalidUrlException e) { >if > (requestCycle.getRequest().getURL().contains("ILinkListener")) { >return new > PageRequestTarget(requestCycle.getRequest().getPage()); >} >throw e; >} >} > > What happens is that if I get this exception and the request URL contains > "ILinkListener", I just return the page which the user is already at. For > the user it will seem like nothing happens, which at least is better than > that they get an exception. > > This is not a pretty solution, but the best I could think of. If someone > knows of a better or more general soultion to this problem I would be happy > to know. > > /Daniel > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276328.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior
Daniel, Help! I am running into the same exception. But I had a harsher situation. In my case I have a component called box who can have many images in it. A modal window permits adding images to boxes - your case: modal window and refreshing back page - which you can click and send you to another page. I have plenty of these boxes into my app. The exception only occurs for the new images added. As I had plenty of boxes, I cannot take your patch for my case. It would be burdensome. Have you found any solution to this kind of not proven bug, but repeated in many cases? thanks in advance On Fri, Jul 2, 2010 at 8:39 AM, bjolletz wrote: > > Hi, > > My conclusion is that this is not really a wicket error, since we're > clicking a link which no longer exists after the Ajax update. > > My solution to this has been to catch these exceptions in my > WebRequestCycleProcessor, like this: > >@Override >public IRequestTarget resolve(RequestCycle requestCycle, > RequestParameters requestParameters) { >try { >return super.resolve(requestCycle, requestParameters); >} catch (InvalidUrlException e) { >if > (requestCycle.getRequest().getURL().contains("ILinkListener")) { >return new > PageRequestTarget(requestCycle.getRequest().getPage()); >} >throw e; >} >} > > What happens is that if I get this exception and the request URL contains > "ILinkListener", I just return the page which the user is already at. For > the user it will seem like nothing happens, which at least is better than > that they get an exception. > > This is not a pretty solution, but the best I could think of. If someone > knows of a better or more general soultion to this problem I would be happy > to know. > > /Daniel > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276328.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior
Try to use AjaxLink("iconLink") instead your Link("iconLink") -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276332.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior
Hi, My conclusion is that this is not really a wicket error, since we're clicking a link which no longer exists after the Ajax update. My solution to this has been to catch these exceptions in my WebRequestCycleProcessor, like this: @Override public IRequestTarget resolve(RequestCycle requestCycle, RequestParameters requestParameters) { try { return super.resolve(requestCycle, requestParameters); } catch (InvalidUrlException e) { if (requestCycle.getRequest().getURL().contains("ILinkListener")) { return new PageRequestTarget(requestCycle.getRequest().getPage()); } throw e; } } What happens is that if I get this exception and the request URL contains "ILinkListener", I just return the page which the user is already at. For the user it will seem like nothing happens, which at least is better than that they get an exception. This is not a pretty solution, but the best I could think of. If someone knows of a better or more general soultion to this problem I would be happy to know. /Daniel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276328.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior
Hello, Have you found the resolution to this problem? Thank you! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276311.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior
Hi, Did you find a solution for this? I'm using wicket 1.4.8 and get almost the same error. Like you I have a customized column with a Link component in a datagrid. I have an ajax search field which updates the data (and the links) in the data grid when changing the search input. Sometimes if I click the link very quickly after I have changed the search value,, I get the same exception as you: org.apache.wicket.WicketRuntimeException: component panel:searchAndShowPanel:form:dataGrid:form:bodyContainer:body:row:31:item:addLink:addRecipientLink not found on page se.diamo.paysol.web.pages.invoicerecipientdir.pages.pagerorecipientdirectory.invoicerecipientdirectoryforcustomerpage.admin.AdminInvoiceRecipientDirectoryForCustomerPage[id = 27], listener interface = [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()] 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) But, if I wait one or two seconds before clicking, I never get this error. It seems like this has to do with the re-rendering of the page after the ajax request. At the moment the link is clicked, the link listener is not present on the server side. The question is if this should be considered a bug in Wicket or if this is by design. I'm thankful for any input on this. Apollo Apollo11 wrote: > > Hi all, > > I create a customized column with a Link component with an Icon, which it > will popup a new page for editding after click on it, for the Wicket > Datatable. > > *public* IconLinkPanel( *final* Item item, *final* String componentId, * > final* IModel model) {*{* > > *final* Link link = *new* Link("iconLink") { > > @Override > > *public* *void* onClick() { > > PageParameters params = *new* PageParameters(); > > params.put("object", theModel.getObject()); > > EditorPopupPage page = *new *EditorPopupPage(params ) ; > > setRedirect(*true*); > > setResponsePage(page); > > }; > > link.setPopupSettings(getPopupSettings()); > > Image img = *new* Image("image", getImageResourceReference()); > > *if* (getAltString() != *null* && !getAltString().trim().isEmpty()) { > > img.add(*new* SimpleAttributeModifier("alt", getAltString())); > > } > > *if* (getTitleString() != *null* && !getTitleString().trim().isEmpty()) { > > img.add(*new* SimpleAttributeModifier("title", getTitleString())); > > } > > link.add(img); > > add(link); > > } > > > the Datatable itself I added AjaxSelfUpdatingTimerBehavior to refresh the > table every 5 seconds. > > I've encountered a Intermittent internal server error whick when clicking > on > the link. the log shows > > Caused by: org.apache.wicket.WicketRuntimeException: component > homePage:panel:table:rows:32:cells:14:cell:link not found on page > com.apollo.fo.web.HomePage[id = 0], listener interface = > [RequestListenerInterface name=ILinkListener, method=public abstract void > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()] > > 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) > > > > I believe this issue is related to the datatable refreshing every 5 > seconds. > > > Is everyone have the same issue? If so, any solution for this? > > Your feedback are appreciated! > > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2229885.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior
Hi all, I create a customized column with a Link component with an Icon, which it will popup a new page for editding after click on it, for the Wicket Datatable. *public* IconLinkPanel( *final* Item item, *final* String componentId, * final* IModel model) {*{* *final* Link link = *new* Link("iconLink") { @Override *public* *void* onClick() { PageParameters params = *new* PageParameters(); params.put("object", theModel.getObject()); EditorPopupPage page = *new *EditorPopupPage(params ) ; setRedirect(*true*); setResponsePage(page); }; link.setPopupSettings(getPopupSettings()); Image img = *new* Image("image", getImageResourceReference()); *if* (getAltString() != *null* && !getAltString().trim().isEmpty()) { img.add(*new* SimpleAttributeModifier("alt", getAltString())); } *if* (getTitleString() != *null* && !getTitleString().trim().isEmpty()) { img.add(*new* SimpleAttributeModifier("title", getTitleString())); } link.add(img); add(link); } the Datatable itself I added AjaxSelfUpdatingTimerBehavior to refresh the table every 5 seconds. I've encountered a Intermittent internal server error whick when clicking on the link. the log shows Caused by: org.apache.wicket.WicketRuntimeException: component homePage:panel:table:rows:32:cells:14:cell:link not found on page com.apollo.fo.web.HomePage[id = 0], listener interface = [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()] 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) I believe this issue is related to the datatable refreshing every 5 seconds. Is everyone have the same issue? If so, any solution for this? Your feedback are appreciated!