struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lowe <>
Subject Re: Using ArrayList instead of String[] properties
Date Tue, 13 Jan 2004 15:05:53 GMT
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 []
>> 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:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message