Sorry, the format of my email broken again. Send it again.
The error message is "optGroupInternalListUiBean.parameters is undefined" I had a quick look at the source of Struts2 and tag template, In [template/simple/optgroup.ftl]: line 23: <#if parameters.optGroupInternalListUiBeanList??> line 24: <#assign optGroupInternalListUiBeans=parameters.optGroupInternalListUiBeanList /> line 25: <#list optGroupInternalListUiBeans as optGroupInternalListUiBean> line 26: <optgroup line 27: <#if optGroupInternalListUiBean.parameters.label??> error occurred in line 27, and the [optGroupInternalListUiBean] should be an instance of org.apache.struts2.components.ListUIBean, which inherit from org.apache.struts2.components.Component, and the method [getParameters] of [Component] should return a map, which should be never null. So, I think this error should not occur. The source version I have read is [struts2-core-2.2.3.jar], maybe you need upgrade to the latest version, and see if the error happen. 2011/11/28 Li Ying <liying.cn.2...@gmail.com>: > The error message is "optGroupInternalListUiBean.parameters is undefined" > I had a quick look at the source of Struts2 and tag template, > In [template/simple/optgroup.ftl]: > line 23: <#if parameters.optGroupInternalListUiBeanList??>line 24: > <#assign optGroupInternalListUiBeans=parameters.optGroupInternalListUiBeanList > />line 25: <#list optGroupInternalListUiBeans as > optGroupInternalListUiBean>line 26: <optgroup line 27: <#if > optGroupInternalListUiBean.parameters.label??> > error occurred in line 27, > and the [optGroupInternalListUiBean] should be an instance of > org.apache.struts2.components.ListUIBean,which inherit from > org.apache.struts2.components.Component,and the method [getParameters] > of [Component] should return a map, which should be never null.So, I > think this error should not occur. > The source version I have read is [struts2-core-2.2.3.jar],maybe you > need upgrade to the latest version,and see if the error happen. > > 2011/11/8 Jyothrilinga Rao <jyoth...@gmail.com>: >> Thank you Dave. >> I used the optgroup and got a unexpected error. >> Was using jars struts-core-2.0.14.jar and xwork-2.0.7.jar. >> Maybe updating the jars would help or any more info? >> >> Regards, >> JK >> >> On Mon, Nov 7, 2011 at 9:37 AM, Dave Newton <davelnew...@gmail.com> wrote: >>> >>> 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 >>> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org