JSF/PrimeFaces 3.5JSF验证和js豆行动之前
页上点击,当我需要:命令按钮来首先(需要输入文本=真)
if validationFail == false then
Call the popup dialog from js :
else
show requiredMessage from inputText (this field is mandatory...)
我的检查验证已尝试使用oncomplete,但它调用我的bean和js弹出对话框后。我不想要它。
I need in this order : click p:button -> check validation -> if not fails -> show primefaces dialog.
if fails after validation-> render message
我的XHTML:
<p:commandButton id="btnSalvar"
value="abc"
action="#{notaFiscalManagedBean.salvar}"
oncomplete="if (args.validationFailed) return true; else return showPF_DiagBox()"
在我showPF对话框我调用Bean方法。如果确定用户点击。
没办法。在我的commandButton中,我必须在点击时调用我的js,并忽略调用js对话框的验证 – Al2x
请发布导致此问题的inputText标记。 – N0nbot
它是一个简单的inputText在h:form里面。它是
p:inputText> – Al2x