Updating sidebar

UI Components for JSF
Post Reply
Lee Gao Shei
Posts: 1
Joined: 25 Mar 2020, 19:50

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:

Code: Select all

<p:commandButton value="Edit profile" update="" actionListener="#{editMyProfileManagedBean.updateProfile}"/>

Melloware
Posts: 1670
Joined: 22 Apr 2013, 15:48

26 Mar 2020, 17:51

Can't you give the sidebar and ID and then reference that ID in the update="" ?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 8.0 / PF Extensions 8.0

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests