-----Oorspronkelijk bericht----- Van: Rick Reumann [mailto:[EMAIL PROTECTED] Verzonden: vrijdag 8 april 2005 16:04 Aan: Struts Users Mailing List Onderwerp: Re: LazyLists and dynamic forms
> Sorry, I should have been more clear, I've been using the nested tag so > long I forgot that for what you wanted to do you WOLD need indexed > properties unlss you did use the nested tag (part of Struts) or simply > made the indexed values yourself with JSTL (which is what I opt for when > not using the nested tag, only because I'm not sure how indexed works > when you end up with deeply nested objects within objects(?)). > > The nested tag will take care of this cleanly for you. So, for example, > if you had a List of Employees (firstName, lastName, and inside each > Employee was also a "AddressBean" with street, city,etc) your formBean > might just have a settter getter for getEmployees() setEmployees(List > employees). Then creating the form.. > > <nested:form action="someWhere"> > <nested:iterate property="employees"> > <nested:write property="firstName"/> > <nested:write property="lastName"/> > <nested:write property="address.city"/> > <nested:write property="address.state"/> > </nested:iterate> > > or if you don't like address.city, address.state you could do... > > <nested:form action="someWhere"> > <nested:iterate property="employees"> > <nested:write property="firstName"/> > <nested:write property="lastName"/> > <nested:nest property="address" > > <nested:write property="city"/> > <nested:write property="state"/> > </nested:nest> > </nested:iterate> > > > -- > Rick I hadn't looked at the nested tags yet, they sure do look like what I need, Thanks a lot, Richard --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]