title: <h:form action="#{bean.method()}"> gets called twice
body: <p>I am writing a Java EE application for changing password. For taking old and new password inputs I am using a jsf form.</p>
  
  <pre><code> &lt;h:form method="post" action="#{changePass.updatePassword()}" &gt;
       &lt;h:inputText id="username" value = "#{changePass.username}" readonly="true" required="true"/&gt;
       &lt;h:inputSecret id="oldPassword" value = "#{changePass.oldPassword}" required="true" /&gt;
       &lt;h:inputSecret id="newPassword" value = "#{changePass.newPassword}" required="true" /&gt;
       &lt;h:inputSecret id="confirmPassword" value = "#{changePass.confirmPassword}" required="true" /&gt;
       &lt;button id="update" type="submit"&gt;&lt;/button&gt;
   &lt;/h:form&gt;
  </code></pre>
  
  <p>My intention is to call updatePassword() function in changePass bean class when user clicks on the button. But this fuction gets called twice in this form. </p>
  
  <ol>
  <li>when the form loads</li>
  <li>When the user clocks on the button</li>
  </ol>
  
  <p>How can I avoid this calling during the form load?</p>