1 Reply Latest reply on Aug 2, 2012 8:13 AM by r035198x

    how updating the content of a  jsf ui using actionListner of a button?

      Hi all

      I am seeking to update then content of a div in jsf using a java class MenuContent (Managed bean + session scope)

      * To change this template, choose Tools | Templates
      * and open the template in the editor.
      package beans;

      import javax.faces.bean.ManagedBean;
      import javax.faces.bean.SessionScoped;

      * @author ouboujlal
      public class MenuContent {
      private static String page;

      public String getPage() {
      return page;

      public void setPage(String page) {
      this.page = page;

      public MenuContent(){
      page = "personnelPage";

      ans in the button:

      <h:commandButton value="Test" actionListener="#{menuContent.setPage('ListGuests')}" />

      then I include the UI in my xhtml page:

      <ui:include src = "./pages/#{menuContent.page}.xhtml" />


      the problem is that the page doesn't change(because the attribute page in the MenuContent class doesn't )

      is there any annotation I have to add or chage the make that attribute change? because I really don't know why it still the seem

      thanks for help