Discussion:
stateless vs. stateful what exactly did I do ?
Eyal Golan
2008-06-11 11:39:01 UTC
Permalink
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
***@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74
Ayodeji Aladejebi
2008-06-11 13:39:40 UTC
Permalink
http://www.javaworld.com/javaworld/jw-06-2008/jw-06-wicket1.html?page=1
Post by Eyal Golan
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");
...
}
}
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
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: ***@dabarobjects.com
Web: www.dabarobjects.com
Blog: blog.dabarobjects.com
Loading...