title: Conditional jsf include
body: <p>How can I conditionally include a jsf facelets file at runtime?
  sample functionality required is </p>
  
  <pre><code>if ( add button click) {
  
  ui:include src="Add.xhtml"
  }
  
  if ( update button click) {
  
  ui:include src="Update.xhtml"
  }
  </code></pre>
  
  <p>the syntax above is only indicative ...</p>
  
  <p><strong>Mojarra 2.1.1 / Apache Tomcat 7.0.22 / PrimeFaces 3.4</strong></p>