struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naveen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-3387) FreeMarker template error! template/simple/select.ftl stack.findValue('top') is undefined.
Date Fri, 15 Jun 2012 10:19:42 GMT

    [ https://issues.apache.org/jira/browse/WW-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295567#comment-13295567
] 

Naveen  commented on WW-3387:
-----------------------------

In select tag just enter the same value and label values like

<s:select list="{white','red','yellow'}" label="Colors" name="Colors"/> 

now the problem will be rectified
                
> FreeMarker template error!  template/simple/select.ftl stack.findValue('top') is undefined.
> -------------------------------------------------------------------------------------------
>
>                 Key: WW-3387
>                 URL: https://issues.apache.org/jira/browse/WW-3387
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.14
>         Environment:  Error  is displayed in jsp page.. 
>            Reporter: suresh
>            Assignee: Lukasz Lenart
>             Fix For: 2.0.14
>
>
> 	
> i m facing the problem programList has come from Action class in the time Error will
come... if i m adding manually  problem  isnot come.. like as  <s:select list="{'white','red','yellow'}"/>
> in below  Jsp page is  program code and after that Error page is this error has come
 after loading in browser
> how can i clear the problem
> give me solution for this one
> as soon as possible
> Jsp page
> -------------
> <s:select list="programList"  name="program"
> 				onchange="javascript:show_details();return false;"
> 				headerValue="--- Please Select ---" headerKey="1" label="Program"></s:select>
> 	 	
> Error page
> ---------------
> FreeMarker template error!
> Error on line 73, 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 73, column 13 in template/simple/select.ftl]
>  in user-directive s.iterator [on line 63, 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 73, 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:196)
> 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
> 	at freemarker.core.Environment.visit(Environment.java:196)
> 	at freemarker.core.IfBlock.accept(IfBlock.java:82)
> 	at freemarker.core.Environment.visit(Environment.java:196)
> 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
> 	at freemarker.core.Environment.visit(Environment.java:196)
> 	at freemarker.core.Environment.visit(Environment.java:233)
> 	at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116)
> 	at freemarker.core.Environment.visit(Environment.java:196)
> 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
> 	at freemarker.core.Environment.visit(Environment.java:196)
> 	at freemarker.core.Environment.include(Environment.java:1375)
> 	at freemarker.core.Include.accept(Include.java:155)
> 	at freemarker.core.Environment.visit(Environment.java:196)
> 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
> 	at freemarker.core.Environment.visit(Environment.java:196)
> 	at freemarker.core.Environment.process(Environment.java:176)
> 	at freemarker.template.Template.process(Template.java:232)
> 	at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:168)
> 	at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530)
> 	at org.apache.struts2.components.UIBean.end(UIBean.java:484)
> 	

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message