Thanks you for the advices. I wasn't using Model in this precise case. I thought using Model was a best practice, to save memory. Indeed I understand that using Mdel is mandatory, if you want avoid strange behaviour. IMHO using LoadableDetachableModel is an extra cost, (cpu, time, design) not necessary for simpler cases.
I did't find out how to desactivate Serialization now, I use statefull components, but not versioned pages. I don't use "new Page()" twice for the same page in my application, I know exactly how many Page instance will be created, and what is in. So I don't need page serialization to disk... I will do differently, but I'm a bit sad. Maybe it's possible to create one page and work with Panel replacement... Regards 2009/12/9 Marat Radchenko <slonopotamusor...@gmail.com> > 2009/12/9 Yves-Marie LAINÉ <ymla...@gmail.com>: > > (But put Serializable in Session doesn't mean to put Serialized in > Session) > Uh? > > > And it seems that wicket Serialize each Page one by one. This way if you > > have a single object instance that you share between pages as object > > property, after pages serialization, if you have ten page referencing > your > > object you will have ten copies of your object, while you think you have > > only one. > I guess, it just means you use default serialization strategy (you're > using org.apache.wicket.model.Model, aren't you?) but expect it to do > something custom. > > > It's a known serialization drawback. And it's what I want to get > > arround, when Serialization is not needed. > Use proper models. For example, HibernateObjectModel from databinder > doesn't serialize whole persistent entity but just its primary key + > class. So on subsequent requests object state is loaded again from db. > > Also, I think you skipped one of my points - wicket will _only_ > serialize page if there's stateful component on it. It is absolutely > possible to use wicket without any serialization at all (although you > must not use stateful components then). @StatelessComponent from > wicket-devutils is an invaluable tool to enforce such practice. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >