struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Lorenz <felipe.lor...@gmail.com>
Subject Re: Struts2 select tag with multiple enabled
Date Thu, 16 Apr 2009 14:01:48 GMT
Im not sure. but i think you need to add the attribute "name".
i.e.:  <s:select multiple="true"  headerKey="-1" list="rejectionReasons"
value="%{fmrTenant.terminationReason}" required="true" name="something" />

On Thu, Apr 16, 2009 at 10:45 AM, Bhaarat Sharma <bhaarat.s@gmail.com>wrote:

> I am using a select tag like this
>
> <s:select multiple="true"  headerKey="-1" list="rejectionReasons"
> value="%{fmrTenant.terminationReason}" required="true"/>
>
> list = "rejectionReasons"
>
> invokes the following method:
>
>    public List getRejectionReasons() {
>        return rejectionReasons;
>    }
>
> I am using value="%{fmrTenant.terminationReason}" because I want to
> preselec
> some of the values returned. this invokes the following method
>
>    public String[] getTerminationReason() {
>        return terminationReason;
>    }
>
> I am getting the following error
> Expected number, date, or string. parameters.nameValue evaluated instead to
> freemarker.ext.beans.ArrayModel on line 60, column 101 in
> template/simple/select.ftl.
> The problematic instruction:
> ----------
> ==> if tag.contains(parameters.nameValue, itemKey) == true ||
> (parameters.nameValue?exists && parameters.nameValue?string == itemKey) [on
> line 60, column 9 in template/simple/select.ftl]
>  in user-directive s.iterator [on line 40, column 1 in
> template/simple/select.ftl]
> ----------
>
>
> I looked for this error online and seems like this is a bug in struts2:
> https://issues.apache.org/struts/browse/WW-1747
>
> I just wanted to make sure whether there is a work around as to how I am
> trying to do this?
>
> Thanks!
>



-- 
Felipe A. Lorenz
Idealogic Software
http://www.idealogic.com.br

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message