我的數據表有問題,我想在選擇它時顯示數據錶行的信息,因爲我創建了一個名爲currentChangerStatus的值我想將其設置爲當前選擇,這裏是我的代碼:從數據錶行的當前對象顯示數據的問題
<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>
豆:
public void setCurrentChangerStatus(ChangerStatus currentChangerStatus)
{
this.currentChangerStatus=currentChangerStatus;
}
public ChangerStatus getCurrentChangerStatus()
{
return currentChangerStatus;
}
的問題是確定年代不接受這種表達:
rowSelectListener="#{projet.currentChangerStatus(currentChangerStatus)}"
_「請幫助,因爲我很快就需要這個項目!」 _ =「#{} project.SomeObject」是對數據進行更新 - 請接受一些答案(請參閱[faq](http://stackoverflow.com/faq))。 – 2011-06-06 06:11:46