這可能是很簡單的,我嘗試添加基於另一場 式語言驗證: @If(Desinfect_1 =「」 & Desinfect =「消毒的殺菌劑跟班」; @Failure(「Veuillez cocher離開OU大堤「); //成功)的XPages驗證
XPages中,我試圖與驗證表達式:
<xp:inputText value="#{document1.chambre}" id="chambre1">
<xp:this.rendered><![CDATA[#{javascript:getComponent ("Desinfect1").getValue() == "Désinfection de chambre"}]]></xp:this.rendered>
<xp:this.validators>
<xp:validateExpression
message="err">
<xp:this.expression><![CDATA[#{javascript:if (GetComponent ("Desinfect1").getValue() == "Désinfection de chambre" & GetComponent ("Chambre1").getValue() == ""){
return false;
}
else {
return true;
}}]]></xp:this.expression>
</xp:validateExpression>
</xp:this.validators>
</xp:inputText>
很抱歉,但什麼問題/你的問題? – 2012-04-20 13:46:08
順便說一句:SSJS是大小寫敏感的。 GetComponent不起作用。使用getComponent代替;-) – 2012-04-20 14:03:02
問題是驗證不起作用我會嘗試getComponent – user1339222 2012-04-20 15:03:15