You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Matthias Keller <ma...@ergon.ch> on 2008/11/05 12:00:18 UTC
How to terminate the session on not bookmarkable page?
Hi
I've got a wizard letting the user enter some information.
In the onFinish() method, I redirect him to my ConfirmationPage:
setResponsePage(new ConfirmationPage());
(I chose the instance method instead of the class method as I don't want
to have a bookmarkable page there)
On the ConfirmationPage I need access to the session a last time to
display a message like:
"Thank you Mr XXX, you'll hear from us soon"
After that I want to invalidate my session so that all the wizard pages
are becoming inaccessible (I have to set them to versioned as the
customer wants back button support inside the wizard...).
Unfortunately, when I call getSession().invalidate(); anywhere in my
ConfirmationPage (be it the constructor, onAfterRender() or even
onDetach()), I'll never see the ConfirmationPage as I get the Page
Expired message instead....
How can I achieve the destruction of the session (and thus the pages)
but still display this one last page? Reloading this confirmation page
may give the Page Expired message, I dont care.
Thanks
Matt
--
matthias.keller@ergon.ch +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
______________________________________________________________
e r g o n smart people - smart software
Re: How to terminate the session on not bookmarkable page?
Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Okay so onfinish redirect to a page which tells the message and
invalidates and are bookmarkable..... Or just clear the pagemap...
Matthias Keller wrote:
> Hi
>
> Would be another possibility, but it doesn't change nothing at all - I
> still get the page expired thingy, which I also really would expect in
> this case...
> It works if I use a bookmarkable page, but I dont want a fixed URL on
> the confirmation page which displays dynamic data from the wizard....
>
> Thanks
>
> Matt
>
> Nino Saturnino Martinez Vazquez Wael wrote:
>> Hmm why not to it
>> org.apache.wicket.extensions.wizard.Wizard#onFinish() .. ?
>>
>> Matthias Keller wrote:
>>> Hi
>>>
>>> I've got a wizard letting the user enter some information.
>>> In the onFinish() method, I redirect him to my ConfirmationPage:
>>> setResponsePage(new ConfirmationPage());
>>> (I chose the instance method instead of the class method as I don't
>>> want to have a bookmarkable page there)
>>>
>>> On the ConfirmationPage I need access to the session a last time to
>>> display a message like:
>>> "Thank you Mr XXX, you'll hear from us soon"
>>>
>>> After that I want to invalidate my session so that all the wizard
>>> pages are becoming inaccessible (I have to set them to versioned as
>>> the customer wants back button support inside the wizard...).
>>> Unfortunately, when I call getSession().invalidate(); anywhere in
>>> my ConfirmationPage (be it the constructor, onAfterRender() or even
>>> onDetach()), I'll never see the ConfirmationPage as I get the Page
>>> Expired message instead....
>>> How can I achieve the destruction of the session (and thus the
>>> pages) but still display this one last page? Reloading this
>>> confirmation page may give the Page Expired message, I dont care.
>>>
>>> Thanks
>>>
>>> Matt
>>>
>>
>
>
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to terminate the session on not bookmarkable page?
Posted by Matthias Keller <ma...@ergon.ch>.
Hi
Would be another possibility, but it doesn't change nothing at all - I
still get the page expired thingy, which I also really would expect in
this case...
It works if I use a bookmarkable page, but I dont want a fixed URL on
the confirmation page which displays dynamic data from the wizard....
Thanks
Matt
Nino Saturnino Martinez Vazquez Wael wrote:
> Hmm why not to it
> org.apache.wicket.extensions.wizard.Wizard#onFinish() .. ?
>
> Matthias Keller wrote:
>> Hi
>>
>> I've got a wizard letting the user enter some information.
>> In the onFinish() method, I redirect him to my ConfirmationPage:
>> setResponsePage(new ConfirmationPage());
>> (I chose the instance method instead of the class method as I don't
>> want to have a bookmarkable page there)
>>
>> On the ConfirmationPage I need access to the session a last time to
>> display a message like:
>> "Thank you Mr XXX, you'll hear from us soon"
>>
>> After that I want to invalidate my session so that all the wizard
>> pages are becoming inaccessible (I have to set them to versioned as
>> the customer wants back button support inside the wizard...).
>> Unfortunately, when I call getSession().invalidate(); anywhere in
>> my ConfirmationPage (be it the constructor, onAfterRender() or even
>> onDetach()), I'll never see the ConfirmationPage as I get the Page
>> Expired message instead....
>> How can I achieve the destruction of the session (and thus the pages)
>> but still display this one last page? Reloading this confirmation
>> page may give the Page Expired message, I dont care.
>>
>> Thanks
>>
>> Matt
>>
>
--
matthias.keller@ergon.ch +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
______________________________________________________________
e r g o n smart people - smart software
Re: How to terminate the session on not bookmarkable page?
Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Hmm why not to it org.apache.wicket.extensions.wizard.Wizard#onFinish()
.. ?
Matthias Keller wrote:
> Hi
>
> I've got a wizard letting the user enter some information.
> In the onFinish() method, I redirect him to my ConfirmationPage:
> setResponsePage(new ConfirmationPage());
> (I chose the instance method instead of the class method as I don't
> want to have a bookmarkable page there)
>
> On the ConfirmationPage I need access to the session a last time to
> display a message like:
> "Thank you Mr XXX, you'll hear from us soon"
>
> After that I want to invalidate my session so that all the wizard
> pages are becoming inaccessible (I have to set them to versioned as
> the customer wants back button support inside the wizard...).
> Unfortunately, when I call getSession().invalidate(); anywhere in my
> ConfirmationPage (be it the constructor, onAfterRender() or even
> onDetach()), I'll never see the ConfirmationPage as I get the Page
> Expired message instead....
> How can I achieve the destruction of the session (and thus the pages)
> but still display this one last page? Reloading this confirmation page
> may give the Page Expired message, I dont care.
>
> Thanks
>
> Matt
>
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to terminate the session on not bookmarkable page?
Posted by Johan Compagner <jc...@gmail.com>.
that does work no
you cant invalidate the session and then redirect to an instance/session
page.
What you could try is the invalidateNow() method and then the new instance
page will be created in the new session.
Also clearing pagemap or maybe just replacing the http session should work
(a new method on Session in the latest releases)
On Wed, Nov 5, 2008 at 12:00 PM, Matthias Keller
<ma...@ergon.ch>wrote:
> Hi
>
> I've got a wizard letting the user enter some information.
> In the onFinish() method, I redirect him to my ConfirmationPage:
> setResponsePage(new ConfirmationPage());
> (I chose the instance method instead of the class method as I don't want to
> have a bookmarkable page there)
>
> On the ConfirmationPage I need access to the session a last time to display
> a message like:
> "Thank you Mr XXX, you'll hear from us soon"
>
> After that I want to invalidate my session so that all the wizard pages are
> becoming inaccessible (I have to set them to versioned as the customer wants
> back button support inside the wizard...).
> Unfortunately, when I call getSession().invalidate(); anywhere in my
> ConfirmationPage (be it the constructor, onAfterRender() or even
> onDetach()), I'll never see the ConfirmationPage as I get the Page Expired
> message instead....
> How can I achieve the destruction of the session (and thus the pages) but
> still display this one last page? Reloading this confirmation page may give
> the Page Expired message, I dont care.
>
> Thanks
>
> Matt
>
> --
> matthias.keller@ergon.ch +41 44 268 83 98
> Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
> http://www.ergon.ch
> ______________________________________________________________
> e r g o n smart people - smart software
>
>
>