title: PrimeFaces clear the text fields on submitting the form
body: <p>I have a code which is for a Registration Form. There are some fields and a Submit button of type <code>&lt;p:commandButton&gt;.</code>Now when I submit the button it shows a datatable under the form which renders the values of the input filed.
  I want to clear the input text fields after the form submit. But the values remains.
  How can I clear the values of the text fields of the form?</p>
  
  <pre><code>&lt;p:panel header="Registration Form" closable="true" closeSpeed="100" toggleable="true" toggleSpeed="100" toggleOrientation="vertical"&gt;
              &lt;h:panelGrid columns="2" cellpadding="5"&gt;
                  &lt;p:outputLabel value="*First Name"/&gt;
                  &lt;p:inputText id="firstname" value="#{registrationDetails.firstName}" required="true" label="First Name" requiredMessage="First Name required!"/&gt;
  
                  &lt;p:outputLabel value="*Last Name"/&gt;
                  &lt;p:inputText id="lastname" value="#{registrationDetails.lastName}" required="true" label="Last Name" requiredMessage="Last Name required!"/&gt;
  
                  &lt;p:outputLabel value="Location"/&gt;
                  &lt;p:selectOneMenu id="location" value="#{registrationDetails.location}"&gt;
                      &lt;f:selectItem itemLabel="Select Location" itemValue=""/&gt;
                      &lt;f:selectItems value="#{registrationDetails.locations}"/&gt;
                  &lt;/p:selectOneMenu&gt;
  
                  &lt;p:outputLabel id="email" value="*Email"/&gt;
                  &lt;p:inputText value="#{registrationDetails.email}" required="true" label="Email" requiredMessage="Email address required!"/&gt;
  
                  &lt;p:outputLabel value="*Contact Number"/&gt;
                  &lt;p:inputText id="contactNumber" value="#{registrationDetails.contactNumber}" autocomplete="false" maxlength="10" required="true" label="Contact Number" requiredMessage="Contact Number required!"/&gt;
  
                  &lt;p:outputLabel value="Address"/&gt;
                  &lt;p:inputTextarea value="#{registrationDetails.address}"/&gt;
              &lt;/h:panelGrid&gt;
  &lt;p:commandButton  value="Submit" actionListener="#{registrationDetails.formSubmit}" id="buttonSubmit" 
                          update="form:msg form:regDetailPanel form:regData" ajax="true"&gt;
                  &lt;f:attribute name="fname" value="#{registrationDetails.firstName}"/&gt;
                  &lt;f:attribute name="lname" value="#{registrationDetails.lastName}"/&gt;
                  &lt;f:attribute name="loc" value="#{registrationDetails.location}"/&gt;
                  &lt;f:attribute name="email" value="#{registrationDetails.email}"/&gt;
                  &lt;f:attribute name="contact" value="#{registrationDetails.contactNumber}"/&gt;
                  &lt;f:attribute name="address" value="#{registrationDetails.address}"/&gt;
                  &lt;p:ajax event="click" immediate="true" update="form:regDetailPanel form:regData"/&gt;
              &lt;/p:commandButton&gt;
  </code></pre>