You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nathan Maves <Na...@Sun.COM> on 2004/08/13 23:22:23 UTC

validwhen with checkboxes (1.2)

can you run a check to see if a checkbox has been selected?

This doesn't seem to work for me, where rollable is a checkbox in the 
same form.  I want this field to be required when the rollable checkbox 
is checked.

<field property="rollupMethod"
			       depends="validwhen">
<arg0 key="label.rollupMethod"/>
	<var>
		<var-name>test</var-name>
		<var-value>((rollable == null) or (*this* == null)) </var-value>
	</var>
</field>


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


Re: validwhen with checkboxes (1.2)

Posted by Bill Siggelkow <bi...@bellsouth.net>.
Nathan -- try changing the logical to "and"

Nathan Maves wrote:
> can you run a check to see if a checkbox has been selected?
> 
> This doesn't seem to work for me, where rollable is a checkbox in the 
> same form.  I want this field to be required when the rollable checkbox 
> is checked.
> 
> <field property="rollupMethod"
>                    depends="validwhen">
> <arg0 key="label.rollupMethod"/>
>     <var>
>         <var-name>test</var-name>
>         <var-value>((rollable == null) or (*this* == null)) </var-value>
>     </var>
> </field>


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