I have a datalist"gouvernorats" extracted from a data table and each item of the list is a command link that outcome an other page which contains a list "villes" referenced to the item. My code doesn't work.I ask someone to help me running it.
gouvernorat.xhtml
<c:forEach varStatus="#{stat}" items="gouvernoratbean.gouvernorats" var="gouv"><c:set var="villes" scope="request" value="${gouv.getvilles}"/>
<h:commandLink action="ville" actionListener="#{gouvernoratbean.showville}" value="#{gouv.nomGouv}"><f:setPropertyActionListener target="#{requestscope.gouv}" value="#{gouv}"></f:setPropertyActionListener>
</h:commandLink></c:forEach>
ville.xhtml
<p:dataList value="#{requestScope.gouvernoratbean.showville}" var="ville" >
<h:outputText><h2>#{ville.nomVille}</h2> </h:outputText> </p:dataList>
gouvernoratbean.java
public void showville(ActionEvent event){Villes=gouv.getVilles();}