3 Replies Latest reply on May 15, 2006 7:42 AM by karakoyun

    valueChangeListener working ?

    karakoyun

      I am not sure it is my usage or functionality is still missing:

      I am getting NoSuchMethodException on call to valueChangeListener in h:selectOneMenu. I checked forums and the last one was from last year and it claimed it was not working. I wonder whether is working now.

      Thanks,

      Karakoyun

        • 1. Re: valueChangeListener working ?
          anders.hedstrom

          have you declared the method you're calling in your component?

          <h:selectOneMenu valueChangeListener="#{myComp.listenerMethod}"...


          comp code

          public void listenerMethod(ValueChangeEvent event)...


          • 2. Re: valueChangeListener working ?
            armita

            It works for me just fine.

             <h:selectOneMenu id="type" value="#{neBean.neType}" valueChangeListener="#{neLogic.processValueChange}"
             onchange="this.form.submit();">
            


            • 3. Re: valueChangeListener working ?
              karakoyun

              Thanks for the replies. Yes the method:
              public void valueChanged(ValueChangeEvent event)
              is invoked but I can not access the value that is defined in <h:selectOneMenu value="#{bean.value}" .../> in that method. It is null :(

              I assumed the value would be submitted whenever the above method gets called in my bean.

              Thanks,