Bonour,
j'essaie de faire un check sur les champs de mes differents formulaires. Pour ça j'utilise le code suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 <field property="numeroTravailIE" depends="validwhen"> <msg name="integer" key="saisie.champs.format.nombre"/> <arg0 key="Le numero de travail IE" resource="false"/> <var> <var-name>test</var-name> <var-value>(((numeroNational==null) and (nom==null) and (*this* != null)) or ( (*this* == null) and (nom==null) and (numeroNational!=null) ) or ( (*this* == null) and (nom!=null) and (numeroNational==null) )) </var-value> </var> </field> <field property="numeroNational" depends="validwhen"> <msg name="validwhen" key="saisie.champs.requis"/> <arg0 key="Le numero national IPG" resource="false"/> <var> <var-name>test</var-name> <var-value>(((numeroTravailIE==null) and (nom==null) and (*this* != null)) or ( (*this* == null) and (nom==null) and (numeroTravailIE!=null) ) or ( (*this* == null) and (nom!=null) and (numeroTravailIE==null) )) </var-value> </var> </field> <field property="nom" depends="validwhen"> <msg name="validwhen" key="saisie.champs.requis"/> <arg0 key="Le nom" resource="false"/> <var> <var-name>test</var-name> <var-value>(((numeroTravailIE==null) and (numeroNational==null) and (*this* != null)) or ((*this* == null) and (numeroNational==null) and (numeroTravailIE!=null)) or ((*this* == null) and (numeroNational!=null) and (numeroTravailIE==null))) </var-value> </var> </field>
Mais je n'obtient pas la validation mais un message d'erreur du type "ValidWhen Error for field ' numeroNational' - line 1:43: expecting RPAREN, found 'and'"
Je ne vois pas où est le probleme. Est-ce que quelqu'un peut m'aider ?
Je precise que je n'utilise pas required car mes 3 modes de recherche utilisent un seul et même beanForm.
Partager