2 Replies Latest reply on May 1, 2007 3:53 PM by thierry baudouin

    JSF : how update a bean with balise <h:selectOneMenu  ?

    thierry baudouin Newbie

      Hello,

      i use richfaces library and build a web application.
      In my page, i have a list which i can select one element :

      Saison

      <h:selectOneMenu id="saisId"
       value="#{SaisonBean.currentSaison}" valueChangeListener= "#{SaisonBean.Change}"
       onchange="submit()" immediate="true"
       style="font-family: sans-serif; font-size: 8pt; width: 80%;" >
       <f:selectItems
       value="#{SaisonBean.listeSaisons}" />
       </h:selectOneMenu>





      My bean work because all elments from my Bean are in the list and the selected value is correct.
      But when i select an other element in the list, i would like top udate bean's attribute (currentValue).
      I read articles which explained that i had to write a listener like this:

      public void Change(ValueChangeEvent event)
       {
       System.out.println("Changement de personne");
       ...



      i never go in this code and if i change valueChangeListener= "#{SaisonBean.Change}" by valueChangeListener= "#{toto}", no error is displayed !!