getSelectedRowKeys
public Object getSelectedRowKeys()
- Get function for attribute for 'selectedRowKeys'.
- Return:
Object
- SelectedRowKeys
The following code snippet is an example of how this particular attribute of the ADFUItable can be used.
AdfFacesContext.getCurrentInstance().addPartialTarget(this.dialog1); DCIteratorBinding iter = this.findIterator("OrderLineChargesIterator"); DCDataControl dc = iter.getDataControl(); ApplicationModule amMod1=(ApplicationModule)dc.getDataProvider(); NegotiateAMImpl amMod = (NegotiateAMImpl)amMod1; RowKeySet rowkeyset = this.table2.getSelectedRowKeys(); Iterator itr = rowkeyset.iterator(); int countOfSelectedRows = this.table2.getSelectedRowKeys().getSize(); ViewObject vo = this.findIterator("OrderLineCharges1_1Iterator").getViewObject(); vo.clearCache(); ViewObject targetsetvo = this.findIterator("TargetSetIterator").getViewObject(); ViewObject adjustmentsetvo = this.findIterator("AdjustmentSetIterator").getViewObject(); Row selchargesrow = targetsetvo.createRow(); selchargesrow.setAttribute("PriceType","SelectedCharges"); while (itr.hasNext()) { this.table2.setRowKey(itr.next()); FacesCtrlHierNodeBinding f = (FacesCtrlHierNodeBinding)this.table2.getRowData(); if(countOfSelectedRows > 0) { targetsetvo.insertRowAtRangeIndex(0,selchargesrow); adjustmentsetvo.insertRowAtRangeIndex(0,selchargesrow); } vo.insertRow(f.getRow()); FacesCtrlHierNodeBinding f1 =(FacesCtrlHierNodeBinding)this.table2.getSelectedRowData(); Row rw=f1.getRow(); } amMod.GetTargetSetValues(countOfSelectedRows);
No comments:
Post a Comment