Unless you completely invalidated the browser/client side cache of
markup, people can still use the back button and will be presented
with the markup as it was rendered at that time. It is not until the
user performs an action at that page when wicket will try to retrieve
the page from the page store. And only then will it see that the page
is no longer available (provided the page was stateful, and the action
URL is not targetting a stateless action) and present the user with
page expired (or whatever you configured as the page expired page).

Martijn

On Wed, Jan 26, 2011 at 11:17 AM, Matthias Keller
<[email protected]> wrote:
> On 2011-01-25 18:20, Jeremy Thomerson wrote:
>>
>> On Tue, Jan 25, 2011 at 11:14 AM, Matthias Keller 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.)
>
> Session.clear() does just this, it visits all pagemaps and calls clear() on
> them. Though this seems to clear up some things (when I get all pagemaps
> afterwards programmatically, they're gone), I can still go back with the
> back button and reload the pages as often as I like.
> BTW, setResponsePage() does not throw any exceptions (at least not for
> 1.4.X), it just stores the nexxt page somewhere in the RequestCycle for
> later usage.
>
> It would be great if someone with deeper pagemaps-knowledge could chime in
> to find out the right place and way to clear all old pages...
>
>> 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...
>
> Thanks, I'll give it a shot this afternoon
>
> Matt
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to