dynamic - Conditional jsf include -
how can conditionally include jsf facelets file @ runtime? sample functionality required if ( add button click) { ui:include src="add.xhtml" } if ( update button click) { ui:include src="update.xhtml" } the syntax above indicative ... mojarra 2.1.1 / apache tomcat 7.0.22 / primefaces 3.4 ui:include doesn't have rendered attribute have encapsulate in other component. set property on server base on button clicked. <h:form> <p:commandbutton value="add" update=":includecontainer"> <f:setpropertyactionlistener value="add" target="#{mybean.action}"/> </p:commandbutton> <p:commandbutton value="update" update=":includecontainer"> <f:setpropertyactionlistener value="update" target="#{mybean.action}"/> </p:commandbutton> </h:form> <h:panelgroup id="includecontainer"> <h:panelgroup re...