Martin, >> the doc for <html:option> states...
I'm using <html:optionsCollection name="auditListCollection" label="label" value="value" />, giving me a list of options. How to select one option from this list (the first - always) is the question. I now have the first (default, or selected option value) in a session attribute that this JSP can get hold of. How to use that info? Or, does this have to be done at the server in the Action class? Rajasekhar, If no option is SELECTED, then no default is specified. It does NOT default to the first option in the list. Doug -----Original Message----- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Monday, October 10, 2005 10:56 AM To: Struts Users Mailing List Subject: Re: Select first in Options list Doug- If you want specific items (options) pre-selected for your select control the doc for <html:option> states If the value of the corresponding bean property matches the specified value, this option will be marked selected http://www.linuxforum.net/doc/tags.html#options1 HTH, Martin- ----- Original Message ----- From: <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Monday, October 10, 2005 9:15 AM Subject: Re: Select first in Options list > > Hi, > Do not use "selected" for any option. By default automatically, > the first option will be selected and your purpose will be solved. > > Regards, > Rajasekhar Cherukuri > > > > > "Doug Thomas" <[EMAIL PROTECTED]> > 10/10/2005 06:20 PM > Please respond to > "Struts Users Mailing List" <user@struts.apache.org> > > > To > "Struts MailList" <user@struts.apache.org> > cc > > Subject > Select first in Options list > > > > > > > I have a Select element with several Options making up a selection list. > The > Options are built dynamically from a database. After the list is built, I > want the first option in the list to be SELECTed. Every sample I've seen > assumes you know what's in the list and you know what option you want > selected, by name. > > Any ideas on how to do this? > > Doug > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > ForwardSourceID:NT00005B56 > > > Notice: The information contained in this e-mail message and/or > attachments to it may contain confidential or privileged information. If > you are not the intended recipient, any dissemination, use, review, > distribution, printing or copying of the information contained in this > e-mail message and/or attachments to it are strictly prohibited. If you > have received this communication in error, please notify us by reply > e-mail or telephone and immediately and permanently delete the message and > any attachments. Thank you --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]