Updating sidebar
Posted: 25 Mar 2020, 19:58
Good evening,
This may have been asked before, so I apologise for not doing my part to do a thorough search.
Is it possible to do an ajax update on a sidebar when a commandButton is click?
Here's my current situation:
I have 2 sidebars; 1 for when I click "view profile" and 1 for when I click "edit profile". I have a commandButton on edit profile which has an actionListener to do the necessary updates. All of the managedBean methods are done correctly and it's updating correctly. However, I want the changes to reflect on the "view profile" sidebar without having to refresh the page, but I'm unsure what to put inside the update attribute.
Here's a snippet of my commandButton with the update attribute left empty:
This may have been asked before, so I apologise for not doing my part to do a thorough search.
Is it possible to do an ajax update on a sidebar when a commandButton is click?
Here's my current situation:
I have 2 sidebars; 1 for when I click "view profile" and 1 for when I click "edit profile". I have a commandButton on edit profile which has an actionListener to do the necessary updates. All of the managedBean methods are done correctly and it's updating correctly. However, I want the changes to reflect on the "view profile" sidebar without having to refresh the page, but I'm unsure what to put inside the update attribute.
Here's a snippet of my commandButton with the update attribute left empty:
Code: Select all
<p:commandButton value="Edit profile" update="" actionListener="#{editMyProfileManagedBean.updateProfile}"/>