Tuesday, May 20, 2014

Get the new row of the ADF table while using insert operation

If you need to fetch the values of the new row being inserted to editable adf table, use following in the backing bean:


            CollectionModel tableModel = (CollectionModel) getEmployee().getValue();
            JUCtrlHierBinding adfModel = (JUCtrlHierBinding) tableModel.getWrappedData();
            DCIteratorBinding dciter = adfModel.getDCIteratorBinding();
            ViewObject voTableData = dciter.getViewObject();
            Row rowSelected = voTableData.getCurrentRow();
            String fName="";
            if(rowSelected.getAttribute("FirstName")!=null){
                fName=(String)rowSelected.getAttribute("FirstName");
                System.out.println(fName);
            }



getEmployee() : binding for the table
FirstName : the column of table 

No comments:

Post a Comment