seam中的<s:validateEquality>标签

来源:互联网 发布:15年广东省的经济数据 编辑:程序博客网 时间:2024/05/01 07:07
Tag to nest inside an input control to validate that its parent's value is equal (or not equal!) to the
referenced control's value.
Attributes
• for — The id of a control to validate against.
• message — Message to show on failure.
• required — False will disable a check that a value at all is inputted in fields.
• messageId — Message id to show on failure.
• operator — What operator to use when comparing the values Valid operators are:
• equal — Validates that value.equals(forValue)
• not_equal — Validates that !value.equals(forValue)
• greater — Validates that ((Comparable)value).compareTo(forValue) > 0
• greater_or_equal — Validates that ((Comparable)value).compareTo(forValue) >= 0
• less — Validates that ((Comparable)value).compareTo(forValue) < 0
• less_or_equal — Validates that ((Comparable)value).compareTo(forValue) <= 0
Usage
<h:inputText id="name" value="#{bean.name}"/><h:inputText id="nameVerification" ><s:validateEquality for="name" /></h:inputText>


0 0
原创粉丝点击