>no that not the rule >its just the other way around, >a page is stateless if it doesnt have statefull components in it >and the DDC generates a statefull link to itself so its self and because of >that it is statefull I totally understand that. The problem is exactly that and hence my post here. As I described even if one small component is statefull on the page, entire page becomes statefull and gets saved in the session along with all the classes referenced by that page. Just as a side note - I was getting OutofMemory exceptions due to too many sessions as a result of heavy crawling activity and the fact that bookmarkable pages were stateful causing essentially all the classes held on to by the httpsession causing server to go out of memory (2.6G) in 6 hours!! So this question is in an effort to clean bookmarkable pages up making them truely stateless
I have DDC inside its own form - not nested but independent form. In the view source it seesm like DDC just submits the form on onchange using javascript. I have tried making this enclosing form both statefull and stateless with the same behavior - the original page which contains the DDC is re-rendered instead of going to the setResponse page. The URL for the form which contains this only DDC looks like this ?wicket:bookmarkablepage=com.xxx.yyy&wicket:interface=:2:path:to:the:component:IFormListener This was the comment from you a while ago (2006) -What I understood from this was - if the url was like above, it means if the page didnt exist, it will be created and the listener method onselectionchanged should be called. What am I missing? Also can you please explain why the page becomes statefull if its being redirected to? e.g. in my onSubmit() if I set setRedirect(true); setResponsePage(BookmarkablePage.class, params) this will cause the bookmarkable page which is otherwise stateless to be statefull? http://www.nabble.com/how-do-stateless-components-and-pages-work-in-Wicket-2.0--td6441228.html#a6441228 >so you have the bookmarkablePage=xxx and the interface=xxx in the url. (or a mount with that interface=xxx) >When a request comes in for such an url. It fist checks the interface stuff (is the page still there) and if it finds >the page it goes on as a normal Interface request. If it isn't it becomes bookmarkalble interface request. >This means that the page is created just as a normal bookmarkable request but not only for rendering but >first it calls the interface that was asked for. Johan Compagner wrote: > > On Thu, Oct 16, 2008 at 6:16 PM, Ritesh Trivedi > <[EMAIL PROTECTED]>wrote: > >> >> Well if I understand it correctly, a component embedded inside (otherwise >> stateless) bookmarkable page checks if the page instance exists if not >> the >> page is to be newly created from the params or default constructor. So >> the >> page and the DDC doesnt necessarily have to be statefull. > > > no that not the rule > its just the other way around, > a page is stateless if it doesnt have statefull components in it > and the DDC generates a statefull link to itself so its self and because > of > that it is statefull > >> >> >> As about what I want to do - I just have a plain list of drop down items >> and >> depending on the one selected, I need to redirect to the bookmarkable >> page >> for the item. DDC values can just be ids which will be passed as >> bookmarkable param and will be used to look up the details of that >> entity. > > > what you could do is just override: > protected boolean getStatelessHint() > > and return true > > >> >> >> >> Johan Compagner wrote: >> > >> > It is statefull then because it has a callback to that page instance >> > and component. What do you want do do in the onchange method? >> > >> > On 10/15/08, Ritesh Trivedi <[EMAIL PROTECTED]> wrote: >> >> >> >> Hi, >> >> >> >> Is there a way to get stateless DDC with onchange notifications? Also >> >> would >> >> be helpful if someone could explain why the wantOnChangeNotification >> >> makes >> >> DDC stateful even if its enclosed within stateless form and in the >> >> stateless >> >> bookmarkable page? >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/Is-there-a-way-to-get-stateless-DDC-with-onchange-notification--tp19985764p19985764.html >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Is-there-a-way-to-get-stateless-DDC-with-onchange-notification--tp19985764p20015930.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/Is-there-a-way-to-get-stateless-DDC-with-onchange-notification--tp19985764p20027550.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
