Hey guy's:
     I am a little confused from what Ted stated:
     "People often have trouble using Vectors with the Struts tags. They are
really designed to work best with the new Collection objects or with
simple arrays. My best advice would be to have a property like"

Object[] getCollection() {
  return vector.toArray()
}

I have been using application scoped Vectors that go directly into a
logic:iterate tag with no problem . The Java doc for the java.util Vector
states:
     "As of the Java 2 platform v1.2, this class has been retrofitted to
implement List, so that it becomes a part of Java's collection framework."

We are slowly cleaning up a JSP appwe have and for starters, I have been using
the standalone taglib where I can.  We have chosen the Vector as or "standard"
collection.

Is there more I should consider?






Ted Husted <[EMAIL PROTECTED]> on 03/19/2002 11:04:43 AM

Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]>

To:   Struts Users Mailing List <[EMAIL PROTECTED]>
cc:

Subject:  Re: How can I used html:select with a  Collection of String


"People often have trouble using Vectors with the Struts tags. They are
really designed to work best with the new Collection objects or with
simple arrays. My best advice would be to have a property like"



Object[] getCollection() {
  return vector.toArray()
}

But if you search the mail-archives, there have been several threads
about this.

http://www.mail-archive.com/struts-user%40jakarta.apache.org/

If you come up with a good answer, I'll put in the newbie FAQ we're
constructing.

http://jakarta.apache.org/struts/newbie.html

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


"Aroui, Dr. Djelloul" wrote:
>
> myCollection is a Vector of Integer. I dont need property or labelProperty.
> How can I use the select with a Collection.
>
> <html:select property="id">
> <html:options collection="myCollection"/>
> </html:select>
>
> please any help
>
> thanks
>
> --
> 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