知道哪个验证在请求上下文回调中有错误

时间:2013-02-20 10:13:13

标签: jsf primefaces

在我的表格上

<h:inputText id="name" value="#{pointController.selected.name}" title="#{bundle.CreatePointTitle_name}" required="true" />

<h:inputText id="term" value="#{pointController.selected.term}" title="#{bundle.CreatePointTitle_term}" required="true" />

<p:commandButton styleClass="btn btn-primary" action="#{pointController.create}" value="#{bundle.CreatePointSaveLink}" oncomplete="handleComplete(xhr, status, args)" />

的javascript

function handleComplete(xhr, status, args) {  
    if(args.validationFailed) {  
        alert("failed");
    }  
}  

我怎么知道哪些输入字段没有输入或有验证问题?

0 个答案:

没有答案