微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

XPages – 禁用Dojo组合框的客户端验证

我正在尝试禁用Dojo组合框的客户端验证失败.我添加一个dojo属性required”并将其设置为false但这仍然无效.我确实希望启用服务器端验证,这就是我设置required =“true”的原因.任何人都可以看到需要对以下代码进行哪些更改?

<xe:djComboBox id="djComboBox1" required="true" disableClientSideValidation="true">
<xe:this.dojoAttributes>
<xp:dojoAttribute name="required" value="false">
</xp:dojoAttribute>
</xe:this.dojoAttributes>
<xp:selectItem itemLabel="" />
<xp:selectItem itemLabel="Apples" />
<xp:selectItem itemLabel="Oranges" />
<xp:selectItem itemLabel="Pears" />
<xp:selectItem itemLabel="Bananas" />
<xp:selectItem itemLabel="Plums" />
</xe:djComboBox>

解决方法

尝试使用始终返回true的方法覆盖组合框的客户端验证公式:

<xe:djComboBox
    id="djComboBox1"
    required="true"
    validatorExt="return true;">
    <xp:selectItem itemLabel="" />
    <xp:selectItem itemLabel="Apples" />
    <xp:selectItem itemLabel="Oranges" />
    <xp:selectItem itemLabel="Pears" />
    <xp:selectItem itemLabel="Bananas" />
    <xp:selectItem itemLabel="Plums" />
</xe:djComboBox>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐