1

検証が空のフィールドを持つxpageがあります。

フォームには、xpageからビューxpageに移動する閉じるボタンがあります。[閉じる]ボタンをクリックしても検証が実行されないように無効にします。

ボタンのボタンプロパティdisablevalidatorsをtrueに設定しましたが、アプリケーションコントロールのバリデーターとエラーメッセージが引き続き表示されます。

それを機能させる方法はありますか?

サーバーバージョン:Domino 8.5.3 UP1

問題を示す例。ボタン1をクリックしますバリデーターはキックインしないでください。ボタン2のバリデーターは「何かを書く...」と表示するはずです。

<?xml version="1.0" encoding="UTF-8"?>

<xp:button value="close" id="button1" disableValidators="false">
    <xp:eventHandler event="onclick" submit="true"
        refreshMode="complete">
        <xp:this.action><![CDATA[#{javascript:sessionScope.test="dsf"}]]></xp:this.action>
    </xp:eventHandler>
</xp:button>
<xp:button value="Save" id="button2">
    <xp:eventHandler event="onclick" submit="true"
        refreshMode="complete">
        <xp:this.action><![CDATA[#{javascript:sessionScope.test="dsf"}]]></xp:this.action>
    </xp:eventHandler>
</xp:button>
<xp:br></xp:br>
<xp:br></xp:br>
<xp:inputText id="inputText1" required="true" rendered="true"
    disableClientSideValidation="true">

<xp:this.validators>
    <xp:validateRequired message="Write something.."></xp:validateRequired>
</xp:this.validators></xp:inputText>
<xp:message id="message1" for="inputText1"></xp:message>

4

1 に答える 1

0

縫い目がバグになる

<xp:button value="close" id="button1" disableValidators="false">
    <xp:eventHandler event="onclick" submit="true"
        refreshMode="complete" immediate="false" save="true" disableValidators="true">
        <xp:this.action><![CDATA[#{javascript:sessionScope.test="dsf"}]]></xp:this.action>
    </xp:eventHandler>
</xp:button>

最初と 2 番目の disableValidators="false" をチェックしてください。最初のものは、ボタンのプロパティを介して追加したときに由来します。これは効果がありません。2つ目は、イベントタブで「検証なしのプロセスデータ」をチェックすることから来ます。これは機能します。

于 2012-08-08T14:49:09.820 に答える