AnsweredAssumed Answered

forEach Loop inside form

Question asked by jcosano on Sep 29, 2010
Latest reply on Nov 12, 2015 by cr2121
I have this loop inside a form:

    
<select name="assignedUser">
   <c:forEach items="${subunitUsers}" var="aUser">
       <option value="${aUser}">${aUser}</option>
    </c:forEach>
</select>
<input type="hidden" name="assignedUser_type" value="String" />

And I have an error that property aUser doesn't exists. (It's true I only have subunitUsers that is an arrayList of Strings)

I simplify this code using this:


<c:forEach var="i" begin="1" end="10" step="1">
     <c:out value="${i}" />
    <br />
</c:forEach>

And Exception is the same:
Exception from executeScript - redirecting to status template error: 08290001 Wrapped Exception (with status template): problem evaluating script: javax.el.PropertyNotFoundException: Cannot find property i
org.springframework.extensions.webscripts.WebScriptException: 08290001 Wrapped Exception (with status template): problem evaluating script: javax.el.PropertyNotFoundException: Cannot find property i
   at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:731)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:167)
   at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:307)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:178)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.activiti.engine.ActivitiException: problem evaluating script: javax.el.PropertyNotFoundException: Cannot find property i
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:69)
   at org.activiti.engine.impl.cmd.GetFormCmd.execute(GetFormCmd.java:89)
   at org.activiti.engine.impl.interceptor.DefaultCommandExecutor$InternalCommandInterceptorChain.execute(DefaultCommandExecutor.java:102)
   at org.activiti.engine.impl.interceptor.DefaultCommandExecutor$InternalCommandContextCreator.invoke(DefaultCommandExecutor.java:127)
   at org.activiti.engine.impl.interceptor.DefaultCommandExecutor$InternalCommandInterceptorChain.execute(DefaultCommandExecutor.java:95)
   at org.activiti.engine.impl.interceptor.DefaultCommandExecutor.execute(DefaultCommandExecutor.java:57)
   at org.activiti.engine.impl.TaskServiceImpl.getTaskForm(TaskServiceImpl.java:141)
   at org.activiti.rest.api.tasks.TaskFormGet.executeWebScript(TaskFormGet.java:30)
   at org.activiti.rest.util.ActivitiWebScript.executeImpl(ActivitiWebScript.java:85)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
   … 17 more
Caused by: javax.script.ScriptException: javax.el.PropertyNotFoundException: Cannot find property i
   at com.sun.script.juel.JuelScriptEngine.evalExpr(JuelScriptEngine.java:463)
   at com.sun.script.juel.JuelScriptEngine.eval(JuelScriptEngine.java:167)
   at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:216)
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:67)
   … 26 more
Caused by: javax.el.PropertyNotFoundException: Cannot find property i
   at de.odysseus.el.util.RootPropertyResolver.getValue(RootPropertyResolver.java:86)
   at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:231)
   at de.odysseus.el.util.SimpleResolver.getValue(SimpleResolver.java:120)
   at de.odysseus.el.tree.impl.ast.AstIdentifier.eval(AstIdentifier.java:84)
   at de.odysseus.el.tree.impl.ast.AstEval.eval(AstEval.java:51)
   at de.odysseus.el.tree.impl.ast.AstComposite.eval(AstComposite.java:35)
   at de.odysseus.el.tree.impl.ast.AstNode.getValue(AstNode.java:28)
   at de.odysseus.el.TreeValueExpression.getValue(TreeValueExpression.java:122)
   at com.sun.script.juel.JuelScriptEngine.evalExpr(JuelScriptEngine.java:459)

Then… I'm doing something wrong? or is it a bug?

My target:
I have an arrayList variable with String and i would put this values inside a select values of the form.

Outcomes