You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Eyal Golan <eg...@gmail.com> on 2008/06/11 13:39:01 UTC

stateless vs. stateful what exactly did I do ?

Hi,
I have built a page that is stateless (bookmarkable) that accepts
PageParameters.
Now, this page inherits from a page that accepts PageParameters AND another
parameter.

public final class UserBrowserPage extends EntityBrowserPage {
  public UserBrowserPage(PageParameters pageParameters) {
    super(pageParameters, Const.LOCALIZATION_USER_PREFIX, "personId");
    ...
  }
}

And:
public abstract class EntityBrowserPage extends StyledSecuredBasePage {
  public EntityBrowserPage(PageParameters pageParameters, String
localizationPrefix,
            String localizationPostfix) {
     ...
  }
}

Now, the prefix and postfix are not used for class members.
They're used to create a Panel in the constructor and that's all.

To my understanding, the UserBrowserPage is stateless.
I even do in the Application a mounting: mount(new
QueryStringUrlCodingStrategy("/userBrowser", UserBrowserPage.class));
Which implies that it is stateless page.

Am I correct?

what happens if a sub class is a stateless page (has no parameters
constructor or only with PageParameters), but the parent page is stateful
(gets in the constructor parameters and stores them in class members)?

Hope I was clear :)

Thanks

-- 
Eyal Golan
egolan74@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

Re: stateless vs. stateful what exactly did I do ?

Posted by Ayodeji Aladejebi <al...@gmail.com>.
http://www.javaworld.com/javaworld/jw-06-2008/jw-06-wicket1.html?page=1

On 6/11/08, Eyal Golan <eg...@gmail.com> wrote:
>
> Hi,
> I have built a page that is stateless (bookmarkable) that accepts
> PageParameters.
> Now, this page inherits from a page that accepts PageParameters AND another
> parameter.
>
> public final class UserBrowserPage extends EntityBrowserPage {
>   public UserBrowserPage(PageParameters pageParameters) {
>     super(pageParameters, Const.LOCALIZATION_USER_PREFIX, "personId");
>     ...
>   }
> }
>
> And:
> public abstract class EntityBrowserPage extends StyledSecuredBasePage {
>   public EntityBrowserPage(PageParameters pageParameters, String
> localizationPrefix,
>             String localizationPostfix) {
>      ...
>   }
> }
>
> Now, the prefix and postfix are not used for class members.
> They're used to create a Panel in the constructor and that's all.
>
> To my understanding, the UserBrowserPage is stateless.
> I even do in the Application a mounting: mount(new
> QueryStringUrlCodingStrategy("/userBrowser", UserBrowserPage.class));
> Which implies that it is stateless page.
>
> Am I correct?
>
> what happens if a sub class is a stateless page (has no parameters
> constructor or only with PageParameters), but the parent page is stateful
> (gets in the constructor parameters and stores them in class members)?
>
> Hope I was clear :)
>
> Thanks
>
>
> --
> Eyal Golan
> egolan74@gmail.com
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>



-- 
Aladejebi Ayodeji A.,
DabarObjects Solutions
Phone: +234 9 481 7 156
Mobile: +234 803 589 1780
Email: deji@dabarobjects.com
Web: www.dabarobjects.com
Blog: blog.dabarobjects.com