title: JSF+Primefaces p:ajax on p:selectOneMenu not firing
body: <p>I have a dropdown that holds an account number and two date fields. I want to reset the date fields if I change the value of the dropdown. I also have a search button that make a query using these fields (account #, from date, to date).</p>
  
  <pre><code>&lt;fieldset&gt;
      &lt;p:selectOneMenu id="account_search" value="#{accountHistoryBean.account}" converter="accountConverter"&gt;
          &lt;f:attribute name="itemsList" value="#{accountHistoryBean.userAccounts}"/&gt;
          &lt;f:selectItems value="#{accountHistoryBean.userAccounts}" var="account" itemLabel="#{account.number}" itemValue="#{account}"/&gt; 
          &lt;p:ajax update="start_date_search, end_date_search" event="change" actionListener="#{accountHistoryBean.resetDates}" process="account_search"/&gt; 
      &lt;/p:selectOneMenu&gt;
  &lt;fieldset&gt;
  
  &lt;fieldset&gt;
      &lt;p:calendar value="#{accountHistoryBean.fromDate}" id="start_date_search" pattern="dd/MM/yyyy"/&gt;
  &lt;/fieldset&gt;
  
  &lt;fieldset&gt;
      &lt;p:calendar value="#{accountHistoryBean.toDate}" id="end_date_search" pattern="dd/MM/yyyy"/&gt;
  &lt;/fieldset&gt;
  
  
  
  &lt;fieldset&gt;
      &lt;p:commandLink styleClass="regular_button" action="#{accountHistoryBean.search}" update=":search :accountHistoryList :accountHistoryList:accountHistTable" &gt;
          &lt;span&gt;#{msj.search}&lt;/span&gt;
       &lt;/p:commandLink&gt;
   &lt;/fieldset&gt;
  </code></pre>
  
  <p>If I do the following:</p>
  
  <ol>
  <li>Change "from Date" and "to Date" fields</li>
  <li>Change account field (dropdown with ajax).</li>
  </ol>
  
  <p>Then the dates are resetted to their default value. </p>
  
  <p>But if I do the following:</p>
  
  <ol>
  <li>Change "from Date" and "to Date" fields to DATEX AND DATEY</li>
  <li>Press search</li>
  <li>Change "from Date" and "to Date" fields to DATEX2 AND DATEY2</li>
  <li>Change account field (dropdown with ajax).</li>
  </ol>
  
  <p>Then it changes the Date field to DATEX and DATEY (not the default values).</p>
  
  <p>The methods in the Bean are the following:</p>
  
  <pre><code>public void resetDates()
  {
      Calendar calendar = GregorianCalendar.getInstance();
      //By default set toDate as 3/3
      calendar.set(Calendar.MONTH, 2);
      calendar.set(Calendar.DAY_OF_MONTH, 3);
      toDate = calendar.getTime();
      //By default fromDate is one month earlier
      calendar.setTime(toDate);
      calendar.add(Calendar.MONTH, -1);
      fromDate = calendar.getTime();
  }
  
  public String search(){
      //Just update the filters
      lazyDataEntityModel.setUpdateData(true);
      return null;
  }
  </code></pre>
  
  <p>Any help?</p>