2 Replies Latest reply on Feb 18, 2007 6:06 AM by Mohammad Norouzi

    valueChangeListener doesnt work in Seam?

    Mohammad Norouzi Novice

      Hello

      I have a selectOneMenu in my xhtml page, its valueChangeListener does not fire when a submit occurs.

      here is the xhtml file:

       <h:selectOneMenu id="rowPerPageOption" value="#{searchResult.rowPerPage}"
       valueChangeListener="#{searchResult.rowPerPageChanged}"
       onchange="oamSubmitForm('resultQuery',this.id);">
       <f:selectItem itemLabel="5" itemValue="5"/>
       <f:selectItem itemLabel="10" itemValue="10"/>
       <f:selectItem itemLabel="20" itemValue="20"/>
       <f:selectItem itemLabel="30" itemValue="30"/>
       </h:selectOneMenu>
      
      


      in session bean:

       public void rowPerPageChanged(ValueChangeEvent e) {
       logger.equals("Row Per page is:"+rowPerPage);
       rowPerPage = (Integer) e.getNewValue();
       logger.equals("Now row per page is:"+rowPerPage);
       dataModel = new LocalDataModel(rowPerPage,indexResultSet);
       }
      
      


      but the above code never execute!
      I am wondering if Seam accept this listener.
      if no, what workaround do I need to use?

      thanks