struts-user mailing list archives

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

 Scott,

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=
"true">

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.


Regards,
Sesha




                                                                                         
                                       
                    Scott Carlson                                                        
                                       
                    <scottcarlson@        To:     Struts Users Mailing List <struts-user@jakarta.apache.org>
                    
                    yahoo.com>            cc:                                         
                                          
                                          Subject:     Re: Select Tag                    
                                       
                    18.06.2002                                                           
                                       
                    22:23                                                                
                                       
                    Please respond                                                       
                                       
                    to "Struts                                                           
                                       
                    Users Mailing                                                        
                                       
                    List"                                                                
                                       
                                                                                         
                                       
                                                                                         
                                       




Sesha,
   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" />
</html:select>

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" <sesha.konda@wipro.com>
> To: struts-user@jakarta.apache.org
> 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,
how
> 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
takes
> 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
http://fifaworldcup.yahoo.com

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

(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.
Mime
View raw message