Struts 2 FreeMarker 模板错误 stack.findValue('top') is undefined and jsp page
Error on line 69, column 13 in template/simple/select.ftl
stack.findValue('top') is undefined.
It cannot be assigned to itemKey
The problematic instruction:
---- ------
==> assignment: itemKey=stack.findValue('top') [on line 69, column 13 in
template/simple/select.ftl]
in user-directive s.iterator [on line 59, column 1 in template/simple/select.ftl]
in include "/${parameters.templateDir}/simple/select.ftl" [on line 24, column 1 in
template/xhtml/select.ftl]
----------
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Error on line 69, column 13 in
template/simple/select.ftl
stack.findValue('top') is undefined.
It cannot be assigned to itemKey
at freemarker.core.Assignment.accept(Assignment.java:111)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:221)
基本上在我的 JSP 方面,我有许多下拉选项。如何解决此错误....!!!!
用于下拉菜单的 JSP PAGE 等等....
<html>
<title>JSP PAGE</title>
<body>
<s:form action="event" namespace="/" method= "post">
<h4>
<s:textfield name="description" label="Description" size="30" />
</h4>
<h4>
<s:textfield name="name" label="Name" />
</h4>
<h4>
<sx:datetimepicker name="date" label="Format (DD-MM-YYYY)"
displayFormat="dd-MMM-yyyy" value="%{'2012-01-01'}">
</sx:datetimepicker>
</h4>
<h4>
<s:textfield name="type" label="Event Type" />
</h4>
<h4>
<s:textfield name="group" label="Event Group" />
</h4>
<s:select name="Location" headerKey="-1" label="Location" list="{cityList}">
<%-- <s:iterator value="cityList">
<option>
</option>
</s:iterator> --%>
</s:select>
<s:submit value="Submit" method="execute" key="submit" align="center" />
</s:form>
</body>
</html>