我想从 ice:datatable 获取选定的行数据?这是我的代码,请给我您的建议,以使用 rowselector 获取选定的行数据。
支持豆:
public void rowSelectionListener(RowSelectorEvent event) {
System.out.println(event.getRow());
}
jsp代码:
<ice:rowSelector id="selected" selectionListener="#{inventoryList.rowSelectionListener}" multiple="false" selectedClass="tableRowSelected" mouseOverClass="tableRowMouseOver" />
<f:facet name="header">
<ice:outputText value="Stock #"/>
</f:facet>
<ice:outputText value="#{item.stock}"/>
</ice:column>
现在我可以获取行索引,但我需要获取选定的行值。我怎样才能做到这一点?