On Tue, Jan 25, 2011 at 11:14 AM, Matthias Keller
<matthias.kel...@ergon.ch>wrote:

> Hi List
>
> We've got the following scenario:
> After a user hopped through a wizard, he'll reach a confirmation page in
> our workflow. Now the session still needs to remain active but I want to
> prohibit going back into the wizard and resend it again.
> I experimented with  Session.clear()  and  Session.getPageMaps() and
> calling pageMap.remove() on each instance returned, to no avail - after
> clicking back, the user may still access the wizard again.
>
> What's the correct way to 'expire' *all* previous pages so that going back
> using the back-button is not possible anymore? And, where do I need to put
> that specific code (at the end of the wizard after calling
> setResponsePage(), in the onInitialize() of the confirmation page, ... ?
>

 Have you looked at IPageMap#clear()?  I'm not 100% sure where you are able
to put it.  I think you could put it just before calling setResponsePage.
 Not after, though (since setResponsePage throws an exception that stops
processing, your code wouldn't get called after it.)

Is there some cool debugging feature or call I'd could do to see all the
> pages in the pagemaps with their versions et al in order to find out what to
> call to clear that...?
>

Add a dependency to wicket-devutils and then in your base page (hopefully
you have a base page for all your pages), add a DebugBar.  That will have
some links to the inspector, etc...
-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Reply via email to