Eduardo1
(Eduardo Frazão)
March 31, 2011, 10:17pm
1
Hi all!
I have tree items on a BeanItemContainer, that represents POJOS on my Database.
When I try to remove a specific item (One of the POJOS), the method removeItem returns false, and the item is not removed. No exception is trowed.
The other items removes ok. I cant belive on a thing like that. Its really strange.
Always the same entity.
Heres the code:
User usr = (User) tblExecutoresContainer.getItem(tblExecutores.getValue()).getBean();
tblExecutoresContainer.removeItem(usr);
If someone could help how to debug it. Im using Vaadin 6.5.4.
Many thanks
Henri2
(Henri Sara)
April 1, 2011, 10:52am
2
I have tree items on a BeanItemContainer, that represents POJOS on my Database.
When I try to remove a specific item (One of the POJOS), the method removeItem returns false, and the item is not removed. No exception is trowed.
The other items removes ok. I cant belive on a thing like that. Its really strange.
I suspect the bean you are trying to remove is not the original instance you added, and the equals() and/or hashCode() methods for the bean do not behave correctly.
If this is not the problem, some more details are probably needed, but you could try putting a breakpoint in removeItem() in that case.