You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "White, Susan" <Su...@troweprice.com> on 2004/01/06 19:51:17 UTC

RE: Indexed Property in JSP - Solution

It took a while, but I got it. Here's the solution I found. Keep in mind
that dateOfBirth property is defined at the form level, not as an child
of acctParties.

	  <logic:iterate id="thisParty" name='purchaseNewForm'
property='acctParties' indexId="idx">
		  <tr valign="bottom">
		    <td align="left" valign="top" class="dkBlue11b"
colspan="2">
		      Please enter the date of birth for
		      <bean:write name="thisParty"
property="firstName"/>&nbsp;
		      <logic:notEmpty name="thisParty"
property="middleName">
 		        <bean:write name="thisParty"
property="middleName"/>&nbsp;
		      </logic:notEmpty>
 		      <bean:write name="thisParty"
property="lastName"/>&nbsp;(MM/DD/YYYY)
		    </td>
		  </tr>
		  <tr>
		    <td colspan="2">
<!--This will not work--> <html:text property='<%= "dateOfBirth[" + idx
+ "]" %>' size='10' maxlength='10'/>	
<!--This will not work--> <html:text property='dateOfBirth' size='10'
maxlength='10' indexed='true' />			
<!--This will work-->  <nested:text property='<%= "dateOfBirth[" + idx +
"]" %>' size='10' maxlength='10' />	
	   	    </td>
		  </tr>    
 	  </logic:iterate>

Susan White
Internet Trading / E-Commerce
T. Rowe Price Investment Technologies
410-345-3313
 


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