Lynn Stevens wrote:
No I am not getting any errors. I would paste the code now, but its at work and I am at home...I will paste it in the moring. If I am inside an iterate tag, it does not iterate at all because the String[] is empty.

But why is empty? In other words if these are text fields you expect to filled out then it shouldn't be empty when you get to the form. That is if you plan to loop/iterate over a form field then it needs to be prepopulated with what you want.


If I change to a for:Each jstl tag and tell it to loop say 3 times, it prefills all of my html:textfields to show the pointer location of the String[].

Well in the above when you say it "prefills" all of you textfields, you don't mean it's filling them with appropriate text field values.


Assuming you want to use a String[], what I think you want to do is...

(Lets assume you are doing an update of maybe a String[] array of automobile names)...

in a setUp dispatch method call backend and then populate your form String[] automobileNames with the names. )One important thing to note though is that you will have to have intialized your array in the form to at least not be null or else you'll probably end up with some NullPointer Exceptions)

Now forward to form....

<c:forEach items="${yourForm.automobileNames}" var="name">
   <html:text property="automobileNames" value="${var}"/>
</c:forEach>

Something like the above should work.. then when the form submits you'll have the String[] automobileNames populated with all the names (which in the above could have been edited by the user).



--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to