I think Ram means add a 'value="Last Post Date"' or other text key to match. I also suppose that using Struts-EL (Expression Language), you could pull that value from a bean so you could change the value on the fly or based upon some other data. Not that I use Struts-EL.
Regards, David -----Original Message----- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 8:29 PM To: Struts Users Mailing List Subject: RE: <html:options .... > Huh? Sorry, I do not understand. --- Ram Venkataswamy <[EMAIL PROTECTED]> wrote: > You can specify value=" Last Post Date" in > html:select - The value to > compare with for marking an option selected. > > > > -----Original Message----- > From: Caroline Jen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 09, 2004 3:52 PM > To: Struts Users Mailing List > Subject: RE: <html:options .... > > > It is not exactly what I am looking for. > > The drop down list I have now is: > > <html:select size="1" property="sort" > onchange="document.forms[4].elements[2].focus()"> > <html:options collection="SORT" property="value" > labelProperty="label"/> > </html:select> > > The collection "SORT" has the following options: > > Last Post Date > First Post Date > Sender Name > Replies > Views > > I want the "Last Post Date" to be the default > selection. If we use HTML, we do the following: > > <OPTION SELECTED VALUE="last_post_date">Last Post > Date > > How do I do the same thing when LabelValueBean is > used > in Struts? > > > --- Satish Kataria <[EMAIL PROTECTED]> wrote: > > Here is the code for defalt value > > > > <html:select size="1" name="sort" > > onchange="document.forms[4].elements[2].focus()"> > > <html:option value="">SELECTED</html:option> > > <html:options collection="SORT" property="value" > > labelProperty="label"/> > > </html:select> > > > > Thanks, > > Satish > > -----Original Message----- > > From: Caroline Jen [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 09, 2004 8:00 AM > > To: [EMAIL PROTECTED] > > Subject: <html:options .... > > > > > > > I try to create a drop down menu as follow: > > > > <html:select size="1" name="sort" > > onchange="document.forms[4].elements[2].focus()"> > > <html:options collection="SORT" property="value" > > labelProperty="label"/> > > </html:select> > > > > I am able to disply the menu. > > > > I want one of the options to be selected by > default. > > > > Therefore, I want to type SELECTED somewhere. How > > do > > I do it? > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > http://mail.yahoo.com > > > > > --------------------------------------------------------------------- > > 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] > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > 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] > __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ --------------------------------------------------------------------- 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]