I don't have a no arg constructor, and it was blowing up trying to construct the page.
On Mar 4, 2012, at 9:38 AM, vineet semwal wrote: > hi martin, > WebPage exceptionPage = new NotifyUserOfException(ex); > IPageProvider provider = new PageProvider(page); > return new RenderPageRequestHandler(provider /*, > RenderPageRequestHandler.RedirectPolicy.XYZ */ ); > > > he actually means page instance not found in page store and new page > instance is created ,the above code is breakable in the case when page > has setstatelesshint(true) or somehow it can also be broken if you > have a zero constructor in error page,you can also reproduce this > problem > > page.setstatelesshint(false) will fix the problem as it will guarantee > the page is stored i think > > > On Sun, Mar 4, 2012 at 6:59 PM, Martin Grigorov <mgrigo...@apache.org> wrote: >> I'm not sure what you mean by "throws away the page". It should work. >> >> On Sat, Mar 3, 2012 at 7:19 PM, Douglas Ferguson <the...@gmail.com> wrote: >>> I decided to just put the exception in the session and just grab it from >>> there. >> >> Another place to put it is RequestCycle#metaData. This way you wont >> have to clean it. >> >>> >>> Douglas >>> >>> On Mar 3, 2012, at 10:26 AM, vineet semwal wrote: >>> >>>> you should also do page.setStatelessHint(false) >>>> >>>> Page page=new ClientErrorPage(ex); >>>> IPageProvider provider = new PageProvider(page); >>>> page.setStatelessHint(false); >>>> return new RenderPageRequestHandler(provider, >>>> RedirectPolicy.ALWAYS_REDIRECT); >>>> >>>> On Sat, Mar 3, 2012 at 8:23 PM, Douglas Ferguson <the...@gmail.com> wrote: >>>>> Yeah Martin Grigorov recomended that I do just that: >>>>> >>>>>> WebPage exceptionPage = new NotifyUserOfException(ex); >>>>>> IPageProvider provider = new PageProvider(page); >>>>>> return new RenderPageRequestHandler(provider /*, >>>>>> RenderPageRequestHandler.RedirectPolicy.XYZ */ ); >>>>> >>>>> >>>>> But I finding that it throws away the page that I pass in and just uses >>>>> the class object. >>>>> I discovered this because I don't have a default constructor so it blows >>>>> up on newInstance(). >>>>> >>>>> Douglas >>>>> >>>>> On Mar 3, 2012, at 1:36 AM, vineet semwal wrote: >>>>> >>>>>> i think scheduling is wrong in this usecase ,actually just overriding >>>>>> onexception and returning your handler like you did before should have >>>>>> worked but wait for some one else to respond if its not working >>>>>> >>>>>> On Sat, Mar 3, 2012 at 12:47 PM, Douglas Ferguson <the...@gmail.com> >>>>>> wrote: >>>>>>> I tried overriding onExceptionRequestHandlerResolved but I can't get >>>>>>> this to work. >>>>>>> >>>>>>> I'm still not getting my error page to load on errors. >>>>>>> >>>>>>> Douglas >>>>>>> >>>>>>> On Mar 3, 2012, at 12:36 AM, Douglas Ferguson wrote: >>>>>>> >>>>>>>> I mean "too many redirects" >>>>>>>> >>>>>>>> On Mar 3, 2012, at 12:36 AM, Douglas Ferguson wrote: >>>>>>>> >>>>>>>>> Causes an infinite loop. >>>>>>>>> >>>>>>>>> Douglas >>>>>>>>> >>>>>>>>> On Mar 3, 2012, at 12:20 AM, vineet semwal wrote: >>>>>>>>> >>>>>>>>>> i think you need to return the handler which you have scheduled >>>>>>>>>> >>>>>>>>>> On Sat, Mar 3, 2012 at 11:30 AM, Douglas Ferguson <the...@gmail.com> >>>>>>>>>> wrote: >>>>>>>>>>> onException() wants be to run a redirectHandler. do I just return >>>>>>>>>>> null? >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Mar 2, 2012, at 11:44 PM, vineet semwal wrote: >>>>>>>>>>> >>>>>>>>>>>> you need to do >>>>>>>>>>>> requestcycle.scheduleRequestHandlerAfterCurrent(new >>>>>>>>>>>> RenderPageRequestHandler(provider, >>>>>>>>>>>> RedirectPolicy.ALWAYS_REDIRECT)); >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Mar 3, 2012 at 10:53 AM, Douglas Ferguson >>>>>>>>>>>> <the...@gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> In migrating to wicket 1.5 from 1.4 I used this to redirect to my >>>>>>>>>>>>> error page when an exception is thrown. >>>>>>>>>>>>> But when I do this it is trying to instantiate a new copy of the >>>>>>>>>>>>> page rather than using the one I pass in. >>>>>>>>>>>>> >>>>>>>>>>>>> IPageProvider provider = new PageProvider(new >>>>>>>>>>>>> ClientErrorPage(ex)); >>>>>>>>>>>>> return new RenderPageRequestHandler(provider, >>>>>>>>>>>>> RedirectPolicy.ALWAYS_REDIRECT); >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> thank you, >>>>>>>>>>>> >>>>>>>>>>>> regards, >>>>>>>>>>>> Vineet Semwal >>>>>>>>>>>> >>>>>>>>>>>> --------------------------------------------------------------------- >>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>>>>>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> --------------------------------------------------------------------- >>>>>>>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>>>>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> thank you, >>>>>>>>>> >>>>>>>>>> regards, >>>>>>>>>> Vineet Semwal >>>>>>>>>> >>>>>>>>>> --------------------------------------------------------------------- >>>>>>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>>>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> thank you, >>>>>> >>>>>> regards, >>>>>> Vineet Semwal >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>>> >>>> >>>> >>>> >>>> -- >>>> thank you, >>>> >>>> regards, >>>> Vineet Semwal >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> >> >> >> -- >> Martin Grigorov >> jWeekend >> Training, Consulting, Development >> http://jWeekend.com >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > > > > -- > thank you, > > regards, > Vineet Semwal > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org