Person person = new Person();

CompoundPropertyModel personModel = new CompoundPropertyModel(person);
Component parent = new Component("personPanel", personModel);
Component child = new Component("addressPanel", new CompoundPropertyModel(new PropertyModel("address", personModel)));

Just for my understanding: The above code example will also not work in wicket 1.2.2 right? If I look in AbstractPropertyModel, then the object passed in to PropertyModel is saved as a non-transient variable so a copy is created with onModelChanging().

no this is what we talk about that we try to fix.
 

To Johan:
As for a custom serialization option, isn't it an option to provide a custom serialization for model objects by providing the following methods in a model implementation?

private void writeObject(java.io.ObjectOutputStream out)
     throws IOException
 private void readObject(java.io.ObjectInputStream in)
     throws IOException, ClassNotFoundException;

No but what does that solve?
And remember we don't want to serialize to a byte array. That is just a quick way todo a deep clone
If possible i don't want to do that. I just want to copy the real values of everything
And if that is completely feasible i don't know but i think we could make this to work
And if it works and if it is pretty quick we could do it for the complete page. just make a snapshot by object graph of the complete
page when the page is asked for. And when it is called on we get another object graph compare it and keep only the changes in a undo buffer and make a page version.
Then nobody has to make undo change objects or call model changing. it is fully automatic.

johan


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to