我在我的项目中使用了primefaces 3.1.1和jsd 2.0,当我在表上选择一行时,我的实体对象返回null.where是错误还是丢失?
table.xhtml
<p:dataTable value="#{dataBean.tmVlist}" var="a" >
<f:facet name="header">
Centre
</f:facet>
<p:column headerText="PSSE" style="width:24%">
#{a.psseCode}
</p:column>
<p:column headerText="Adı" style="width:24%">
#{a.name}
</p:column>
<p:column headerText="İl">
#{a.centre}
</p:column>
<p:column headerText="Bölge">
#{a.area}
</p:column>
<p:column headerText="Durum">
#{a.state}
</p:column>
<p:column>
<p:commandButton id="selectButton" update=":form2:display" oncomplete="carDialog.show()" value="edit" title="edit">
<f:setPropertyActionListener value="#{a}" target="#{deleteBean.selectedTm}" />
</p:commandButton>
</p:column>
</p:dataTable>
java代码:
public tmView selectedTm=new tmView();
public tmView getSelectedTm() {
return selectedTm;
}
public void setSelectedTm(tmView selectedTm) {
this.selectedTm = selectedTm;
}
thx for help