Jsf 什么是onSuccess,commandButton中的aJax?
在我的xhtml中,我有:Jsf 什么是onSuccess,commandButton中的aJax?,jsf,primefaces,Jsf,Primefaces,在我的xhtml中,我有: <p:commandButton actionListener="#{accountInfoBean.onChangePassword}" ajax="true" onsuccess="changePasswordDlgVar.show()" update=":changePassForm:changePasswordPanel" /> 我不明白数据库中的密码是如何更改的,以及什么是onsuccess、ajax和update属性?onsu
<p:commandButton actionListener="#{accountInfoBean.onChangePassword}"
ajax="true" onsuccess="changePasswordDlgVar.show()"
update=":changePassForm:changePasswordPanel" />
我不明白数据库中的密码是如何更改的,以及什么是
onsuccess
、ajax
和update
属性?onsuccess
指向的是服务器响应完成且没有错误后要执行的javascript函数
编辑
环顾四周,我发现了一个问题。
来自有关onsuccess的文档在更新dom之前执行客户端回调。
稍后我将尝试解释示例 您需要使用DB querycan手动完成的功能可以作为一个简单的javascript示例function@user3478624
“警报(‘操作成功’);”
private String password;
private String confirmPassword;
public void onChangePassword() {
this.password = null;
this.confirmPassword = null;
}