1

我有一个带有空验证字段的 xpage。

在表单上,​​我有一个关闭按钮,可以从 xpage 导航到视图 xpage。我想禁用,所以如果我点击关闭按钮,验证就不会运行。

我确实在按钮上将按钮属性禁用验证器设置为 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>

检查第一个和第二个 disableValidators="false" 当您通过按钮属性添加它时,第一个来自。这个没有效果。第二个来自检查事件选项卡上的“未经验证的过程数据”这个有效。

于 2012-08-08T14:49:09.820 回答