You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Amin Lalji <am...@intelysis.com> on 2004/04/26 18:26:04 UTC
Validator Dependant Checkboxes...
Just wondering if anybody has been able to get dependant checkboxes
working...
I have the following in validation.xml:
<field
property="orderReceived" depends="requiredif">
<arg0 key="OrderFormReceived.exception.checkBox"/>
<var>
<var-name>field[0]</var-name>
<var-value>orderNotReceived</var-value>
</var>
<var>
<var-name>fieldTest[0]</var-name>
<var-value>EQUAL</var-value>
</var>
<var>
<var-name>fieldValue[0]</var-name>
<var-value>NULL</var-value>
</var>
</field>
>From what I understand about Struts and checkboxes... the orderNotReceived
checkbox will not be submitted/populated if it is not checked... so the
validator does not really have an element to test against ... kind of like
A NPE... the above does not work... validation succeeds if I leave
orderNotReceived unchecked...
Any ideas?
Thanks,
/A
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org