Normally you'd do this through an <s:optgroup> tag [1]. If you need functionality beyond the defaults, you'd need to roll your own tag, or consider the optgroup approach.
Dave [1] http://struts.apache.org/2.x/docs/optgroup.html On Mon, Nov 7, 2011 at 12:32 PM, Jyothrilinga Rao <jyoth...@gmail.com> wrote: > Hi, > > I am showing a list of files in the drop down and want to show two more > options as follows > > <option value="none" selected="selected">select one</option> > <option value="ALL">---------------- ALL ----------------</option> > In Struts1, we could have html:option within the html:select tag. > In Struts2, I tried to use the headerKey & headerValue attribute of > s:select, but can only add one (select one). Is there any way I can specify > a list for headers instead of manually adding it to my list in the action. > > My current code snippet: > > <s:select cssClass=*"InputText"* name=*"selectedFileNameCrDt"* list=* > "fileNameList"* listValue=*"itemLabel"* listKey=*"itemValue" *headerKey=* > "none"* headerValue=*"select one"*/> > > Regards, > JK > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org