struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Balakrishnan <vbalakrish...@northpacific.com>
Subject RE: A column consisting of html:select widgets
Date Mon, 21 Jul 2003 19:00:18 GMT
Have you tried using a separate ViewAction for the display and a
SubmitAction for the submittal.The ViewAction could populate the data from
the DB and set multiple selected values depending on the values in the DB.

Vijay

-----Original Message-----
From: atta-ur rehman [mailto:attar@numetrics.com] 
Sent: Monday, July 21, 2003 11:27 AM
To: Struts Users Mailing List
Subject: Re: A column consisting of html:select widgets


Thanks Amit.

And that's exactly what i'm doing! Still i fails to show the correct option
for the dropdowns.

Are you sure its available in struts 1.0? moreover, is my approach to define
String[] getter/setter is correct?

ATTA

----- Original Message ----- 
From: "Amit Kirdatt" <Amit.Kirdatt@Ingenix.com>
To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
Sent: Monday, July 21, 2003 10:58 AM
Subject: RE: A column consisting of html:select widgets


> Atta,
>
> In your JSP page do the following
>
> <html:select property="item">
> <html:options collection="myOptions" property="value" 
> labelProperty="label"/> </html:select>
>
> Where the collection myOptions is a List of beans. Those beans have 
> two fields value and label
>
> Hope that helps!
>
>
> -----Original Message-----
> From: atta-ur rehman [mailto:attar@numetrics.com]
> Sent: Monday, July 21, 2003 12:46 PM
> To: Struts Users Mailing List
> Subject: A column consisting of html:select widgets
>
>
> Dear All,
>
> I'm using struts 1.0.2.
>
> I have a requirement where i need to show a column consisting of 
> dropdown lists. Every row of the table for the column shows a dropdown 
> with the
same
> list of options.
>
> I've used String[] getCategory() and setCategory(String[]) 
> getter/setter
in
> thr ActionForm. On the form submission i get the correct selected 
> values
for
> all the rows. Now my questions is how do I set the values of these
dropdown
> from he database when the page is shown for the very first time. I've
tried
> setCategory(String[]) setter, but the dropdowns don't show the correct 
> option selected!
>
> I've also tried to search from the mail archive to no avail.
>
> Any help or pointers would be greatly appreciated.
>
> Regards,
>
> ATTA
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> This e-mail, including attachments, may include confidential and/or 
> proprietary information, and may be used only by the person or entity 
> to which it is addressed. If the reader of this e-mail is not the 
> intended recipient or his or her authorized agent, the reader is 
> hereby notified
that
> any dissemination, distribution or copying of this e-mail is 
> prohibited.
If
> you have received this e-mail in error, please notify the sender by
replying
> to this message and delete this e-mail immediately.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



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

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


Mime
View raw message