Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

In Struts, how do I do nested iterated form fields?

843836Jan 28 2005 — edited Mar 4 2005
After a lot of wasted time I have succeeded in getting nested iterated form fields working. But, I only succeeded by cheating a bit. My final solution to output a text input field is:

<nested:form action="/list/view/EditCustomViewSubmit" method="post">

<nested:iterate property="customViewCellBeans" id="customViewCellBean" indexId="beanCellIx"> <nested:root name="customViewCellBean">

<nested:iterate property="customViewCellParams" id="customViewCellParam" offset="1" indexId="paramIx">

<INPUT type=text name="customViewCellBean[<%=beanCellIx%>].customViewCellParam[<%=paramIx%>].param" value="<nested:write property="param"/>">

It's all good except for the place where I actually output the text field. I have to hardcode html with taglets there instead of using a nested:text tag. I wouldn't have a problem with this except that this solution means that I can't use the optionsCollection stuff to output dropdown lists.

Basically, I want to know how to convert that last INPUT tag to use a nested:text tag.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 1 2005
Added on Jan 28 2005
6 comments
470 views