Re: Correct way to deal with serialization and casting

2009-02-13 Thread pieter claassen
Ok, feedback on my own problem. It seems that if you create a private variable and assign an IModel to it, then access it from within the onClick() method in a listview, that it doesn't always work. You have to explicitly add the model to the Link constructor for this to work. It seems that the

Re: Correct way to deal with serialization and casting

2009-02-13 Thread Igor Vaynberg
if you add a private variable that is imodel you have to detach it yourself, perhaps that is your problem. you do this by overriding ondetach() { field.detach(); super.ondetach(); } -igor On Fri, Feb 13, 2009 at 1:36 AM, pieter claassen pie...@claassen.co.uk wrote: Ok, feedback on my own

Correct way to deal with serialization and casting

2009-02-12 Thread pieter claassen
Just to make sure I understand this correctly. 1. Line 2: By storing an IModel mywebmodel that nulls the object reference onDetach(), on my webpage, is ok for serialiazation? 2. Line 8: When I cast the IModel to MyObject, is there a way to make this more safe at compile time? 3. Line 8: object is