on, it doesn't delete the bean.
Al.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Matthew Hixson
Sent: 10 September 2003 07:40
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Removing items from a CMR collection
Thanks, Scott. I got this work
ehalf Of
> Matthew Hixson
> Sent: 10 September 2003 07:40
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Removing items from a CMR collection
>
>
> Thanks, Scott. I got this working.
>
> public boolean emptyCart(CartLocal cart) {
> Collection cartContentLi
Thanks, Scott. I got this working.
public boolean emptyCart(CartLocal cart) {
Collection cartContentList = cart.getCartContentList();
Iterator i = cartContentList.iterator();
while(i.hasNext()) {
i.next(); // advance the pointer down the list
i.remove();
}
retu
This is basic java.util.Collection behavior. From the java.util.Iterator.remove
javadoc:
public void remove()
Removes from the underlying collection the last element returned by the
iterator (optional operation). This method can be called only once per call to
next. The behavior of an iter