验证在“列表”框中呈现的文本框

时间:2023-02-12 22:29:20

`

   <listitem self="@{each='idSequence'}" value="@{idSequence}">
        <listcell>
            <intbox value="@{idSequence.currentIndex,save-when='Save.onClick'}" constraint="no empty" />
        </listcell>
        <listcell>
            <intbox value="@{idSequence.startIndex}" onBlur="validateStartIndex(self)" constraint="no empty" />
        </listcell>

On click of the save button i need to check that the currentIndex is always greater than the startIndex ....

单击保存按钮,我需要检查currentIndex是否始终大于startIndex ....

The way i do it currently is to use getSelectedItems and iterate over it to do the validation.

我目前的方式是使用getSelectedItems并迭代它来进行验证。

Is there a alternate or better way of doing the same ?

是否有替代或更好的方法来做同样的事情?

1 个解决方案

#1


0  

You can use the onBindingSave event to do so, please take a look at the document of Databinding Validation.

您可以使用onBindingSave事件来执行此操作,请查看数据绑定验证文档。

#1


0  

You can use the onBindingSave event to do so, please take a look at the document of Databinding Validation.

您可以使用onBindingSave事件来执行此操作,请查看数据绑定验证文档。