1 Reply Latest reply on Nov 12, 2007 11:38 AM by Pete Muir

    valueChangeListener problem

    hager hager Newbie

      hello,
      I'm trying to use valueChangeListener, but i have a problem
      the method in valueChangeListener is never called!!
      what's wrong in my code?

      page .xhtml

      <h:form id="changerForm" styleClass="edit">
      
       <h:selectOneMenu value="#{currentSociete}" id="selectedSociete" onchange="this.form.submit();" valueChangeListener="#{changerSociete.onChangeSociete}">
       <s:selectItems value="#{loggedUser.listeSocieteUsers}"
       var="societeUser"
       label="#{societeUser.societe.codeSociete}"/>
       <s:convertEntity />
       </h:selectOneMenu>
      
      </form>


      My SFSB :
      @Stateful
      @Name("changerSociete")
      public class ChangerSocieteBean implements ChangerSociete {
      
      
       @Begin @Create
       public void init()
       {
       System.out.println("Debut du Bean Session changerSociete");
       }
      
       public void onChangeSociete(ValueChangeEvent event) {
       System.out.println("Event : " + event);
       System.out.println("New value : " + event.getNewValue());
       }
      
      
       public String getNouvelleSociete()
       {
       System.out.println("getNouvelleSociete () ");
       return "/Societe.xhtml";
       }
      
       @Remove @Destroy
       public void destroy()
       {
       System.out.println("Mort du Bean Session changerSociete");
       }


      please help me, I'm desperate :(
      thx for help!