Hi All, If the someBean.getDefault() has some values which is not there in the collection SORT then the problem is that the select tag will display some value from the collection not the value from someBean.getDefault().
I faced this situation when i had to display a blank combo box and the collection having the data of the employee names. Any idea on how to handle this? Shailender Jain nikhil walvekar wrote: > Hi, > > for html:select tag you can specify value > there you can write your default value from some bean > > <html:select size="1" name="sort" > onchange="document.forms[4].elements[2].focus()" value="<%= someBean.getDefault()%>"> > <html:options collection="SORT" property="value" > labelProperty="label"/> > </html:select> > > Nikhil. > > Caroline Jen <[EMAIL PROTECTED]> wrote: > 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] > > > Nikhil > > Yahoo! India Matrimony: Find your partner online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]