something like this in your application should work:

@Override
public RequestCycle newRequestCycle(Request request, Response response) {
    return new WebRequestCycle(this, (WebRequest)request,
(WebResponse)response) {
        @Override
        public Page onRuntimeException(Page page, RuntimeException e) {
            if (RequestCycle.get().getRequestTarget() instanceof
AjaxRequestTarget) {
                // do something with ajax request targets
            }
            return super.onRuntimeException(page, e);
        }
    };
}


--
Jeremy Thomerson
http://www.wickettraining.com



On Thu, Oct 1, 2009 at 1:59 PM, Nicolas Melendez
<nmelen...@getsense.com.ar>wrote:

> Hi there,Our team was discussing about if there is a place where all
> exceptions, that come from an ajax behaviour, can be catched.
> We want to do this because we strongly belive that exceptions should be
> catched in one place, but now we have to catch  the exception in every
> ajax method( onSubmit, onChance, etc) in the application.
> Is there one place in wicket where we can do that?
>
> Thank in advance.
> Our team.
>

Reply via email to