【发布时间】:2011-12-25 05:50:26
【问题描述】:
我有一个带有 RichFaces 4.0.0.Final 和 JSF 2.0 的应用程序。当我尝试在扩展数据表中使用选择时,它不起作用。
<rich:extendedDataTable
id="shipmentList" value="#{shipmentListBean.shipmentList}" var="shipment"
rowClasses="#{shipment.paymentDate == null ? 'unpaidShipment' : null}"
selectionMode="single" noDataLabel="#{msgs.emptyList}"
selection="#{shipmentListBean.selection}"
style="width: 1200px; font-size: 10px; ">
ShipmentListBean:
@ManagedBean
@ApplicationScoped
public class ShipmentListBean implements Serializable {
private Collection<Object> selection = null;
public ShipmentListBean() {
}
public List<ShipmentValueObject> getShipmentList() {
....
}
public Collection<Object> getSelection() {
return selection;
}
public void setSelection(Collection<Object> selection) {
this.selection = selection;
}
}
当我在表格中选择行时,为什么在方法 selSelection(Collection selection) 中出现空集合?
【问题讨论】: