简体   繁体   English

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

[英]Validation of text boxes rendered within a List box

` `

   <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 ? 是否有另一种或更好的方法可以做到这一点?

您可以使用onBindingSave事件来执行此操作,请查看Databinding Validation的文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM