• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Indexed property

 
Alok Pota
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using struts 1.2. I have a DynaValidatorActionForm with the following

property

<form-property name="lines" type="java.util.ArrayList" />

In my jsp I do this..

<c:forEach var="lines" items="${mydnaform.lines}" >
<TR>
<TD><html:text indexed="true" name="lines" property="value"/></TD>
</tr>
</c:forEach>

and I get the following..

javax.servlet.jsp.JspException: indexed="true" is only valid within an enclosing iterate tag
at org.apache.struts.taglib.html.BaseHandlerTag.prepareIndex(BaseHandlerTag.java:639)


I thought, in Struts 1.2 it was possible to do that. Am I missing something?
 
alan do
Ranch Hand
Posts: 354
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need the html:form tag around this. also, you need an Object[] or String[], i don't think you can use an ArrayList.
[ June 10, 2005: Message edited by: alan do ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic