RE: java.util.ConcurrentModificationException

2006-03-20 Thread James Carman
Do you really want to put the current Post object back into the postList (which is what's causing a CME)? Are you attempting to make postList basically a concatenation of itself? -Original Message- From: Nima Boustanian [mailto:[EMAIL PROTECTED] Sent: Monday, March 20, 2006 11:47 AM To

Re: java.util.ConcurrentModificationException

2006-03-20 Thread Adam Zimowski
Hi Nima, You can't modify your list using iterator, because it changes the state and the iterator "gets confused", so you're getting the exception. If you want to populate the list, do a simple loop and invoke add(Object) method. Use iterator only to read list content, or update objects stored in

Re: java.util.ConcurrentModificationException

2006-03-20 Thread Wayland Chan
Take a look at the javadoc for ConncurrentModificationException. When you're iterating a collection, you cannot add/remove from that collection. On 3/20/06, Nima Boustanian <[EMAIL PROTECTED]> wrote: > > Hey all > > I keep getting this java.util.ConcurrentModificationException when I try > to ad

RE: java.util.ConcurrentModificationException

2005-04-03 Thread David Leangen
Wow! That was a really fast reply! Thanks! Ok, that makes sense. I'll give that a try. Thanks for the insight. Dave > -Original Message- > From: Viktor Szathmary [mailto:[EMAIL PROTECTED] > Sent: 4 April 2005 11:27 > To: Tapestry users; [EMAIL PROTECT

Re: java.util.ConcurrentModificationException

2005-04-03 Thread Viktor Szathmary
Hi, You have a Foreach that iterates thru your collection. The remove listener is invoked inside the Foreach. You will want to change your loop so it operates on a clone of the data, like so: viktor On Apr 3, 2005 10:23 PM, David Leangen <[EMAIL PROTECTED]> wrote: > > Hi, Kent, > > Thanks

RE: java.util.ConcurrentModificationException

2005-04-03 Thread David Leangen
Hi, Kent, Thanks for the reply. (Comments below) > > I have a table in which I use a Foreach to add rows. > > > > When I click on one of the buttons in the table, I am getting a > > java.util.ConcurrentModificationException (full stack trace below). > > The collection is being modified while an

Re: java.util.ConcurrentModificationException

2005-04-03 Thread Kent Tong
David Leangen canada.com> writes: > > I have a table in which I use a Foreach to add rows. > > When I click on one of the buttons in the table, I am getting a > java.util.ConcurrentModificationException (full stack trace below). The collection is being modified while an iterator is iterating o