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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…