On 12/13/05, Christian Essl <[EMAIL PROTECTED]> wrote:
ReuseIfModelObjectsEqualStrategy is a good idea (much better than
extending ListDataProvider and Model). Maybe Igor could take it into
extensions.


I did not put this strategy in extensions on purpose. The reason being is that this can really get you in trouble when dealing with detachable models. Imagine changing a page and having all the model's from last page load as well as all the models on this page. The idea behind ifmodelequals was that when you compare detachable models you can just compare the database ids of objects they point to instead of loading the objects from the db.

but if you guys really want it in there i guess i can add it.



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.


I do not undestand the question either. Maybe you can provide some code pointers and rephrase it. Also maybe a unit test that displays the problem so that i can clearly see what it is.

-Igor

 

Reply via email to