title: h:selectManyListBox valueChangeListener is not calling
body: <p>I am using Netbeans 6.9.1. I am using code in which i am simply using selectManyListBox and i want that when user selects all the values then my valueChangeListener is call. Here what i am doing</p>
  
  <pre><code>&lt;h:selectManyListbox id="countryListBox" size="5" value="#{news.saarcCountries}"
                       onselect="form.submit();" valueChangeListener="#{news.changeAppearOnCountryPage}"&gt;
      &lt;f:selectItems value="#{news.saarcCountriesMap}"/&gt;
      &lt;f:ajax render="countryPageExpiryCalender" /&gt;
  
  &lt;/h:selectManyListbox&gt;
  
  &lt;p:calendar id="countryPageExpiryCalender" value="#{news.countryPageExpiryDate}"
              navigator="true" style="z-index: 1;" locale="en" mode="popup"
              pattern="dd/MM/yyyy" showOn="button" readOnlyInputText="true"
              disabled="#{!news.appearOnCountryPage}" /&gt;
  </code></pre>
  
  <p>I also tried this, instead of onselect i used onchnage like</p>
  
  <pre><code>onchange="submit()"
  </code></pre>
  
  <p>Here is my valueChangeListener</p>
  
  <pre><code>@ManagedBean(name = "news")
  @ViewScoped
  public class News {
  
      private Map&lt;String, String&gt; saarcCountriesMap = new LinkedHashMap&lt;String, String&gt;();
      private Set&lt;String&gt; saarcCountries = new TreeSet&lt;String&gt;();
      ...
  
      public void changeAppearOnCountryPage(ValueChangeEvent vcEvent){
          Iterator iter = saarcCountries.iterator();
          while(iter.hasNext()) {
  
              String name = (String)iter.next();
              System.out.println(name);
          }
      } //end of changeAppearOnCountryPage
  
  
  } //end of class News
  </code></pre>
  
  <p>I want that when user select all the values from the selectmanyListBox, then my valueChangeListener is call, and i check if i have the values in <strong>saarcCountries</strong> variable, then i set <strong>appearOncountryPage = true</strong>, so my calender is render. But my valueChangeListener is not calling. What i am doing wrong? </p>
  
  <p>If i choose onselect, then i want to ask one thing this event will trigger whenever i select the value, of after i have selected all the values. I want that when user select all the values then my ValueChangeListener is call and the values that user selected will be in my saarcCountries variable. So i can check the values that user selected.</p>
  
  <p>I think onchange() is not appropriate in my case. Please help. I am stuck because of it:(</p>
  
  <p>Thanks</p>