Re: [Wicket-user] PagingNavigator (lazy) Session // BUG?
ahh i get it. So before the render a page should look if it is statefull or stateless (it knows that) And if it is statefull it should directly create the sessie (which will be done anyway when the page was getting rendered at some point) johan On 12/10/06, Korbinian Bachl [EMAIL PROTECTED] wrote: yeah - with session attached i mean that from this point on, you get the session assigned to the client (URL has sessionId) BTW: i just tried out the StatelessForm and StatlessLink and found out they they cant be used with IndexedUrlStrategy, as they dont encode in that case to path corretly (exception gets thrown by the IndexedUrlStrategy) Korbinian -- *Von:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *Im Auftrag von *Johan Compagner *Gesendet:* Sonntag, 10. Dezember 2006 15:17 *An:* wicket-user@lists.sourceforge.net *Betreff:* Re: [Wicket-user] PagingNavigator (lazy) Session // BUG? what is a session attached? You mean the sessionid in the url? johan On 12/10/06, Korbinian Bachl [EMAIL PROTECTED] wrote: So i don't get your story about head/main/footer why are parts of a page important for statelessness of the page? thats the point i dont understand either - currently, i would understand if 1 component is statefull, then everything gets a session, else it wouldnt - but currently in wicket2 it depends if the component is before or after the session-initializing component to trigger it... i mean, if you dig further you even could ask why we need a session if it might be initialised for 1 component to be swapped out to other components that dont rely on it to make a example: - page with 2 bookmarkablePageLinks (stateless here) and 1 form (stateful) currently it behaves, that if you put the form in front (html code that comes out) of the other 2 BookM. you get them with a session attached - if you put them in front of the form, they have no session, and if you split you get the behaviour I described before. What i think a nice solution would be to have each component find out if already a session exists and then look if its new or old and then decided to use it or not - e.g: a, you enter page /foo - no need to issue a session, only for the components that need them like form, link but not for others (session is only used if it will be needed on the resulting page / action) b, you enter page /foo;jsession=... -a session is issued to all components as it has to be transported as it might held necessary data However, as i dont know how the session is issued by wicket im not sure if this behaviour could be made. Best Regards, Korbinian -- *Von:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *Im Auftrag von *Johan Compagner *Gesendet:* Sonntag, 10. Dezember 2006 14:49 *An:* wicket-user@lists.sourceforge.net *Betreff:* Re: [Wicket-user] PagingNavigator (lazy) Session // BUG? If you use links or forms that are not stateless (see StatelessLink and StatelesForm) any where in the page the whole page is ofcourse not stateless and a session will be created. Bookmarkable Links are stateless so a page with only bookmarkable links will be stateless. If that is not the case then this is a bug. So i don't get your story about head/main/footer why are parts of a page important for statelessness of the page? johan On 12/9/06, Korbinian Bachl [EMAIL PROTECTED] wrote: Hi, i posted this underlying text ago, and missed to write in it that i dont use the default but a BookmarkablePages (with index-strategy) PagingNavigator. I assuemed that sth. was wrong with this but could now track it down to a strange wicket behaviour. If you have a page that has following parts: head main foot and put there a bookmarkablepagelink in head and foot, no session is issued. However if you put anything (!) in the middle that needs a session like a form, usual link or so, then we have following result: head : BookMarkablePageLink with no session issued main: any Component with session issued foot: BookMarkablePageLink with session issued (!) now the behaviour for the last one seems wrong, as we need no session there - or is this behaviour wanted that way? Because in that way you cant have any session-lazy app while using a searchform or any other session using component... or I'm wrong here? Best Regards Korbinian -- *Von:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *Im Auftrag von *Korbinian Bachl *Gesendet:* Freitag, 8. Dezember 2006 18:13 *An:* wicket-user@lists.sourceforge.net *Betreff:* [Wicket-user] PagingNavigator (lazy) Session Hi, im currently wondering why the PagingNavigator allways issue a session ? (im on wicket 2.0) I mean if i create a mainpage and link to 2 subpages all is fine and no session used. If i embed a PagingNavigator into any page a session will be created
Re: [Wicket-user] PagingNavigator (lazy) Session // BUG?
BTW: i just tried out the StatelessForm and StatlessLink and found out they they cant be used with IndexedUrlStrategy, as they dont encode in that case to path corretly (exception gets thrown by the IndexedUrlStrategy) Please make a unit test if you can then i can add that one to our unit test and fix it. johan - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] PagingNavigator (lazy) Session // BUG?
Yeah, thats what i thought - so you could have a page and only get a session if it is really needed... Regards, Korbinian _ Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Johan Compagner Gesendet: Mittwoch, 13. Dezember 2006 16:53 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] PagingNavigator (lazy) Session // BUG? ahh i get it. So before the render a page should look if it is statefull or stateless (it knows that) And if it is statefull it should directly create the sessie (which will be done anyway when the page was getting rendered at some point) johan On 12/10/06, Korbinian Bachl [EMAIL PROTECTED] wrote: yeah - with session attached i mean that from this point on, you get the session assigned to the client (URL has sessionId) BTW: i just tried out the StatelessForm and StatlessLink and found out they they cant be used with IndexedUrlStrategy, as they dont encode in that case to path corretly (exception gets thrown by the IndexedUrlStrategy) Korbinian _ Von: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Johan Compagner Gesendet: Sonntag, 10. Dezember 2006 15:17 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] PagingNavigator (lazy) Session // BUG? what is a session attached? You mean the sessionid in the url? johan On 12/10/06, Korbinian Bachl mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: So i don't get your story about head/main/footer why are parts of a page important for statelessness of the page? thats the point i dont understand either - currently, i would understand if 1 component is statefull, then everything gets a session, else it wouldnt - but currently in wicket2 it depends if the component is before or after the session-initializing component to trigger it... i mean, if you dig further you even could ask why we need a session if it might be initialised for 1 component to be swapped out to other components that dont rely on it to make a example: - page with 2 bookmarkablePageLinks (stateless here) and 1 form (stateful) currently it behaves, that if you put the form in front (html code that comes out) of the other 2 BookM. you get them with a session attached - if you put them in front of the form, they have no session, and if you split you get the behaviour I described before. What i think a nice solution would be to have each component find out if already a session exists and then look if its new or old and then decided to use it or not - e.g: a, you enter page /foo - no need to issue a session, only for the components that need them like form, link but not for others (session is only used if it will be needed on the resulting page / action) b, you enter page /foo;jsession=... -a session is issued to all components as it has to be transported as it might held necessary data However, as i dont know how the session is issued by wicket im not sure if this behaviour could be made. Best Regards, Korbinian _ Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Johan Compagner Gesendet: Sonntag, 10. Dezember 2006 14:49 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] PagingNavigator (lazy) Session // BUG? If you use links or forms that are not stateless (see StatelessLink and StatelesForm) any where in the page the whole page is ofcourse not stateless and a session will be created. Bookmarkable Links are stateless so a page with only bookmarkable links will be stateless. If that is not the case then this is a bug. So i don't get your story about head/main/footer why are parts of a page important for statelessness of the page? johan On 12/9/06, Korbinian Bachl [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, i posted this underlying text ago, and missed to write in it that i dont use the default but a BookmarkablePages (with index-strategy) PagingNavigator. I assuemed that sth. was wrong with this but could now track it down to a strange wicket behaviour. If you have a page that has following parts: head main foot and put there a bookmarkablepagelink in head and foot, no session is issued. However if you put anything (!) in the middle that needs a session like a form, usual link or so, then we have following result: head : BookMarkablePageLink with no session issued main: any Component with session issued foot: BookMarkablePageLink with session issued (!) now the behaviour for the last one seems wrong, as we need no session there - or is this behaviour wanted that way? Because in that way you cant have any session-lazy app while using a searchform or any other session using component... or I'm wrong here? Best Regards Korbinian _ Von: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Korbinian Bachl Gesendet: Freitag, 8. Dezember 2006 18:13 An: wicket-user@lists.sourceforge.net Betreff: [Wicket-user