I want to do some thing that I think should be simple but I can't figure
out how to do it with the Struts taglibs. So far I've never used a
single scriptlet and I don't want to start now.
I have a number stored in a bean which I can get at just fine (tested
with bean:write).
What I need to do is loop from 1 to that number and print a text area
for each element in that range. Were the number three I should get the
following output:
<input type="text" name="student_name_1" />
<input type="text" name="student_name_2" />
<input type="text" name="student_name_3" />
Can I do that easily with a taglib?
To put this into context, I have a two-step form, on the first form the
user enters the number of students in their class (as well as other
info) and then on the second page the user is presented with the
appropriate number of text areas to allow them to enter the names of
each of their students. Because I'm can't think of a better way to do it
I'm submitting the list of names in a single hidden form field separated
by :. I was going to use Java Script to suck all the names from the text
areas, encode them and then stick the details in the hidden form field
in an onsubmit action. Perhaps there is a better "struts" way to do
this. If anyone has any advice I'm entirely open to changing the way I'm
doing this.
Thanks for your time and help,
Bart.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]