【问题标题】:what is onSuccess,aJax in commandButton?什么是 onSuccess,aJax in commandButton?
【发布时间】:2014-06-03 07:26:08
【问题描述】:

在我的 xhtml 中,我有:

<p:commandButton actionListener="#{accountInfoBean.onChangePassword}"
    ajax="true" onsuccess="changePasswordDlgVar.show()"
    update=":changePassForm:changePasswordPanel" />

我的豆子:

private String password;
private String confirmPassword;


public void onChangePassword() {
    this.password = null;
    this.confirmPassword = null;
}

我不明白数据库中的密码如何更改以及onsuccess、ajax 和update 属性是什么?

【问题讨论】:

  • 您需要使用数据库查询手动完成的功能

标签: jsf primefaces


【解决方案1】:

onSuccess 指向的 javascript 函数在服务器响应完成且没有错误后执行。

编辑

环顾四周,我发现this 和this 问题加上documentation。 来自关于 onsuccess 的文档Client side callback execute before dom is updated. 稍后我将尝试解释示例。

【讨论】:

  • 你能举例一个简单的javascript函数吗
  • @user3478624 "alert('operation was successful');"
猜你喜欢
  • 2019-08-06
  • 2010-11-17
  • 1970-01-01
  • 2022-12-26
  • 1970-01-01
  • 2010-12-26
  • 1970-01-01
  • 2014-12-01
  • 2014-06-11
相关资源
最近更新 更多