I hope you can help me. I work with jsf and richefaces, I have a jsf page and I want to include all other pages according to a parameter and my problem is how can I introduce the test condition in my xhtml file.
THanks for your response, there is my code but it does not work, my bean
public class TestBean { private boolean ajoutH; private boolean listH; public boolean isListH() { FacesContext fc = FacesContext.getCurrentInstance(); Map<String,String> params = fc.getExternalContext().getRequestParameterMap(); String id = params.get("listH"); if(id.equals("listH")){ return true;} else{ return false; } } public boolean isAjoutH() { FacesContext fc = FacesContext.getCurrentInstance(); Map<String,String> params = fc.getExternalContext().getRequestParameterMap(); String id = params.get("ajoutH"); if(id.equals("ajoutH")){ return true;} else{ return false;} And my page jsf
<rich:panelMenuGroup label="Hotes"> <rich:panelMenuItem> <h:outputText value="Ajouter Hote" event="onclick"> <f:param value="{ajoutH}" name="ajoutH" /> </h:outputText> </rich:panelMenuItem> <rich:panelMenuItem > <h:outputText value="Gérer Hotes" > <f:param value="{listH}" name="listH" /> </h:outputText> ...... <h:panelGroup rendered="#{TestBean.ajoutH}"> <ui:include src="./ajoutHote.xhtml"/> </h:panelGroup> <h:panelGroup rendered="#{TestBean.listH}"> <ui:include src="./listHotes.xhtml"/> </h:panelGroup>