How to trigger component refresh from javascript in primefaces?

后端 未结 5 1995
长发绾君心
长发绾君心 2020-12-29 03:53

Is it possible to update a PrimeFaces component from javascript so that it would be force to refresh?

I am making an ajax save call using this button in a dialog. I

5条回答
  •  抹茶落季
    2020-12-29 04:14

    My advice:

    1. Use with an actionListener attribute. This attribute invokes a backing bean method that contains FacesContext.addMessage code, this way:
    2. Next, in your handleSaveNewMember script, invoke the remoteCommand name attribute after addMemberDlg.hide(); this way: . Then, function handleSaveNewMember(xhr, status, args) { addMemberDlg.hide(); testScript(); }
    3. Add update attribute to remoteCommand pointing growl component:
    4. Your commandButton is OK.

    This worked for me.

    Greetings.

提交回复
热议问题