I have one field outjected by @DataModel annotation on SFSB on a long 
conversation. This field is a List of Entity  Beans (query populated). When 
user click to add, I put a new instance on list and outject this instance for 
editing. On save action, I persist this instance and query again, but the 
equals/hash don't change because database id isn't relevant for equality. When 
user try edit this entry, save duplicate the entry (just in this case).

I figured out the problem is (from @DataModel JavaDoc):

anonymous wrote : 
  | (...) Note that the List, Map, Set or array will be re-wrapped and 
re-outjected each time the current component value is different to the value 
held by the context variable as determined by calling equals() on the 
underlying collection.
  | (...)
  | 

My solution was: (before query again on save)


  | Contexts.getConversationContext().remove("myList");
  | //...
  | 

Is possible do this simpler or more manageable?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994202
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to