title: ValueChangeListener not working
body: <p>This is my code in my managed bean :-</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"&gt;
      &lt;h:head&gt;
          &lt;title&gt;Facelet Title&lt;/title&gt;
      &lt;/h:head&gt;
      &lt;h:body&gt;
          &lt;center&gt;
              &lt;h:form&gt;
                  &lt;h2&gt; &lt;u&gt;Select Fruit(s). &lt;/u&gt; &lt;/h2&gt;
  
                  &lt;!-- Value Change Listener is entirely superflous. You can make a full blown project without requiring the need to ever use this...This is
                  just for demo purpose..--&gt;
  
                  &lt;h:selectManyMenu onchange="document.forms[0].submit();" style="height: 200px;font-size: 1.5em;width: 200px;"   &gt;
                      &lt;f:selectItems value="#{actionValueLisBean.fruitsList}" var="fruit" itemLabel="#{fruit}" itemValue="#{fruit}"/&gt;
  
                      &lt;f:valueChangeListener type="beans.ActionValueLisBean"/&gt;
                  &lt;/h:selectManyMenu&gt;
  
                  &lt;h3&gt; Your previous selection is :&lt;h:outputText value="#{actionValueLisBean.prevSel}"/&gt;&lt;/h3&gt;
                  &lt;h3&gt;Your current selection is :&lt;h:outputText value="#{actionValueLisBean.currSel}"/&gt;&lt;/h3&gt;
  
              &lt;/h:form&gt;
          &lt;/center&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is my bean :-</p>
  
  <pre><code>package beans;
  
  import com.sun.jmx.remote.internal.ArrayQueue;
  import java.util.List;
  import javax.enterprise.context.RequestScoped;
  import javax.faces.bean.ManagedBean;
  import javax.faces.event.AbortProcessingException;
  import javax.faces.event.ValueChangeEvent;
  import javax.faces.event.ValueChangeListener;
  
  @ManagedBean
  @RequestScoped
  public class ActionValueLisBean implements ValueChangeListener {
  
  
      private List&lt;String&gt; fruitsList;
      private String currSel;
      private String prevSel;
  
      public String getCurrSel() {
          return currSel;
      }
  
      public void setCurrSel(String currSel) {
          this.currSel = currSel;
      }
  
      public String getPrevSel() {
          return prevSel;
      }
  
      public void setPrevSel(String prevSel) {
          this.prevSel = prevSel;
      }
  
  
  
      public List&lt;String&gt; getFruitsList() {
          return fruitsList;
      }
  
      public void setFruitsList(List&lt;String&gt; fruitsList) {
          this.fruitsList = fruitsList;
      }
  
  
  
      public ActionValueLisBean() {
          fruitsList = new ArrayQueue&lt;String&gt;(5);
  
          fruitsList.add("Apple");
          fruitsList.add("Mango");
          fruitsList.add("Banana");
          fruitsList.add("Peach");
          fruitsList.add("Plum");
  
      }
  
      @Override
      public void processValueChange(ValueChangeEvent event) throws AbortProcessingException {
  
              if(event.getOldValue() != null)
                  prevSel = event.getOldValue().toString();
              if(event.getNewValue() != null)
                  currSel  = "abc";
  
      }
  
  
  }
  </code></pre>
  
  <p>And then i have prevSel and currSel is bound to <code>h:outputText</code>. But the value is not getting even though the processValueChange is fired correctly and <code>System.out.println(event.getNewValue());</code> is also working fine. I tried setting different scopes of bean too but no use. I know ValueChangeListener is entirely useless. Still i want to know how it works.</p>
  
  <p>Thanks in advance :)</p>