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>

相关文章

我有一个网格,可以根据更大的树结构编辑小块数据.为了更容易...
我即将开始开发一款教育性的视频游戏.我已经决定以一种我可以...
我正在使用带有Grails2.3.9的Dojo1.9.DojoNumberTextBox小部...
1.引言鉴于个人需求的转变,本系列将记录自学arcgisapiforja...
我正在阅读使用dojo’sdeclare进行类创建的语法.描述令人困惑...
我的团队由更多的java人员和JavaScript经验丰富组成.我知道这...