0 Replies Latest reply on Mar 5, 2008 5:30 PM by nassij.nassij.zouhair.hotmail.com

    Problem whith h:commandButton action

    nassij.nassij.zouhair.hotmail.com

      Hello everyone;
      Here are the details of my problem:
      I have userHome.persistWithAffectation an action that I invoke from a commandButton


      <h:commandButton id="save"
      action="#{userHome.persistWithAffectation}"
      rendered="#{!userHome.managed}" image="/img/disk.gif">
      </h:commandButton>



      The problem is that by invoking this action - which will persist my data and then make a simple treatment he crushes the values of user sessions by the value that I have come. and  in Debug mode I realized that it does not in my method.



      public String persistWithAffectation()
           {
                super.persist();
                societeUserHome.getInstance().setSociete(this.currentSociete);
                User user = this.getInstance();
                societeUserHome.getInstance().setUser(user);
                societeUserHome.persist();
                this.getInstance().getSocieteUsers().add(societeUserHome.getInstance());
                return "persisted";
           }