struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arron Bates <arr...@pacific.net.au>
Subject Re: iterate tag usage
Date Wed, 13 Feb 2002 03:26:08 GMT
Mark,

You're absolutely correct.

As for the "you can't use Object[]" stuff.... read the code.
Primitive arrays are perfectly fine, and most likely faster again than 
ArrayLists.

Arron.


Galbreath, Mark wrote:

>You should type with interfaces, not classes:
>
>private List vector;
>
>And unless you need synchronization, a ListArray is about 25 percent faster
>than a Vector.
>
>:-)
>
>Mark
>
>-----Original Message-----
>From: Moritz Petersen [mailto:devmaillist@pnpconsult.com]
>Sent: Tuesday, February 12, 2002 3:33 PM
>To: Struts Users Mailing List
>Subject: RE: iterate tag usage
>
>
>Hehe, nope. ;-)
>
>Look: the return value of the getXYZ() method must be a
>java.util.Collection, Iterator etc. but _not_ an array. By the way: your
>code would not even compile.
>
>private Vector listVector;
>// A Vector implements the Collection interface. That is good.
>
>public Vector getListVector()
>// This works. "Vector".
>
>Have fun!
>
>Moritz.
>
>P.S.: What the hell is "VectorString"?
>
>>Thanks for your info! Do you think the following will work?
>>
>><logic:iterate id="regList" name="RegForm" property="listVector">
>><bean:write name="regList" property="listVector"/>
>></logic:iterate>
>>
>>   private Vector listVector;
>>
>>   public VectorString[] getListVector()
>>   {
>>      return listVector;
>>   }
>>
>>Thank you again!
>>
>
>
>--
>To unsubscribe, e-mail:
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
><mailto:struts-user-help@jakarta.apache.org>
>
>--
>To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>
>




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


Mime
View raw message