I'm doing the same kind of thing, I don't think dynaform supports arrays so that might explain why it isn't digging what its being sent. The mapped backed action form is the puppy you need to get your head 'round (as do i).
Read the latest docs on 'map backed action forms'.. This basically puts an undefined amount of form values into a hash map. To the best of my knowledge you don't define these fields in config.xml. Cheers mark On 11-12-2002 14:54, "Srinivas Bhagavathula" <[EMAIL PROTECTED]> wrote: > > Hi, > > I am reposting this question, did not get any input for my last post. Hope > someone can give me some inputs here. thanks, srinivas > > > How can I prepopulate an DynaValidator/DynaAction form which has an indexed > property? > > this is my form definition > > <form-bean name="myForm" type="org.apache.struts.action.DynaActionForm" > dynamic="true"> > <form-property name="firstName" type="java.lang.string[]"/> > <form-property name="companyID" type="java.lang.string"/> > </form-bean> > > > Action class: > > DynaBean newForm = > DynaActionFormClass.getDynaActionFormClass("myForm").newInstance > (); > > for (int i= 0; i < employee.numberofPersons() ; ++ i) > newForm.set("firstName", i , employee.firstName(); > > newForm.set("companyID", "12345"); > request.setAttribute("InfoForm", newForm); > > > The code breaks because it does not know the size of the firstName[] indexed > property. I could have done this by using an initial property and set the > size but the size changes dynamically. How can I set the size of the > "firstName" property in the action class code (just before populating the > property) > > > TIA, > srinivas > > > > > > _________________________________________________________________ > Tired of spam? Get advanced junk mail protection with MSN 8. > http://join.msn.com/?page=features/junkmail > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>