yes, that's what I wanted to remove. I changed my code like this and it worked
smoothly now:
From the controller bean, removed the code:
| public void removeAnItem(Item anItem){
| entityManager.remove(anItem);
| }
|
In the entity bean ShoppingPlan, added this method:
| public void removeAnItem(Item anItem){
| this.items.remove(anItem);
| }
|
And in the .xhtml page, call the removeAnItem(item) method from the entity bean instead of
from the controller bean. Things are working, the item is removed from both the database
and the web page, I'm happy.
But I'm not sure _why_ the first approach, i.e. using entityManager to remove the item
always resulted in that exception....
Regards,
Ellen
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071923#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...