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 <daniel.akerl...@pagero.com> 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

Reply via email to