Thursday, 23 November 2017

Oracle ADF Current row selection after ExecuteQuery Or Refresh in Table

Oracle ADF Current row selection after ExecuteQuery Or Refresh in Table

     public BindingContainer getBindings() {
      return BindingContext.getCurrent().getCurrentBindingsEntry();
     }

    public void refreshButtonClick()
   {
     BindingContainer bindings = getBindings(); 
     DCIteratorBinding parentIter = (DCIteratorBinding)bindings.get("IteratorName"); 
     Key parentKey = parentIter.getCurrentRow().getKey();
    
     OperationBinding ob= bindings.getOperationBinding("Rollback");
     ob.execute();
     OperationBinding ob1= bindings.getOperationBinding("Execute");
     ob1.execute();
     // set the same row key as present row 
     parentIter.setCurrentRowWithKey(parentKey.toStringFormat(true));
   }

Monday, 20 November 2017

Oracle ADF how get Current row Value in Table:


Oracle ADF how get Current row Value in Table:

public class ExampleBean
{
 private Integer deptId;
 public void buttonClicked(ActionEvent ae)
 {
    Row currentDeptRow=(Row)ADFUtil.evaluateEL("#{bindings.DeptVO.currentRow}");
    ADFUtil.setEL("#{pageFlowScope.deptId}",currentDeptRow.getAttribute("Deptno"));
 }
 public void setDeptId(Integer deptId) {
   this.deptId=deptId;
 }
 public Integer getDeptId()
 {
    return deptId;
 }
}