Nightly build version can use implementations of the java.util.List 
rather than having to get back the primitive array object. Makes things 
easier to work with.

Returning the Object[] actually renders everything but ArrayList style 
collections useless because the mapped collections and such don't know 
how to update from an index. Returning the array from an ArrayList 
itself isn't that big a hit, as it's backed by such an array anyways.

Arron.


Ian Tomey wrote:

>ahh, just paid more attention to your example code :-) 
>
>  
>    public BunchBean() {
>      this.bananaList = new ArrayList();
>      this.bananaList.add(new BananaBean());
>      this.bananaList.add(new BananaBean());
>      this.bananaList.add(new BananaBean());
>    }
> 
>    public Object[] getBananaList() {
>      return this.bananaList.toArray();
>    }
>
>
>could this potentially be a bit of a performance killer ( the .toArray() ) stuff with 
>some collection types?
>
>cheers
>Ian
>
>
>>>>[EMAIL PROTECTED] 03/07/02 12:31pm >>>
>>>>
>Who's fixing the number of records?... The tags will happily do whatever 
>with what they're given. The monkey example adds and deletes objects in 
>the various lists with ease.
>
>You could even map the bean properties to access columns in a result 
>set. Wouldn't be on the "best practice" list however :)
>
>Arron.
>
>
>Ian Tomey wrote:
>
>>Hi Arron,
>>
>>Had a quick look at it, seems like what I need. One gotcha though is that the number 
>of records is not fixed, so the creation of the array of row objects in the form 
>constructor has to be bigger than the max size expected. I'm hoping that 
>actionForm.reset is called before bean population then I can init the size of the 
>array from looking up the param. ugh, an ugly kludge.
>>
>>good work BTW.
>>
>>Cheers
>>Ian
>>
>>>>>[EMAIL PROTECTED] 03/06/02 05:24pm >>>
>>>>>
>>If you're on a nightly build, you'll have the nested extension already 
>>there. It will help you make light work of iterating objects.
>>
>>For a pimer and tutorial, go here...
>>http://www.keyboardmonkey.com/struts 
>>
>>And for mor implementation detail for each of the tags, the Struts site 
>>has the most complete info.
>>
>>Arron.
>>
>>Ian Tomey wrote:
>>
>>>Hi all,
>>>
>>>Got an array of records and I want to put them onto the screen to edit. What is the 
>technique to go about this? (i am using the nightly 1.1 at the moment)
>>>
>>>is it create an action form that maps a single record and create a load of them? or 
>create an action form with the properties being arrays of the information?
>>>
>>>one form in total or one form per record?
>>>
>>>i take it the indexed= attribute for the html tags is going to be useful?
>>>
>>>It's not obvious how to do this and I just dont have time to expriement (deadline 
>to meet). Any help appreciated
>>>
>>>Cheers
>>>Ian
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>>>
>>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>>
>>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to