hello, I have the following code <nested:iterate id="outageElement" name="geSearchForm" property="geOutages"> <nested:checkbox property="includedInEolReport" /> </nested:iterate>
if the underlying Collection (geOutages) is a List (e.g. ArrayList), this works fine, and the checking/unchecking of the checkboxes work fine. For some reason, I want to only have unique items in my collection, so I change the ArrayList to a HashSet. I then get the following error: 10:53:21,877 ERROR [Engine] ApplicationDispatcher[/oisweb] Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Invalid argument looking up property geOutages[0].includedInEolReport of bean geSearchForm I add the 'name' attribute to my nested:checkbox <nested:iterate id="outageElement" name="geSearchForm" property="geOutages"> <nested:checkbox name="outageElement" property="includedInEolReport" /> </nested:iterate> Then the code compiles and the checkboxes are displayed correctly. However, changes to the values of the checkboxes does not work anymore; they are just ignored. I though this might be because of the ordering of the items in a HashSet not being defined, but using a TreeSet or a LinkedHashSet does not seem to make any difference. So my question is: does Struts need an indexable Collection for SETTING values? Like ArrayList, which have get(index i) and set(index i, Object o)? A Set like HashSet or TreeSet does not have any get/set-methods, but are relying on add/remove-methods instead. This does not seem to be sufficient? Any help would be appreciated. cheers, pj