When I try to use <s:doubleselect/> ,it does not work.
below is a segment of the exception thrown
Expression parameters.formName is undefined on line 76, column 43 in
template/simple/doubleselect.ftl.
The problematic instruction:
----------
==> ${parameters.formName} [on line 76, column 41 in
template/simple/doubleselect.ftl]
 in include "/${parameters.templateDir}/simple/doubleselect.ftl" [on line 3,
column 1 in template/xhtml/doubleselect.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression parameters.formName is
undefined on line 76, column 43 in template/simple/doubleselect.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.DollarVariable.accept(DollarVariable.java:76)
 at freemarker.core.Environment.visit(Environment.java:196)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
below is the complete code.I use doubleselect.action to test the page,
doubleselect.jsp is also tested,both donot work.

<%@ page pageEncoding="utf-8" %>
<%@ page contentType="text/html;charset=utf-8" %>
<%request.setCharacterEncoding("utf-8"); %>
<%@ taglib prefix="s" uri="/struts-tags" %>

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
  <html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
  <title>Struts 2 Cool Tags - &lt;s:doubeselect/ &gt;</title>
  <s:head />
  </head>
  <body>
  <h2>&lt;s:doubleselect/&gt;</h2>
  <s:form action="Store" >
  <s:set name="foobar"
  value="# {'Java': {'Spring', 'Hibernate', 'Struts 2'}, '.Net': {'Linq', '
ASP.NET 2.0'}, 'Database': {'Oracle', 'SQL Server', 'DB2', 'MySQL'}}" />
   <s:doubleselect list="#foobar.keySet()"
   doubleName="technology"
   doubleList="#foobar[top]"
   label="Technology" />
   </s:form>
   </body>
   </html>

Reply via email to