yeah very true if it was done that way then user's state will be lost in this use case,thanks !
On Thu, Feb 9, 2012 at 9:27 PM, Igor Vaynberg <igor.vaynb...@gmail.com> wrote: > this is a bad idea. what if the user does > > MyPage p=new MyPage(); > p.setSomeFlag(true); > setResponsePage(p); > > wicket doesnt know that the instance of MyPage is prestine, so it > cannot make the decision to throw it away and redirect to another > instance. > > -igor > > On Thu, Feb 9, 2012 at 12:42 AM, vineet semwal > <vineetsemwal1...@gmail.com> wrote: >> what if RequestCycle#setResponsePage(Page) would have delegated to >> RequestCycle#setResponsePage(Class<Page>) or >> RequestCycle#setResponsePage(Class<Page>,Pageparameters) after >> checking whether the page#isstateless? >> but then user wouldnt be able to pass state from constructor if he wanted .. >> >> On Thu, Feb 9, 2012 at 1:37 PM, Martin Grigorov <mgrigo...@apache.org> wrote: >>> Hi, >>> >>> I'm not sure whether this is the fix for this problem but we improved >>> org.apache.wicket.request.cycle.RequestCycle#setResponsePage(Page) >>> to set statelessHint to false even for stateless pages because without >>> saving them in the store we are not able to find them later after the >>> redirect. >>> >>> If you want to be stateless then you need to use >>> #setResponsePage(Class<Page>) instead. Redirecting to a pre-created >>> page instance is not stateless at all - stateless means that a new >>> page instance will be created for each request. >>> >>> On Thu, Feb 9, 2012 at 8:55 AM, David Rain <david_r...@kb.cz> wrote: >>>> Martin Grigorov <mgrigorov <at> apache.org> writes: >>>> >>>>> >>>>> can you create a ticket for this. I think I know what happens >>>>> thanks! >>>>> >>>>> On Fri, Sep 9, 2011 at 6:57 PM, pasto <peter.pastrnak <at> gmail.com> >>>>> wrote: >>>>> > Hi, >>>>> > >>>>> > in Wicket 1.5 RC7 is f.e. the RedirectPage set to unversioned, that >>>>> > makes >>>> it >>>>> > impossible to render using the REDIRECT_TO_RENDER strategy. Because of >>>>> > this >>>>> > flag the page instance is not being stored in the PageMap store, so it >>>>> > is >>>>> > not accessible during the render phase. Is there some setting that can >>>>> > tell >>>>> > Wicket to set unversioned pages as dirty (touch the page in pagemanager) >>>>> > when using this strategy? Or I just didn't get the point? :) >>>>> > >>>>> > Thank you, >>>>> > Peter. >>>>> > >>>>> > -- >>>>> > View this message in context: http://apache- >>>> wicket.1842946.n4.nabble.com/Expiration-of-unversioned-pages-in-Wicket-1-5- >>>> tp3802099p3802099.html >>>>> > Sent from the Users forum mailing list archive at Nabble.com. >>>>> > >>>>> > --------------------------------------------------------------------- >>>>> > To unsubscribe, e-mail: users-unsubscribe <at> wicket.apache.org >>>>> > For additional commands, e-mail: users-help <at> wicket.apache.org >>>>> > >>>>> > >>>>> >>>> >>>> >>>> Hi Martin! >>>> I'm interested if an issue was created for this bug and if the problem was >>>> solved then? I couldn't find it anywhere in JIRA and I am now facing the >>>> (nearly) same problem. >>>> I create the page (stateless), wrap it in PageProvider and >>>> RenderPageRequestHandler and make urlFor it to navigate a pure javascript >>>> modal window to it. But I get PageExpiredException for that new Page. >>>> If I call getSession().getPageManager().touchPage(...) after creation, >>>> everything's fine, but I think this is not conceptual (I use it just as >>>> hotfix) >>>> >>>> Running Wicket 1.5.4 >>>> >>>> Thanks for reply! >>>> >>>> David >>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> 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 > -- thank you, regards, Vineet Semwal --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org