Have a jsp with a checkbox.
If this is checked have to make sure 2 other textfields are not empty.
i.e if order checkboxs checked want to make sure that the custName and the
custNumber are entered.
Is the below right to do the same?
<formset>
<form name="SetupForm">
<field property="custName" depends="validwhen">
<var>
<var-name>test</var-name>
<var-value>((order == 'true') and (*this* !=
null))</var-value>
</var>
</field>
</form>
</formset>
<formset>
<form name="SetupForm">
<field property="custNumber" depends="validwhen,integer">
<var>
<var-name>test</var-name>
<var-value>((order == 'true') and (*this* !=
null))</var-value>
</var>
</field>
</form>
</formset>
In JSp
................
..................
<!-- 12. Customer Name -->
<tr>
<td>
<bean:message key="lbl.custName"/> <bean:message
key="colon"/>
</td>
<td>
<html:text name="SetupForm" property="custName"
size="40" />
</td>
<td align="bottom">
<font color=red><html:errors
property="custName"/></font>
</td>
<td></td>
</tr>
<tr></tr><tr></tr><tr></tr>
<!-- 12.customer Number -->
<tr>
<td>
<bean:message key="lbl.custNumber"/> <bean:message
key="colon"/>
</td>
<td>
<html:text name="SetupForm" property="custNumber"
size="40" />
</td>
<td align="bottom">
<font color=red><html:errors
property="custNumber"/></font>
</td>
<td></td>
</tr>
.................
............
<html:javascript formName="SetupForm"/>
</html:form>
I tried deploying. But on submit. I don't think the validation is getting
checked. I checked the checkbox but left the the textfields blank. But it
just forwards to the next jsp.
what am I missing?
Also, Would like to make sure the number entered inthe custNumber is
positive integer. How can this be done?
Thanks.
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]