With the Iterate tag, if the String[] is empty, then it just thinks there is nothing to iterate over and none of the textfields appear. Oddly, when I prefill the String[] with n empty Strings, it will make my n textfields, but in each textfield it has the pointer location of the String. If I then edit the text field and type something in, it does give me an error...it can not cast the String to a String[]. This tells me that it expects each textfield to be a String[] and does not recognize that I am trying to *fill* the String[].
Sorry, I hope this makes sense...if not I can paste the actual code tomorrow...I am thinking that I can always get the info from the request itself and not use the form bean by giving each textfield the name of myField + i if i is the current iteration, but that seem wrong.....
From: Rick Reumann <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: setting a collection in my form bean usin iterate or forEach Date: Sun, 22 Aug 2004 21:49:16 -0400
Lynn Stevens wrote:
If I put a String[] or ArrayList in my DynaActionForm, this does not seem to work.
<snip>
Does anyone know if this is possible? Its driving me mad!
Sure it'll work. Be more specific of how you are setting stuff up (paste the dyna/action form definition and the form code. Also, as someone else asked, what 'isn't work' - are you getting errors?
-- Rick
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]