我从这个 Primefaces http://blog.primefaces.org/?p=1512博客中复制了关于简单密码验证的确切代码
<h:outputLabel for="pwd1" value="Password 1: *" />
<p:password id="pwd1" value="#{registerMB.password}"
feedback="false" match="pwd2" label="Password 1" required="true" />
<h:outputLabel for="pwd2" value="Password 2: *" />
<p:password id="pwd2" value="#{registerMB.password}"
feedback="false" label="Password 2" required="true" />
<f:facet name="footer">
<p:commandButton value="Register" action="/pages/public/login" />
<p:commandButton value="Cancel" immediate="true"
action="/pages/public/login" />
</f:facet>
验证有效,但我只能得到验证错误。永远不会显示消息密码 1 应与密码 2 匹配。是否还有此配置?
我下载了 Primefaces 3.4.1