Holding on to them in a page is synonymous with holding on them in the session if you're using the default session store. Wicket gives you several ways around this. One - don't hold on to them in the page. Don't allow a page or component to have instance variable that are non-serializable, or allow them to be transient and make something else look them up on page / component creation. Two - disable the storing of pages in the session. Three - hold on to them in a loadable detachable model that has just enough information to look them up, i.e.:
add(new Label("foo", new LoadableDetachableModel<Flyweight>() { protected Flyweight load() { return Flyweight.lookup("some-id"); } }); Done - it's not held on to in the page, it never goes in session. Maybe your usecase is just much more extensive than what we're understanding. All I'm trying to say is that Wicket doesn't force you to hold anything, anywhere. It doesn't force you to serialize anything. If you want the convenience of saying new Model(myFooBarObject), then you let it be Serializable. If you don't want that, you use a detachable model. This is pretty global across any web application - if you hold something in session, it needs to be serialized. Or, if you have the requirement to recreate that page later, you need to store a lookup for it somewhere - client or server side. Many frameworks force you to serialize things in funny ways to the client side. I prefer Wicket over that any day. Anyway, I hope one of these helps you in some way. This is probably my last email on this thread because I must not be understanding your scenario completely. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Jul 24, 2008 at 3:40 PM, Fabrizio Giudici < [EMAIL PROTECTED]> wrote: > > On Jul 24, 2008, at 22:32 , Jeremy Thomerson wrote: > > There are other, just as simple options. A couple of examples below. >> >> Really, you're not being "forced" to do this by Wicket. If you want to >> hold >> *anything*, in *any* framework, in the HTTP session, it should be >> > > ... > > I'm only disagreeing on the part about it being Wicket forcing you to do >> it. >> > > Guys, but I'm ___not___ talking of the session :-) I'm not putting those > things in the session. The problem is with __pages__ that get serialized, I > think because they get into the session for the versioning. So it's Wicket > doing that, right? > > > -- > Fabrizio Giudici, Ph.D. - Java Architect, Project Manager > Tidalwave s.a.s. - "We make Java work. Everywhere." > weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog > [EMAIL PROTECTED] - mobile: +39 348.150.6941 > > >