struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amin Lalji" <amin.la...@intelysis.com>
Subject Validator Dependant Checkboxes...
Date Mon, 26 Apr 2004 16:26:04 GMT
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


Mime
View raw message