Access ADF Bindings from Managed Bean
Look at the screen shot of the page bindings section of a jsff page.
When u drag and drop employee data control on to the page, Bindings section will contain the data control instance and executable section contains Employee Iterator .
Now lets see how we can access table bindings from Managed Bean . The Code to access.
DCBindingContainer bindings2 = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
JUCtrlHierBinding obj = (JUCtrlHierBinding)bindings2.findCtrlBinding("EmployeesEOView1");
ViewObject vo= obj.getViewObject();
//some operations on it
vo.setNamedWhereClauseParam("BindEmployeeId",101);
vo.executeQuery();
The same way we can get Iterator bindings too ..
DCBindingContainer bindings =(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding roleIter = bindings.findIteratorBinding("EmployeesEOView1Iterator");
ViewObject obj = roleIter.getViewObject();
Execution of Operation binding
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
Object result = operationBinding.execute();
//Custom Method
BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding method = bindings1.getOperationBinding("methodBindingId");
Map args = method .getParamsMap();
args.put(“argument1”, argument1Value);
method .execute();
thank you.
ReplyDeletepython3 tutorial
Hibernate tutorial