-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

Jean Tremblay wrote:
> [...]
> This error would occur with normal collections if you try to
> remove items while iterating over it.
> 
> You must use the iterator.remove().
> http://java.sun.com/j2se/1.5.0/docs/api/java/util/ConcurrentMo
> dificationException.html 
> 
I know that there is a problem if one remove an object from a List at the
same time if I would iterate of it. But I didn't touch the List. The Problem
is that tapestry somehow iterate over the List at the same time, as my
button listener is active. I fixed the problem, now i just mark the element
in the button listener method and remove the object in the Form listner. I
don't think that this is a good solution, but it works.

Thanks for help.


> On 6/9/05, Robert Zeigler <[EMAIL PROTECTED]> wrote:
>> I'm not sure what you're trying to accomplish, but...
>> it you might try looking at the palette component (in the contrib
>> library). You give a list of available options (through a property
>> selection model), and the user can add or remove "selected" options
>> to a list... 
>> 
>> Robert
>> 
>> [EMAIL PROTECTED] wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>> 
>>> Hi,
>>> 
>>> i'm a little bit confused. I have a List with some Objects, depended
>>> on what the user chose. The User can add more Objects to this List
>>> with a PropertySelection and a button. That works fine.
>>> 
>>> <property-specification name="chosenProjects1"
>>> type="java.util.List" persistent="yes"/> (getter and setter are
>>> abstract) 
>>> 
>>> <component id="addProj1" type="Submit">
>>>       <binding name="listener" expression="listeners.addProj1"/>
>>>       <static-binding name="label" value="Hinzufuegen"/>
>>> </component> 
>>> 
>>> I'd like to delete also some Objects from the List with a button.
>>> The application can delete the object from the List, but if it's not
>>> the last object in the List, i get an
> java.util.ConcurrentModificationException.
>>> 
>>> <component id="eachProjects1" type="Foreach">
>>>       <binding name="source" expression="chosenProjects1"/>
>>>       <binding name="value" expression="projectAccess"/>
>>>       <static-binding name="element" value="div"/> </component>
>>> 
>>> <component id="delProj1" type="Submit">
>>>       <binding name="listener" expression="listeners.delProj1"/>
>>>       <binding name="tag" expression="projectAccess"/>
>>>       <binding name="selected" expression="delProject1"/>
>>>       <static-binding name="label" value="Entfernen"/> </component>
>>> 
>>> Does anyone can help me with that problem?
>>> 
>>> Best Regards,
>>> 
>>> Mathias
>>> 
>>> - --
>>> Mathias Herkt (Diplomand)    | SQS Software Quality Systems AG
>>>                              | Stollwerckstrasse 11
>>> Phone:+49 2203/9154-7110     | D-51149 Cologne, GERMANY
>>> Fax:+49 2203/9154-15         | http://www.sqs.de
>>> 
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.1 (MingW32)
>>> 
>>> iD8DBQFCqBlT8hWAS3IShqURAiM8AJ4zn4hbpLzfHg1uRs5qpJWoybfhZACfSd+s
>>> M4Qcn8HFKXop3UTjgxfoc2o= =5P/p
>>> -----END PGP SIGNATURE-----
>>> 

Mit freundlichen Gr��en

- -- 
Mathias Herkt (Diplomand)     | SQS Software Quality Systems AG
                              | Stollwerckstrasse 11
Phone:+49 2203/9154-7110      | D-51149 K�ln
Fax:+49 2203/9154-15          | http://www.sqs.de

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)

iD8DBQFCrTKh8hWAS3IShqURAsu4AJ9aiQAXoQr1VTM5vHpL6PFp6ZNiagCfYSu+
IvG55bucHQAehEn1BF6VsRY=
=bypf
-----END PGP SIGNATURE-----

Reply via email to