title: How to clear form fields and rerender form with RichFaces
body: <p>I'm stuck at pretty simple task: I have a search form where the search criteria are stored is SearchCriteriaSession bean, so it could be remembered and pre-filled. And I want to add reset button to that form that would: </p>
  
  <p>1) clear the criteria from bean, therefore call clearSearchCriteria() method of the bean<br>
  2) rerender the form, so the fields would be empty</p>
  
  <p>Here's my code and I have no idea why it's not working:</p>
  
  <p>search.xhtml</p>
  
  <pre><code>...
  &lt;h:form id="criteriaForm"&gt;
      &lt;div class="controls"&gt;
          &lt;h:inputText type="text" id="testName" value="#handlingBean.criteria.testName}" /&gt;
      &lt;/div&gt;
  
      //more input fields but with same format
  
      &lt;div class="form-actions"&gt;
          &lt;r:commandButton action="#searchCriteriaSession.clearSearchCriteria}" value="Reset" render="@form :criteriaForm" /&gt;
      &lt;/div&gt;
  &lt;/h:form&gt;
  ...
  </code></pre>
  
  <p>The <em>searchCriteriaSession.clearSearchCriteria</em> just clears criteria. When I debug it I see it correctly cleared. Even when I refresh the page the form clears, so the problem is that the <em>render</em> attribute is not working correctly, I guess.</p>
  
  <p>Does anybody can please help me?</p>
  
  <p>P.S.: I'm using RichFaces, this maven artifact:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.richfaces.compat&lt;/groupId&gt;
      &lt;artifactId&gt;richfaces-components-rich&lt;/artifactId&gt;
      &lt;version&gt;4.5.0.Alpha2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>