7 Replies Latest reply on Feb 19, 2010 6:55 AM by leelavathic leelavathic

    h:selectOneMenu's  valueChangeListener is invoked on submit of a page

    leelavathic leelavathic Novice



      I have with a value change listener and a command button. Please find the code snippet as below.


      <h:selectOneMenu id="status" value="#{mgdBean.status}" valueChangeListener="#{mgdBean.processStatusChange}">
          <a4j:support event="onchange" reRender="mapdMdlPnl" limitToList="true" oncomplete="showModal('#{mgdBean.showMappedVal}')"/>
          <f:selectItem itemValue="ENABLED" itemLabel="Enabled"/>
          <f:selectItem itemValue="DISABLED" itemLabel="Disabled"/>   
      <a4j:commandButton id="addSave"  title="Save"  action="#{mgdBean.savePage}"/>             


      On click of the save button the value change listener, processStatusChange() is invoked then the control goes to savePage() action method the a4j:commandButton.


      Can any one tell me why the value change listener is invoked, which is not supposed to happen unlesss I change the value in it?


      I am using Richfaces 3.3.1 GA and its deployed in Apache Tomcat 6.0.16.