我想将ratedValue 设置为bean。当我在cellEditor 中添加值并单击保存按钮时,ratedValue 将变为null。
<p:dataTable id="manager" var="item" value="#{employeedaBean.userList}"
paginator="true" rows="10"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
rowsPerPageTemplate="2,5,10,15"
editable="true" editMode="cell" widgetVar="carsTable"
lazy="true" emptyMessage="No Customers found with given criteria">
<f:facet name="header">
Employee
</f:facet>
<p:column headerText="Rated">
<p:cellEditor>
<f:facet name="output"><h:outputText value="#{item.ratedValue}" /></f:facet>
<f:facet name="input">
<p:selectOneMenu value="#{item.ratedValue}" style="width:100%">
<f:selectItems value="#{employeedaBean.rateValueMany}"/>
</p:selectOneMenu>
</f:facet>
</p:cellEditor>
</p:column>
</p:dataTable>