You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Florian Braun <fl...@gmail.com> on 2014/07/10 05:06:08 UTC

Wicket pages loose PageParameters after Expiry

While migrating form Wicket 6.6.0 to the latest version we are running into
an issue with a change made to AbstractBookmarkableMapper.processListener
(changed in 6.7.0) that removes PageParameters. This causes pages that
expired to be recreated without the parameters of the expired page.

In our application we have pages (stateful, bookmarkable) that render
differently based on pageParameters. Up to now we were able to create a
fresh instance of these pages after session expiry but with the latest
change all parameters get dropped and the page no longer renders the way it
needs to.

I found some comments on https://issues.apache.org/jira/browse/WICKET-5539
from another user having similar issues.

Like Sebastian Gooren said in his comment I was also under the impression
that  IPageSettings#getRecreateMountedPagesAfterExpiry() should include the
PageParameters.

Would it be possible to change the code to only remove the parameters
if recreateMountedPagesAfterExpiry
is set to false? Or add an additional configuration for the handling of page
parameters?

Florian

Re: Wicket pages loose PageParameters after Expiry

Posted by Florian Braun <fl...@gmail.com>.
Hello Martin,
thanks for reconsidering this functionality.
If you decide that it is ok to remove the null-ification and need help with
any code changes please let me know. I'm happy to help.

Florian


On Sat, Jul 12, 2014 at 1:38 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Hi,
>
> I'll reconsider this functionality.
> Most of the complains about the cut parameters are about the Link
> components.
> My main concern is about Form submit to an expired page and leaking the
> submitted data. But since POST data is not parsed into PageParameters maybe
> it is not such a problem.
> Unfortunately I haven't written down the exact reason why I made this
> change in first place with
> https://issues.apache.org/jira/browse/WICKET-4594
> and now I cannot recall it. I'll consult with my colleagues and if no one
> remembers the reason then I'll experiment a bit and remove the
> null-ification if everything is OK.
> I've reopened 5539 and set its "Fix for" version to 6.17 so I won't forget
> it.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Thu, Jul 10, 2014 at 6:06 AM, Florian Braun <fl...@gmail.com>
> wrote:
>
> > While migrating form Wicket 6.6.0 to the latest version we are running
> into
> > an issue with a change made to AbstractBookmarkableMapper.processListener
> > (changed in 6.7.0) that removes PageParameters. This causes pages that
> > expired to be recreated without the parameters of the expired page.
> >
> > In our application we have pages (stateful, bookmarkable) that render
> > differently based on pageParameters. Up to now we were able to create a
> > fresh instance of these pages after session expiry but with the latest
> > change all parameters get dropped and the page no longer renders the way
> it
> > needs to.
> >
> > I found some comments on
> https://issues.apache.org/jira/browse/WICKET-5539
> > from another user having similar issues.
> >
> > Like Sebastian Gooren said in his comment I was also under the impression
> > that  IPageSettings#getRecreateMountedPagesAfterExpiry() should include
> the
> > PageParameters.
> >
> > Would it be possible to change the code to only remove the parameters
> > if recreateMountedPagesAfterExpiry
> > is set to false? Or add an additional configuration for the handling of
> > page
> > parameters?
> >
> > Florian
> >
>

Re: Wicket pages loose PageParameters after Expiry

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

I'll reconsider this functionality.
Most of the complains about the cut parameters are about the Link
components.
My main concern is about Form submit to an expired page and leaking the
submitted data. But since POST data is not parsed into PageParameters maybe
it is not such a problem.
Unfortunately I haven't written down the exact reason why I made this
change in first place with https://issues.apache.org/jira/browse/WICKET-4594
and now I cannot recall it. I'll consult with my colleagues and if no one
remembers the reason then I'll experiment a bit and remove the
null-ification if everything is OK.
I've reopened 5539 and set its "Fix for" version to 6.17 so I won't forget
it.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Thu, Jul 10, 2014 at 6:06 AM, Florian Braun <fl...@gmail.com>
wrote:

> While migrating form Wicket 6.6.0 to the latest version we are running into
> an issue with a change made to AbstractBookmarkableMapper.processListener
> (changed in 6.7.0) that removes PageParameters. This causes pages that
> expired to be recreated without the parameters of the expired page.
>
> In our application we have pages (stateful, bookmarkable) that render
> differently based on pageParameters. Up to now we were able to create a
> fresh instance of these pages after session expiry but with the latest
> change all parameters get dropped and the page no longer renders the way it
> needs to.
>
> I found some comments on https://issues.apache.org/jira/browse/WICKET-5539
> from another user having similar issues.
>
> Like Sebastian Gooren said in his comment I was also under the impression
> that  IPageSettings#getRecreateMountedPagesAfterExpiry() should include the
> PageParameters.
>
> Would it be possible to change the code to only remove the parameters
> if recreateMountedPagesAfterExpiry
> is set to false? Or add an additional configuration for the handling of
> page
> parameters?
>
> Florian
>