ok...but you can just as simply do class myrequestcycle extends webrequestcycle { protected Page onRuntimeException(RuntimeExcepton e, Page cause) { return new MyExceptionPage(e); } }
-igor On Thu, Apr 17, 2008 at 7:03 PM, Ned Collyer <[EMAIL PROTECTED]> wrote: > > Ok, what I have is... > > protected IRequestCycleProcessor newRequestCycleProcessor() { > return new WebRequestCycleProcessor() { > @Override > public void respond(RuntimeException e, RequestCycle requestCycle) { > //get the original response page before calling the super method. > final Page responsePage = requestCycle.getResponsePage(); > > //catching the response here as we want to be able to present our own > error page with scope to the exception. > try { > super.respond(e, requestCycle); > } catch (RestartResponseException restartResponseException) { > if (requestCycle.getResponsePage() instanceof ExceptionErrorPage) { > //here we want to use our own exception page. > throw new RestartResponseException(new MyExceptionPage(e, > responsePage)); > } > throw restartResponseException; > } > } > } > } > > > This does feel a little ugly, but its working. > > -- > View this message in context: > http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16758968.html > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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]