To fix I extracted template/simple/select.ftl from the
struts2-core-2.0.7.jar to WEB-INF/classes/template/simple/select.ftl

I then
changed line 60 from:
   <option value="${itemKey?html}"<#rt/>
to:
<option value="${itemKeyStr?html}"<#rt/>

and I inserted the following line before line 60:
<#assign itemKeyStr=itemKey.toString() />

I got the idea from another .ftl file that does something similar.


The error message this fixed was:

Error on line 60, column 22 in template/simple/select.ftl
Expecting a string, date or number here, Expression itemKey is instead a
freemarker.ext.beans.BooleanModel
The problematic instruction:

----------
==> ${itemKey?html} [on line 60, column 20 in template/simple/select.ftl]
in user-directive s.iterator [on line 41, column 1 in
template/simple/select.ftl]
----------
Java backtrace for programmers:
----------
freemarker.core.NonStringException: Error on line 60, column 22 in
template/simple/select.ftl
Expecting a string, date or number here, Expression itemKey is instead a
freemarker.ext.beans.BooleanModel






-Jason

Reply via email to