person = em.createQuery("from Person");
persons = em.createQuery("from Person");
with an "s", of course ;).
I wish there would be an edit function here ^^.
Because the datamodel uses the object.equals() method to check whether the object has changed.
I fell foul of this as well.
Implement a more thorough equals expression, and datamodel should then realise it needs to push the information out to jsf.
Hope this helps,
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 ;).
@js8523: Thanks for your help. I started writing my post before your answer was there.