File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Indexed property Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Indexed property" Watch "Indexed property" New topic

Indexed property

Alok Pota
Ranch Hand

Joined: Mar 07, 2001
Posts: 185
Using struts 1.2. I have a DynaValidatorActionForm with the following


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

In my jsp I do this..

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

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(

I thought, in Struts 1.2 it was possible to do that. Am I missing something?
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
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 ]

-/a<br />certified slacker...yes, my last name is 'do' - <a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Indexed property
jQuery in Action, 3rd edition