Problem: I don't know how to test a checkbox setting in the validwhen test var-value.
I have a checkbox and a text field. I only need to validate the text field when the checkbox is checked. I cannot get this to work using validwhen (other validwhens do work that use different types of tests). It always requires the text field value be supplied regardless of the checkbox setting. The checkbox sets the options.EMailConfig.enabled property (The enabled field in the code does have a getter - isEnabled()). Here is the xml I've tried: <field property="options.EMailConfig.primaryServer" depends="validwhen"> <arg0 key="AlertsOptions.EMAIL_PRIMARY"/> <var> <var-name>test</var-name> <var-value>((options.EMailConfig.enabled == null) or (*this* != null))</var-value> </var> </field> I've also tried !options.EMailConfig.enabled for and it also fails. Thanks.