You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Gereon Steffens <ge...@finanzen100.de> on 2012/09/03 09:19:32 UTC
Question re: stateless pages and setResponsePage()
Hi,
I have a bunch of stateless pages, each calling setStatelessHint(true) in
the constructor to indicate this. I've now noticed that when one of these
pages calls setResponsePage, the target page is always considered
stateful, since RequestCycle#setResponsePage explicitly resets the hint.
Why is this done?
Gereon
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Question re: stateless pages and setResponsePage()
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
Because you pass an instance of a page and this instance to be
reachable in the next request should be stored.
Use setResponsePage(Class) instead. Your page is stateless, so
instantiating a completely new instance in the next request should be
the same.
On Mon, Sep 3, 2012 at 9:19 AM, Gereon Steffens
<ge...@finanzen100.de> wrote:
> Hi,
>
> I have a bunch of stateless pages, each calling setStatelessHint(true) in
> the constructor to indicate this. I've now noticed that when one of these
> pages calls setResponsePage, the target page is always considered
> stateful, since RequestCycle#setResponsePage explicitly resets the hint.
>
> Why is this done?
>
> Gereon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org