You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Hiren Patel <hi...@kaleconsultants.com> on 2010/09/10 08:09:06 UTC

Stateful pages

Hi all,

I have some doubts regarding the /"stateful Wicket page/" of Wicket.

I have one page with three components.
    1.Label
    2.TextField<String>
    3.TextField<Integer>.

1. What will be stateful?
2. What will be stored in the session? for example whole page or only 
the component that is stateful.

Case 1.
    Default condition.
Case 2.
    in the Page  i have written setStatelessHint(true).
    Nothing written in components.
Case 3.
    in the Page  i have written setStatelessHint(false).
    Nothing written in components.
Case 4.
    in the Page  i have written setStatelessHint(true).
    in the TextField<String> i have written
       protected boolean getStatelessHint() {
                return false;
            }
Case 5.
    in the Page  i have written setStatelessHint(true).
    in the all the three component I have written
       protected boolean getStatelessHint() {
                return false;
            }


Thanks,

_Hiren.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Stateful pages

Posted by Martin Grigorov <mg...@apache.org>.
On Fri, Sep 10, 2010 at 8:09 AM, Hiren Patel <
hiren_patel@kaleconsultants.com> wrote:

> Hi all,
>
> I have some doubts regarding the /"stateful Wicket page/" of Wicket.
>
> I have one page with three components.
>   1.Label
>   2.TextField<String>
>   3.TextField<Integer>.
>
> 1. What will be stateful?
>
Everything that returns 'true' for its #isStateless()

> 2. What will be stored in the session? for example whole page or only the
> component that is stateful.
>
The whole page will be stored if at least one of its components is not
stateless

>
> Case 1.
>   Default condition.
> Case 2.
>   in the Page  i have written setStatelessHint(true).
>   Nothing written in components.
> Case 3.
>   in the Page  i have written setStatelessHint(false).
>   Nothing written in components.
> Case 4.
>   in the Page  i have written setStatelessHint(true).
>   in the TextField<String> i have written
>      protected boolean getStatelessHint() {
>               return false;
>           }
> Case 5.
>   in the Page  i have written setStatelessHint(true).
>   in the all the three component I have written
>      protected boolean getStatelessHint() {
>               return false;
>           }
>
>
> Thanks,
>
> _Hiren.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Stateful pages

Posted by Hiren Patel <hi...@kaleconsultants.com>.
Hiren Patel wrote:
> Hi all,
>
> I have some doubts regarding the /"stateful Wicket page/" of Wicket.
>
> I have one page with three components.
>    1.Label
>    2.TextField<String>
>    3.TextField<Integer>.
>
> 1. What will be stateful?
> 2. What will be stored in the session? for example whole page or only 
> the component that is stateful.
>
> Case 1.
>    Default condition.
> Case 2.
>    in the Page  i have written setStatelessHint(true).
>    Nothing written in components.
> Case 3.
>    in the Page  i have written setStatelessHint(false).
>    Nothing written in components.
> Case 4.
>    in the Page  i have written setStatelessHint(true).
>    in the TextField<String> i have written
>       protected boolean getStatelessHint() {
>                return false;
>            }
> Case 5.
>    in the Page  i have written setStatelessHint(true).
>    in the all the three component I have written
>       protected boolean getStatelessHint() {
>                return false;
>            }
>
>
> Thanks,
>
> _Hiren.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
can any one answer my doubts?

Thanks,
_Hiren

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org