I am trying to include facet and change the facet name using button action like this
<h:form>
<p:commandButton type="submit" value="Add" ajax="true" update=":tabs"
actionListener="#{sideBar.setCurrentFaceltName('todolist')}">
</p:commandButton>
</h:form>
and this is the layout where the facet is included
<p:layoutUnit id="tabs" style=" position: relative;" position="center">
<ui:include src="/WEB-INF/facelts/#{sideBar.currentFaceltName}.xhtml" />
</p:layoutUnit>
and i build the facet programmatically using binding
<h:body>
<h:panelGroup binding="#{test.dynamicFormGroup}" />
</h:body>
just a child UI component for the panel for test and it works fine if i include the facet directly like this
<ui:include src="/WEB-INF/facelts/todolist.xhtml" />
can any one help me with this? thanks in advance