I have a page which includes content from another page dynamically (this is done by a method in the bean)
firstPage.xhtml
<ui:include src="#{managedBean.pageView}">
<ui:param name="method" value="#{managedBean.someAction}"/>
</ui:include>
This redirects to a secondPage which is within <ui:composition>
which has commandButton.
secondPage.xhtml
<ui:composition>
..
..
<p:commandButton actionListener=#{method} value="Submit"/>
</ui:composition>
ManagedBean
public String pageView(){
return "secondPage.xhtml";
}
public void someAction(){
*someAction*
}
The commandButton in the secondPage.xhtml is not working.
Any help shall be much appreciated.