struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sesha Konda" <>
Subject Re: Select Tag
Date Wed, 19 Jun 2002 15:28:06 GMT


Thank you for the response. What I had in mind was the use of value
attribute with select tag

<html:select name="testBean" property="label" value="ClauseName3" multiple=

value attribute takes only a String for pre selection. If I would require
to select more than one option, how should I go about that.


                    Scott Carlson                                                        
                    <scottcarlson@        To:     Struts Users Mailing List <>
          >            cc:                                         
                                          Subject:     Re: Select Tag                    
                    Please respond                                                       
                    to "Struts                                                           
                    Users Mailing                                                        

   I have this code in my jsp. Notice the multiple attribute.
<html:select multiple="true" property="accountType" >
           <html:option value="">Select Type</html:option>
           <html:options  name="createaccount" property="accountTypes" />

In my form bean, the property is an array of Strings.
           private String accountType[];
           public void setAccountType(String parm[]) { accountType = parm;
           public String[] getAccountType() { return accountType; }

Does this answer your question?

> From: "Sesha" <>
> To:
> Subject: Select Tag
> Date: Tue, 18 Jun 2002 09:03:03 -0700
> This is pertaining to Select Tag.
> Is it is possible that value attribute in select tag can take a String
> array.
> When I select multiple items in the select and submit to the same page,
> can we retain these values. Presently I am able to reatin only one of the
> selected values. I notice that the value attribute in the select tag
> only a String. Is there a work around for this that you might know.
> Thank You
> Sesha

Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

(See attached file: Wipro_Disclaimer.txt)

The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.
View raw message