Using arrayList as a form property works fine with action forms dyna or
otherwise. In fact IMO it makes like simpler. As i recall you were
trying to iterate through a map of forms not an arraylist.
On 13 Jan 2004, at 14:28, Wendy Smoak wrote:
>> From: Robert Taylor [mailto:rtaylor@mulework.com]
>> Unless I've missed something, I don't see the need to using indexed
>> properties here if the selected value is single String and
>> order doesn't matter.
>
> After much consideration, neither do I! I thought ArrayList would be
> easier to deal with, but it turns out that String[] is the right type
> to
> use in the form bean [which has a Map because it's a
> DynaValidatorForm].
> My entire purpose in switching to ArrayList was to avoid the inevitable
> out of bounds exceptions in the Action code. But that's easily done by
> (something like) Arrays.asList() at the top, and then myList.toArray()
> at the end.
>
> Another Struts learning experience. Thanks for the help!
>
> --
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
|