I have an iterate process set up to loop through the values in an ArrayList.
I then want the value of the loop index (specified by the "indexId" attribute) to be used to get an indexed parameter from my ActionForm.
Here's a snippet:
Here's the problem:
the "<html:textarea>" tag resolves before the jsp expression "<%= idx %>" which results in an error stating that I don't have a property in my ActionForm called "questionsIndexed[<%= idx %>]"
What I want is for the <%= idx %> to resolve to it's integer value before the <html:textarea> tag is resolved.
The two lines above the <html:textarea> tag have the <%= idx+1 %> resolve correctly.
Any Idea where I'm going wrong?
I then want the value of the loop index (specified by the "indexId" attribute) to be used to get an indexed parameter from my ActionForm.
Here's a snippet:
Code:
<logic:iterate id="field" name="Template0Form" property="questions" indexId="idx">
<div id="q<%=idx+1%>" class="showMe">
Question <%= idx+1 %>:<br/>
<html:textarea style="margin-left:10px;" property="questionsIndexed[<%= idx %>]" rows="3" cols="50"></html:textarea>
</div>
</logic:iterate>
Here's the problem:
the "<html:textarea>" tag resolves before the jsp expression "<%= idx %>" which results in an error stating that I don't have a property in my ActionForm called "questionsIndexed[<%= idx %>]"
What I want is for the <%= idx %> to resolve to it's integer value before the <html:textarea> tag is resolved.
The two lines above the <html:textarea> tag have the <%= idx+1 %> resolve correctly.
Any Idea where I'm going wrong?