Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indexed Property initialization problem

Status
Not open for further replies.

Verbetex

Programmer
Apr 18, 2002
18
0
0
GB
Hi

I have a form property in a DynaValidatorActionForm as follows:
Code:
<form-property name="AttName" type="java.lang.String[]" size="5"/>
However, when I use the following code in my jsp page:
Code:
<logic:iterate id="element" name="MyForm" property="AttName" indexId="counter">
	<tr>
		<td class="firstCol"><bean:message key='my.message'/>:</td>
		<td class="lastCol">
			<html:select property='<%="AttName[" + counter + "]" %>'>
				<logic:notEmpty name="MyForm" property="My_refData">
					<html:options property="My_refData" ></html:options>
				</logic:notEmpty>
			</html:select>
		</td>
	</tr>
</logic:iterate>
It will only iterate through it once. I think that as I have set the size to 5, then there should be 5 empty strings in the array??
Is this the right way of doing it or am I missing a trick here?
 
Sorry, the problem has been traced to some other code which is overwriting the value based on an xml schema.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top