On 12/5/05, Konstantin Ignatyev <[EMAIL PROTECTED]> wrote:
>
> The same trick with deferred method execution would do the trick,
>
> http://article.gmane.org/gmane.comp.java.tapestry.user/19946/match=ignatyev+submit
> or simply set ID of the element to delete in the listener but perform
> actual deletion in the onSubmit method of the form.
>
>
> isaac n <[EMAIL PROTECTED]> wrote: Hello everyone,
>
> I have a @For component that's based on a list of objects. The @For
> component is set up with "delete" buttons for each row, so that clicking
> the
> button deletes that row.
>
> The problem is, after the Delete button's listener gets called, Tapestry
> throws a ConcurrentModificationException.  I dug deeper and noticed that
> the
> ForBean (which underlies @For) is using an iterator which was created
> before
> the element was removed from the list -- which is what causes the
> exception.
>
> I imagine this is a common issue, since it should be possible to remove
> elements from a @For component without breaking it. Is there a standard
> solution to this problem?
>
> Thanks!


Thanks.  I was considering using deferred execution, but was hoping that
Tapestry had a more streamlined way of doing this.  Too bad it doesn't.

Reply via email to