Re: [Wicket-user] stateless and/ or bookmarkable pages in Wicket 1.3
Thanks for your answers. I've read that one can override the method getStatelessHint() as following : protected boolean getStatelessHint() { return true; } to have a stateless form/component. However, in the SignInForm provided in the example, it's explicitly written: public final class SignInForm extends Form { protected boolean getStatelessHint() { return false; } How comes? This form has two textfields and the "remember me" option. Is this "remember me" option blocking the stateless aspect of the form? Thanks in advance ZedroS - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stateless and/ or bookmarkable pages in Wicket 1.3
the shorter version is: all bookmarkable pages start out stateless. when you add a non Stateless* component to them, it makes them stateful. -igor On 4/20/07, Johan Compagner <[EMAIL PROTECTED]> wrote: if you want stateless page then all the components on that page must be stateless So if you make a simple page with only 1 form (with some text fields) and that Form is a StatelessForm (instead of a norma Form component) then that page is stateless You can't call or set any property on a page to let the page be stateless. Because it all depends whats components or behaviors are on the page. If you add an ajax behavior then the page is not stateless if you add a normal link (instead of a StatelessLink) then it is not stateless The only thing the page can do is that it must have a default or page parameters constructor. johan On 4/20/07, ZedroS Schwart <[EMAIL PROTECTED]> wrote: > > Hi all > > I would like to "fork" the discussion "Issue with redirection to intro > page after logout" to discuss stateless and/ or bookmarkable pages in > Wicket 1.3. > > Indeed, Eelco said : > Off topic, I think it's good practice to make your login page a > stateless page (using a stateless form), so that users can have that > page in front of them for hours and then sign in without even being > bothered with a session expiry exception. In fact, it's probably good > practice to have the whole part of the site where you don't require > users to log in implemented as stateless and/ or bookmarkable pages. > My 2c. > > However, the wiki (there > > http://cwiki.apache.org/WICKET/stateless-pages.html#Statelesspages-Statelesspagesin2.0%2528andbackportedto1.3%2529 > ) says few and I would like to implement such pages so... I've some > questions ! As usual, I will update the wiki afterwards so it should > not be lost. > > In the source, I've seen that stateless pages are mainly pages where > the developer has to ovverride getStatelessHint as following : > protected boolean getStatelessHint() > { > return true; > } > > However, I've the following questions : > - how can I check my page is stateless ? Is calling getStatelessHint() > at the end of my page constructor enough ? > - do I just have to override the getStatelessHint for components > nested into others one ? For example, I would like to make my > LoginPage stateless. I'm using the SignInPanel from the examples, and > I've override the panel and form but the getStatelessHint() of the > page still says "false", so... Furthermore, on the page submit, > nothing happens anymore (the validation of the data isn't done as well > as the onSubmit). What did I miss ? > > Regarding Bookmarkable page, I've the following situation : my Login > page has a public constructor with no argument. As such, it should be > a Bookmarkable page (if I've understood properly the concept there : > http://cwiki.apache.org/WICKET/bookmarkable-pages-and-links.html ). > However, when, on logout, I invalidate the session and sent back the > user to the login page, the first login attempt gives back a "page > expired" error... What should I do ? > > Thanks in advance > > Best regards > ZedroS > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stateless and/ or bookmarkable pages in Wicket 1.3
if you want stateless page then all the components on that page must be stateless So if you make a simple page with only 1 form (with some text fields) and that Form is a StatelessForm (instead of a norma Form component) then that page is stateless You can't call or set any property on a page to let the page be stateless. Because it all depends whats components or behaviors are on the page. If you add an ajax behavior then the page is not stateless if you add a normal link (instead of a StatelessLink) then it is not stateless The only thing the page can do is that it must have a default or page parameters constructor. johan On 4/20/07, ZedroS Schwart <[EMAIL PROTECTED]> wrote: Hi all I would like to "fork" the discussion "Issue with redirection to intro page after logout" to discuss stateless and/ or bookmarkable pages in Wicket 1.3. Indeed, Eelco said : Off topic, I think it's good practice to make your login page a stateless page (using a stateless form), so that users can have that page in front of them for hours and then sign in without even being bothered with a session expiry exception. In fact, it's probably good practice to have the whole part of the site where you don't require users to log in implemented as stateless and/ or bookmarkable pages. My 2c. However, the wiki (there http://cwiki.apache.org/WICKET/stateless-pages.html#Statelesspages-Statelesspagesin2.0%2528andbackportedto1.3%2529 ) says few and I would like to implement such pages so... I've some questions ! As usual, I will update the wiki afterwards so it should not be lost. In the source, I've seen that stateless pages are mainly pages where the developer has to ovverride getStatelessHint as following : protected boolean getStatelessHint() { return true; } However, I've the following questions : - how can I check my page is stateless ? Is calling getStatelessHint() at the end of my page constructor enough ? - do I just have to override the getStatelessHint for components nested into others one ? For example, I would like to make my LoginPage stateless. I'm using the SignInPanel from the examples, and I've override the panel and form but the getStatelessHint() of the page still says "false", so... Furthermore, on the page submit, nothing happens anymore (the validation of the data isn't done as well as the onSubmit). What did I miss ? Regarding Bookmarkable page, I've the following situation : my Login page has a public constructor with no argument. As such, it should be a Bookmarkable page (if I've understood properly the concept there : http://cwiki.apache.org/WICKET/bookmarkable-pages-and-links.html ). However, when, on logout, I invalidate the session and sent back the user to the login page, the first login attempt gives back a "page expired" error... What should I do ? Thanks in advance Best regards ZedroS - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] stateless and/ or bookmarkable pages in Wicket 1.3
Hi all I would like to "fork" the discussion "Issue with redirection to intro page after logout" to discuss stateless and/ or bookmarkable pages in Wicket 1.3. Indeed, Eelco said : Off topic, I think it's good practice to make your login page a stateless page (using a stateless form), so that users can have that page in front of them for hours and then sign in without even being bothered with a session expiry exception. In fact, it's probably good practice to have the whole part of the site where you don't require users to log in implemented as stateless and/ or bookmarkable pages. My 2c. However, the wiki (there http://cwiki.apache.org/WICKET/stateless-pages.html#Statelesspages-Statelesspagesin2.0%2528andbackportedto1.3%2529 ) says few and I would like to implement such pages so... I've some questions ! As usual, I will update the wiki afterwards so it should not be lost. In the source, I've seen that stateless pages are mainly pages where the developer has to ovverride getStatelessHint as following : protected boolean getStatelessHint() { return true; } However, I've the following questions : - how can I check my page is stateless ? Is calling getStatelessHint() at the end of my page constructor enough ? - do I just have to override the getStatelessHint for components nested into others one ? For example, I would like to make my LoginPage stateless. I'm using the SignInPanel from the examples, and I've override the panel and form but the getStatelessHint() of the page still says "false", so... Furthermore, on the page submit, nothing happens anymore (the validation of the data isn't done as well as the onSubmit). What did I miss ? Regarding Bookmarkable page, I've the following situation : my Login page has a public constructor with no argument. As such, it should be a Bookmarkable page (if I've understood properly the concept there : http://cwiki.apache.org/WICKET/bookmarkable-pages-and-links.html ). However, when, on logout, I invalidate the session and sent back the user to the login page, the first login attempt gives back a "page expired" error... What should I do ? Thanks in advance Best regards ZedroS - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user