[jboss-user] [JBoss Seam] - Re: How to update @DataModel and its ListDataModel?

bfo81 do-not-reply at jboss.com
Tue Aug 1 07:57:29 EDT 2006


FOUND THE SOLUTION!

DataModelBinder.isDirty(): This method compares the DataModelList's List with the List annotated by @DataModel to determine if the wrapped List has changed.

And how are two lists compared? list1.equals(list2). This happens by first comparing the sizes of both lists and, if they are equal, comparing the elements pairwise by calling their equals() method.

And that's the point: My equals() method implemented in the Person class just compared the class and getId(), but not the contents of the Person. Maybe this is where the @Version annotation could come into play ;).

Maybe this is helpful for someone who runs into the same problem ;).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962128#3962128

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962128



More information about the jboss-user mailing list