Hi Martin,

Thanks for the advice. So I will use PageParameters then and let
Wicket construct the page.

But:

I also have page constructors with PageReference parameter to link
back to. This would break bookmarkable as well. Would you have similar
concerns about PageReference?

Kind Regards,

Bernard


On Mon, 21 Jan 2013 10:05:57 +0200, you wrote:

>Hi,
>
>I think using Page#Page(IModel) constructor is not very useful. It appears
>to be anti-pattern lately.
>There were several tickets related to ModalWindow when a model is shared
>between the page that contains the modal and the page inside the modal. The
>two different pages are being serialized with different state of the model
>and after deserialization this model is no more the same instance anymore
>and the benefit of sharing a model is no more there.
>
>If you still want to go the way you want then check IPageFactory and its
>default impl - DefaultPageFactory.
>
>
>
>On Mon, Jan 21, 2013 at 3:45 AM, Bernard <[email protected]> wrote:
>
>> Hi all
>>
>> I am searching for a robust pattern to work around
>> PageExpiredException.
>>
>> My first idea was to have all pages bookmarkable and rely on
>>
>> org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
>> to recover.
>>
>> But this breaks when passing IModel in page constructors because then
>> pages are no longer bookmarkable.
>>
>> Of course avoiding the constructor and letting Wicket create the page
>> with PageParameters would solve this problem but I want to avoid this.
>>
>> It would be very useful to pass an IModel to a bookmarkable Page. How
>> can this be done?
>>
>> I am trying to avoid expiring logout links (the primary driver of all
>> this). In case of page expiry I can deal with the exceptional call of
>> the default constructor from
>> IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
>> a bookmarkable page.
>>
>> Many thanks,
>>
>> Bernard
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>


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

Reply via email to