struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Galbreath, Mark" <Galbre...@tessco.com>
Subject RE: iterate tag usage
Date Tue, 12 Feb 2002 21:47:38 GMT
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>


Mime
View raw message