Hi Laurent,
Thanks for the good example of an indeed complex form.
Sorry I can't answer your question or realy give better advice. But some
comments:
Then I used the DataView of wicket-extensions. I only had to write a
custom ReuseIfModelObjectsEqualStrategy in order to make it work ( I
think I could also have written a custom Model and reimplement the
equals() method to answer true if the model objects were equal).
ReuseIfModelObjectsEqualStrategy is a good idea (much better than
extending ListDataProvider and Model). Maybe Igor could take it into
extensions.
BUT : (and there is -finally- !) the question:
Is there a way with the current stage of wicket that could have helped
me not doing concrete invocations of models ?
Because I'm not so happy with the fact that the models of my Items'
DataView embark the instances of childs of the parent MonkeyTeam
object.
What I wanted to do was just to use the index in the bean, but the
problem is that this does not work well with adding / deleting
bananas, because the Component is lost between the old and new index
(because Item components load their models from the list, whose list
has already changed when the Strategy is called ... and the models are
lazy initialized!)
Unfortunately I do not understand why your components (items) get lost
when you use the ReuseIfModelObjectsEqualsStrategy and the domain-objects
are equal (or have the same identity if the domain-objects do not
implement equals/hasCode - as in your case). I also do not see where the
domain-objects (in the domain-model) are lost and recreated. Maybe you
could give me a hint to understand your question better.
Christian Essl
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user