I am iterating text field in struts. while performing validation the property of the text field is not getting idetified.
<logic:iterate id="tSMultiplier" name="tForm" property="tSMultiplierList" indexId="i" >
<tr>
<td>
<label for="tForm_savings_${tSMultiplier.desc}">${tSMultiplier.desc}:</label>
</td>
<td>
<html:text name="tSMultiplier" property="savingsPct" indexed="true" styleId="tForm_Savings_${i}" size="6" ></html:text>
% </td>
</tr>
</logic:iterate>
I need to validate property - savingsPct as integer. Here's validation.xml snippet
<field property="savingsPct" depends="integer">
<arg position="0" key="label.savingsPct"/>
</field>
I m getting following error
org.apache.commons.validator.util.ValidatorUtils getValueAsString Unknown property 'savingsPct' on class 'class com.tForm'
Any help is appreciated.
savingsPct should have a getter in the class com.tForm. Then the error will not come.