title: Cancel button call setter getter method in jsf
body: <p>I have a screen and there are 2 buttons-Accept and Cancel where user can Acept the value or cancel the value.</p>
  
  <pre><code>&lt;div align="center"&gt;
      &lt;p:commandButton id="cmdAccept" value="#{label.accept}" action="acceptChange"
          update="certHolderInfo" disabled="#{certHolderDetail.readOnlyHolderInfo}" /&gt; 
      &lt;p:spacer width="10" height="5" /&gt;
      &lt;p:commandButton id="cmdCancel" value="#{label.cancel}" action="cancel" /&gt;
      &lt;p:spacer width="10" height="5" /&gt;
  &lt;/div&gt;
  &lt;p:hotkey bind="Alt+A" action="acceptChange" /&gt;
  &lt;p:hotkey bind="Alt+C" action="cancel" /&gt;
  </code></pre>
  
  <p>When clicking on cancel button it's calling the setter-getter method and update the value of bean. And also when I click on cancel button I am simply going back to previous screen(view) like:</p>
  
  <pre><code>&lt;transition on="cancel" to="CMSCertificateHolderInfo" /&gt;
  </code></pre>
  
  <p>Ideal condition is that on clicking the cancel button it should not call the setter-getter method of bean. How can I achieve this?</p>