struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amin Lalji" <amin.la...@intelysis.com>
Subject RE: Validator Dependant Checkboxes...
Date Mon, 26 Apr 2004 17:15:16 GMT
Tried it... no luck... also tried false... no luck...

I believe my theory about the box not being submitted jives with how struts
Handles checkboxes... that is, it will not submit them if they are not
checked... therefore there is no value available for comparison...

Need a workaround...

Thanks,
/A

-----Original Message-----
From: Ramadoss Chinnakuzhandai [mailto:rchinnakuzhandai@register.com] 
Sent: Monday, April 26, 2004 11:44 AM
To: Struts Users Mailing List
Subject: RE: Validator Dependant Checkboxes...

try..
<var>
<var-name>fieldValue[0]</var-name>
<var-value>off</var-value>
</var>


-----Original Message-----
From: Amin Lalji [mailto:amin.lalji@intelysis.com]
Sent: Monday, April 26, 2004 12:26 PM
To: 'Struts Users Mailing List'
Subject: 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


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message