I have a problem with my datatable, I want display the information of a datatable’s row when selecting it, for that I created a value called currentChangerStatus I wanted to set it to the current selection, here is my code:
<p:dataTable id="projets" var="p" value="#{projet.init()}" rowSelectListener="#{projet.currentChangerStatus(currentChangerStatus)}" selectionMode="single" onRowSelectStart="datecreation">
<f:facet name="header">
Listes des projets Gpsi
</f:facet>
<p:column>
<f:facet name="header">
<h:outputText value="Code" />
</f:facet>
<h:outputText value="#{p.projets.codeProjet}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Intitulé" />
</f:facet>
<h:outputText value="#{p.projets.libelle}" />
</p:column>
</p:dataTable>
the bean:
public void setCurrentChangerStatus(ChangerStatus currentChangerStatus)
{
this.currentChangerStatus=currentChangerStatus;
}
public ChangerStatus getCurrentChangerStatus()
{
return currentChangerStatus;
}
the problem is that the datable is not accepting this expression :
rowSelectListener="#{projet.currentChangerStatus(currentChangerStatus)}"
This is other way to display the information of a datatable’s row.
here target=”#{project.SomeObject}” is the Data to be updated when you cleck on command link