问题描述:

In the applicationContext rules xml file, I have rules defined to validate fileds for web forms. eg. The webFormCanadaConditionalRule will be triggered on the province filed and the rule checks to if the selected value is 5714 for Canada. If it is Canada are other filed will get validated.

here is a working example.

<entry key="province">

<list>

<value>webFormCanadaConditionalRule</value>

</list>

</entry>

<bean id="webFormCanadaConditionalRule"

class="ca.gc.cic.gol.eapp.rules.custom.WebFormConditionalRule">

<property name="preConditionValue" value="5714"/>

<property name="ruleNames" >

<list>

<value>mandatory</value>

</list>

</property>

</bean>

What I am trying to accomplish is to have a precondition value that checks to make sure the selected value is not 5714.

Is there a way I can add a precondition value to bean property where I can use the !=... Here is what I have and this doesn't seem to work.

<bean id="webFormAddressNotCanadaConditionalRule"

class="ca.gc.cic.gol.eapp.rules.custom.WebFormConditionalRule">

<property name="preConditionValue" value="${!=5714}" />

<property name="ruleNames" >

<list>

<value>mandatory</value>

</list>

</property>

</bean>

Thanks a lot.

相关阅读:
Top