struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mano Pájaro <mano0...@gmail.com>
Subject Problem with <s:checkboxlist>, FreeMarker template Error
Date Fri, 29 Jul 2011 16:38:01 GMT
Hello list!! I'm having a problema with this tag, I don't know what to do :(
I hope you guys could help me.
As here says http://struts.apache.org/2.2.3/docs/checkboxlist.html I can use
a Map object in the list attribute of a checkboxlist, When i go for it I got
this FreeMarker template error:

FreeMarker template error!


Expression parameters.name is undefined on line 38, column 32 in
template/simple/checkboxlist.ftl.
The problematic instruction:
----------
==> ${parameters.name?html} [on line 38, column 30 in
template/simple/checkboxlist.ftl]
 in user-directive s.iterator [on line 25, column 5 in
template/simple/checkboxlist.ftl]
 in include "/${parameters.templateDir}/simple/checkboxlist.ftl" [on line
25, column 1 in template/xhtml/checkboxlist.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression parameters.name is
undefined on line 38, column 32 in template/simple/checkboxlist.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.Expression.getStringValue(Expression.java:118)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at
freemarker.core.StringBuiltins$StringBuiltIn._getAsTemplateModel(StringBuiltins.java:71)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.visit(Environment.java:299)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.include(Environment.java:1483)
at freemarker.core.Include.accept(Include.java:169)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at
org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:157)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
at org.apache.struts2.components.UIBean.end(UIBean.java:513)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
at org.apache.jsp.jsp.GuardarAlumnoForm_jsp._jspx_met


Even weirder, when I use a List object (because, i don't know, maybe List
would work), I also get the same error!
I don't know if this is a bug or I am doing something wrong. In the action
class I define a Map<Integer,String> objected implemented as HashMap, and
List<String> as ArrayList, I dont' even know what freemarker is :(
Thank you for your help

-- 
Manolo Pájaro Santander
Ingeniero de Sistemas VIII Semestre (Actual)
<<Promoviendo el Software Libre>>
CUSOL-UAC
Linux Registered User # 522026

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