0

In my xhtml I have:

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

My bean:

private String password;
private String confirmPassword;


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

I don't understand how password changes in database and what are onsuccess, ajax and update attributes?

Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332
user3478624
  • 23
  • 1
  • 12

1 Answers1

0

onSuccess is pointing javascript function that is to be executed after server responded is complete and there is no error.

EDIT

looked around about it and i found this and this question plus documentation. From documentation about onsuccess Client side callback execute before dom is updated. I'll try to put explaining example bit later.

Community
  • 1
  • 1
T.G
  • 1,913
  • 1
  • 16
  • 29