> Hi Eelco > > Thanks for the help. > > I've a question however : currently, I put an object containing the > Set as a final attribute of my Panel class, in order to be able to > increase/decrease its values depending of the action in the AjaxLink > onClick. > > However, having read about memory/session size, I wonder whether there > is a better way to do so.
I wouldn't be too worried about it. If it turns out to be too consuming, it should be easy to refactor this, right? > Indeed, I fear this Set will stay in Session > forever, which isn't needed nor wished. It won't, Wicket takes care for cleaning up stuff. What stays in RAM is always limited. > BTW, the Set in questionning isn't coming from the database, but will > later be saved into it. > > What would you advice ? It depends on how expensive that set is to create. If that is cheap, you could just create it only for the request, e.g. using a LoadableDetachableModel. And as a final note, always implement object identity (hashCode/ equals) properly. Some components (like dropdown lists) depend on that. And if you done that in a good way, it won't be a problem if you create the objects for just the request. Eelco ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
