1) Why setting bookmarkable or not bookmarkable response page makes the
difference between expiring and not expiring the current page?
Basically, the page instances are versioned to framework be able to get them
back. The default versioning implementation encode page version information
at url. As bookmarkable pages don't have such information encoded on they
ulr, just a new pagemap are created for they.

2) What determines if a page is stateless or stateful? Is it just the fact
that it contains stateless or stateful forms?
It is stateless by default. Contain an statefull component (as form) is
enough to page turn to statefull

3) Is there a way I can expire the current page if I set a bookmarkable
response page?
yes, just: (if I understand your question)
getPageMap().clear();
setResponsePage(MyStatelessPage);
so
1- go to stateless page 1
2 - go to statefull page 2
3 - clean the pagemap go to stateless page 1
4 - click at back button and the page is expired...

If anyone can point us where to read on these subjects we'll appreciate it
very much.

http://cwiki.apache.org/WICKET/page-maps.html

On Wed, Oct 28, 2009 at 1:43 PM, Tomás Rossi <tro...@mecon.gov.ar> wrote:

> Ok... Our page had a StatelessForm inside. We changed it to just Form.
>
> When the form was submitted, we had a bookmarkable page as a response page
> and now we changed the call to produce a non-bookmarkable page. This is:
>
> onSubmit() {
> ...
> //setResponsePage(MyResponsePage.class); // <- REMOVED
> setResponsePage(new MyResponsePage()); // <- ADDED
> ...
> }
>
> With this (and no need to clear the pagemap) a submit after a back button
> produces a page expired message.
>
> If I make the form stateless again, kaboom!
>
> Questions:
> 1) Why setting bookmarkable or not bookmarkable response page makes the
> difference between expiring and not expiring the current page?
> 2) What determines if a page is stateless or stateful? Is it just the fact
> that it contains stateless or stateful forms?
> 3) Is there a way I can expire the current page if I set a bookmarkable
> response page?
>
> We feel Wicket is a great framework, but there are things we don't yet
> understand. Mainly, we get really confused on how does Wicket handle back
> button, what are and what distinguishes stateless or stateful pages, what
> are versioned pages/components, what problems they solve and how to use
> them. If anyone can point us where to read on these subjects we'll
> appreciate it very much.
>
> Kind regards and thanks,
>
> Tom;
>
> Pedro Santos escribió:
>
>  You are aware that to an page expire, it has to be statefull, right?
>> In a statefull page:
>> getPage().getPageMap().clear()
>> and the previous versions will to be removed from pagemap, then you got
>> the
>> page expired when try to back to then...
>>
>> On Tue, Oct 27, 2009 at 4:05 PM, Tomás Rossi <tro...@mecon.gov.ar> wrote:
>>
>>
>>
>>> Nothing seems to work.
>>>
>>> Does the fact that the page I want to expire is the home page has
>>> anything
>>> to do with it?
>>>
>>> Pedro Santos escribió:
>>>
>>>  The page returned from back button came from pagemap. Make sure to
>>> remove
>>>
>>>
>>>> it
>>>> from there and you get the expired exception.
>>>>
>>>> On Tue, Oct 27, 2009 at 11:57 AM, Tomás Rossi <tro...@mecon.gov.ar>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Hi, I have another question...
>>>>>
>>>>> in Wicket (1.4.2), can I force the expiration of a page?
>>>>> Specifically, if users hit browser's back-button, I'd like to show them
>>>>> the
>>>>> page-expired message.
>>>>>
>>>>> I've already tried to invalidate the session, but I got a horrible
>>>>> exception when re-submitting the form after reaching it through the
>>>>> back
>>>>> button.
>>>>>
>>>>> Thanks in advance,
>>>>> --
>>>>> Tom;
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos

Reply via email to