title: Reset inputText after Button Click with JSF
body: <p>Is it possible to reset the value of an inputText after clicking on the commandButton in JSF? The inputText UIElement provides the method ResetValue so I tried something like this:</p>
  
  <pre><code>&lt;h:inputText  id="measurementadd" binding="#{inputTextMeasurement}"&gt;
      &lt;f:validateRegex pattern="[a-zA-Z ]*"/&gt;
      &lt;f:ajax event="keyup" render="measurementaddmessage submit" execute="@this"/&gt;
  &lt;h:inputText&gt;
  &lt;p:commandButton id="submit" action="#{Bean.addMeasurement(inputTextMeasurement.value)}" 
  value="submit" update="dataTable measurementadd measurementaddmessage" 
  disabled="#{empty inputTextMeasurement.value or facesContext.validationFailed }" &gt;
      &lt;f:ajax event="mouseup" execute="#{inputTextMeasurement.resetValue()}" /&gt;
  &lt;/p:commandButton&gt;  
  &lt;h:messages for="measurementadd" id="measurementaddmessage"/&gt;  
  </code></pre>
  
  <p>But after clicking the Button the inputTextMeasurement doesn't reset it's value.</p>
  
  <p>Does someone know a good workaround for this?</p>
  
  <p>I'm searching for a solution without JS and JAVA, so a realization in JSF would be very cool.</p>