Hi,
In this post i will show how to access data controls and data bindings from the server side.
By accessing to data controls and data bindings, we can get any data\item that shown on our application.
Each jsf page in our application have a bindings tab which shows all the bindings variables of the page.
So, how can we get all this variables ?
Suppose our page named "myTestPage.jsf".
Get binding container :
DCBindingContainer c = bindingContext.findBindingContainer("view_[myTestPage]PageDef");
Access data control :
AppModule am = (AppModule)bc.findDataControl("[name of data control]DataControl") .getDataProvider();
Access data bindings(for example access to binding iterator named "iterMe") :
DCIteratorBinding myIter = (DCIteratorBinding)bc.findIteratorBinding("iterMe").
and now we can get any attribute:
String lastName = (String)myIter.getCurrentRow().getAttribute("LastName");
API for DCBindingContainer :
http://docs.oracle.com/cd/B14099_19/web.1012/b14022/oracle/adf/model/binding/DCBindingContainer.html
Eran Tzayzler





