struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Taylor" <rtay...@mulework.com>
Subject RE: Submitting Indexed Properties and List Size/Resize
Date Tue, 06 Jul 2004 19:36:24 GMT
David, take a look at lazyList here:
http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/ListUtils.html

robert

> -----Original Message-----
> From: Ellingson, David [mailto:David.Ellingson@NielsenMedia.com]
> Sent: Tuesday, July 06, 2004 3:22 PM
> To: 'user@struts.apache.org'
> Subject: Submitting Indexed Properties and List Size/Resize
> 
> 
> I wanted to verify whether I am understanding the best way to submit indexed
> properties to an ActionForm.
> 
> I was originally having problems with ArrayOutOfBoundsExceptions when
> submitting the Form, and, after some research, it looks like the framework
> is expecting the List to be prepopulated before it can be populated with the
> Request parameters.  While this can be done in the constructor, it seems the
> best way is to dynamically resize the collection in both the get and set
> index methods.  For example, if a get() is called for index 10, and records
> don't exist up to the 10th record, I can add the additional records up to
> the 10th element.  This works fine, but it seems a little awkward, so I
> wasn't sure if I am missing something here.  
> 
> Is this the best way to submit indexed properties to an ActionForm?
> 
> Thanks,
> Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message