title: JSF dynamic include using Ajax request
body: <p>In JSF2, is it possible to change the of value of src of ui:include dynamically using Ajax request (like for example PrimeFaces p:commandButton)?
  Thank you.</p>
  
  <pre><code>&lt;h:form&gt;                        
      &lt;h:commandLink value="Display 2" action="#{fTRNav.doNav()}"&gt;
          &lt;f:setPropertyActionListener target="#{fTRNav.pageName}" value="/disp2.xhtml" /&gt;
      &lt;/h:commandLink&gt;
  &lt;/h:form&gt;
  
  &lt;ui:include src="#{fTRNav.pageName}"&gt;&lt;/ui:include&gt;
  </code></pre>
  
  <p>That's what I have right now. Is it possible to make it Ajax (using p:commandButton)?</p>