You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Илья Нарыжный <ph...@ydn.ru> on 2014/04/26 17:08:10 UTC

Stateless/Statefull pages - incorrect behaviour

Guys,

Please advise how to do in following situation or confirm that's a bug and
should be fixed.

There is a page (login page) with stateless form. That page has lots of
common components (menu and etc.). There are some statefull components in
the components tree that are visible only for signed in users: but once
user isn't signed in - that components are hidden. That's why page is
becoming "stateless" (no visible components) and form prepared
correspondingly. But when form data is submitted: during obtaining of form
component to process request - wicket things that page actually is
statefull. As a result - page've been recreated and fully rendered -
instead of processing of the form.

There is a workaround: setStatelessHint(false). But imho reason is a little
bit another:
1) After constuction of page: page is statefull - because of some statefull
components are in the tree.
2) After initialization of page: page is still statefull - because there
are that statefull components
3) After configuratoin of page (method onConfigure) - page is becoming
stateless - because all statefull components marked as invisible.
4) Form has been rendered as stateless - with no version number is in the
URL.
5) Page can'be reconstructed correctly because of p.1 and p.2

I think that stateless flag should be precalculated right after
initialization step and should be changed due to some stuff in
"configuration" methods.

What do you think?

If you wish I can create issue on jira and attach "quick start".

Ilia

Re: Stateless/Statefull pages - incorrect behaviour

Posted by Илья Нарыжный <ph...@ydn.ru>.
Hi, Martin and Wicket users!

Issue has been created and quickstart has been attached.
https://issues.apache.org/jira/browse/WICKET-5578

Thanks!


2014-05-05 0:17 GMT+04:00 Martin Grigorov <mg...@apache.org>:

> Hi,
>
> Please create a ticket and attach the quickstart.
> Thanks!
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Sat, Apr 26, 2014 at 5:08 PM, Илья Нарыжный <ph...@ydn.ru> wrote:
>
> > Guys,
> >
> > Please advise how to do in following situation or confirm that's a bug
> and
> > should be fixed.
> >
> > There is a page (login page) with stateless form. That page has lots of
> > common components (menu and etc.). There are some statefull components in
> > the components tree that are visible only for signed in users: but once
> > user isn't signed in - that components are hidden. That's why page is
> > becoming "stateless" (no visible components) and form prepared
> > correspondingly. But when form data is submitted: during obtaining of
> form
> > component to process request - wicket things that page actually is
> > statefull. As a result - page've been recreated and fully rendered -
> > instead of processing of the form.
> >
> > There is a workaround: setStatelessHint(false). But imho reason is a
> little
> > bit another:
> > 1) After constuction of page: page is statefull - because of some
> statefull
> > components are in the tree.
> > 2) After initialization of page: page is still statefull - because there
> > are that statefull components
> > 3) After configuratoin of page (method onConfigure) - page is becoming
> > stateless - because all statefull components marked as invisible.
> > 4) Form has been rendered as stateless - with no version number is in the
> > URL.
> > 5) Page can'be reconstructed correctly because of p.1 and p.2
> >
> > I think that stateless flag should be precalculated right after
> > initialization step and should be changed due to some stuff in
> > "configuration" methods.
> >
> > What do you think?
> >
> > If you wish I can create issue on jira and attach "quick start".
> >
> > Ilia
> >
>

Re: Stateless/Statefull pages - incorrect behaviour

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

Please create a ticket and attach the quickstart.
Thanks!

Martin Grigorov
Wicket Training and Consulting


On Sat, Apr 26, 2014 at 5:08 PM, Илья Нарыжный <ph...@ydn.ru> wrote:

> Guys,
>
> Please advise how to do in following situation or confirm that's a bug and
> should be fixed.
>
> There is a page (login page) with stateless form. That page has lots of
> common components (menu and etc.). There are some statefull components in
> the components tree that are visible only for signed in users: but once
> user isn't signed in - that components are hidden. That's why page is
> becoming "stateless" (no visible components) and form prepared
> correspondingly. But when form data is submitted: during obtaining of form
> component to process request - wicket things that page actually is
> statefull. As a result - page've been recreated and fully rendered -
> instead of processing of the form.
>
> There is a workaround: setStatelessHint(false). But imho reason is a little
> bit another:
> 1) After constuction of page: page is statefull - because of some statefull
> components are in the tree.
> 2) After initialization of page: page is still statefull - because there
> are that statefull components
> 3) After configuratoin of page (method onConfigure) - page is becoming
> stateless - because all statefull components marked as invisible.
> 4) Form has been rendered as stateless - with no version number is in the
> URL.
> 5) Page can'be reconstructed correctly because of p.1 and p.2
>
> I think that stateless flag should be precalculated right after
> initialization step and should be changed due to some stuff in
> "configuration" methods.
>
> What do you think?
>
> If you wish I can create issue on jira and attach "quick start".
>
> Ilia
>