jensiator wrote: > Thanks Igor > In my code I started with with a LDM initialized with the modelobject > itself. But it if the modelobject dont implement serializable I get > serialize exception for the modelobject(e.g. contact). My assumption is that > the modelobject is being serialized to the session. I thought that the LDM > is a model you use when you dont want to serialize the model to the > session(http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels). > > But in the end,as jwcarman wrote, wicket handles the session with disc > writing so it probably no problem. But if its so that the LDM is serializing > the modelobject in session when you initialize the LDM with it, could I not > just use a basic Model instead? > Jens Alenius > The modelobject should not be serialized with the model. In case you have subclassed LDM and made it keep any references of your own to the object (which BTW I do not recommend), make sure that they are declared transient to achieve this. Transient attributes are ignored during serialization and set back to null when deserialized. This causes the LDM to (re-)load the object the first time it is requested after deserialization.
Cheers Edmund -- Liland ...does IT better Liland IT GmbH Software Architekt email: [EMAIL PROTECTED] office: +43 (0)463 220-111 | fax: +43 (0)463 220-288 http://www.Liland.at --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
