You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jordan Reed <jo...@hotmail.com> on 2003/05/22 04:03:35 UTC

Indexed Deep Properties

I have a Form bean.
I've exposed a User bean on it with getUser() and setUser() methods.
The User bean has indexed property called address on it with getAddress(int 
index) and setAddress(int index, Address address) for an Address bean.

So I'm trying to allow the user to update the values in that address bean 
(properites like street, city, state).
I'm using Struts-EL.  In my JSP I can easily iterate over any prepopulated 
values:

<c:forEach var="address" varStatus="addressStatus" 
items="${registrationWizardForm.user.addresses}">
  <html:text name="address" property="street1" indexed="true"/>
</c:forEach>

But this creates html that wants to set things to "address[0].street1".  
There is no such property on my form.  It would need to be 
"user.address[0].street1".  Is there any way that I can make that happen?

-jdr

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org