Hi Robert,

 I'm using a custom error page in Wicket 6 adding a
RequestCycleListener at WebApplication init like this:

/* In case of unhandled exception redirect it to a custom page */
getRequestCycleListeners().add(new AbstractRequestCycleListener() {
            @Override
            public IRequestHandler onException(RequestCycle cycle,
Exception e) {
                return new RenderPageRequestHandler(new
PageProvider(new ExceptionErrorPage(e)));
            }
});

Here you can see that you get the exception on the constructor.

I'm not sure if there is a better way to do this in Wicket 6.

Best regards,

 Jordi.

On Sat, Nov 17, 2012 at 2:18 PM, Rob Schroeder <schrdrr...@gmail.com> wrote:
> Hello,
>
> I'm a new list member and I'll start with a quick introduction:
>
> After one or two earlier, but aborted attempts to try and get into Wicket, 
> I've
> finally decided to take the plunge now, even if only for some pending personal
> projects and possible future side-jobs. On my primary job as a Java SE/EE
> developer, JSF will most probably become the one-and-only web framework for 
> the
> foreseeable future, which I don't like, but that's life.
>
> While the mentioned attempts were with Wicket 1.3 and 1.4, it probably would
> seem stupid to start with anything but Wicket 6 now.
>
> It seems though that Wicket 6 introduced some major changes so that quite some
> of the docs, tips & tricks to be found on the web are no more applicable,
> including parts of the official Wicket Wiki and not really covered by the
> migration hints either; at least that's my impression after my initial 
> dabblings
> in Wicket 6, which leads me to the first questions for which I found no hints 
> so
> far:
>
> In Wicket 1.5, there is a way to define a custom error page for
> RuntimeExceptions which knows about the causing exception, by extending
> WebRequestCycle and overriding the WebApplication's newRequestCycle method. In
> Wicket 6, I can use getApplicationSettings().setInternalErrorPage and
> getExceptionSettings().setUnexpectedExceptionDisplay, but within my error page
> class I don't see my Exception, then. Did I miss something?
>
> Cheers,
> Robert
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
a10! i fins aviat.
J:-Deu

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to