title: JSF 2 Execute action on button click
body: <p>I have this JSF code</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;f:view&gt;
      &lt;h:form&gt;                    
          &lt;h:commandButton value="Generate License File" type="button" action="#{agreement.generateLicenseFile}"/&gt;                    
      &lt;/h:form&gt;
  &lt;/f:view&gt;
  </code></pre>
  
  <p>And this is the bean</p>
  
  <pre><code>@ManagedBean(name="agreement")
  @RequestScoped
  public class AgreementBean {
  
      private boolean generate=false; 
  
      public void generateLicenseFile(){
          generate=true;
      }
  }
  </code></pre>
  
  <p>When I execute the app, and click on the button, absolutely nothing happens. There are no errors in the execution. It simply doesn't do a thing. </p>
  
  <p>Any ideas?</p>
  
  <p>--EDIT--</p>
  
  <p>What I mean is that the boolean's value isn't modified.</p>