File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Iterate a String Array of the ActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Iterate a String Array of the ActionForm" Watch "Iterate a String Array of the ActionForm" New topic

Iterate a String Array of the ActionForm

Colin Pace

Joined: Sep 25, 2003
Posts: 9
i need to iterate through a String array property of the ActionForm, and display the elements in textfields such that they can be changed.
1. Iterate tag
<logic:iterate id="arrayelement" name="MyForm" property="StringArray">
Are the attributes of the iterator tag correctly set?
2. How to display the array elements in textfields?
i managed to display the elements, however using the <bean:write> tag
<bean:write name="arrayelement">
how can i display them using the <html:text> tag?
3. After displaying the elements in textfields, i need to display an empty textfield to allow the user to populate new elements in the array.
By setting the property attribute the array property should be filled automatically. Correct?

Christian Spiteri

Joined: Sep 29, 2003
Posts: 3
I have the same kind of problem and still haven't found a solution for it. I've checked most postings in this forum but no luck!!
I agree. Here's the link:
subject: Iterate a String Array of the ActionForm
It's not a secret anymore!