Tag Archives: dcbinding

Easiest way to get the current binding from the bean

use the following snippet to get the current binding

BindingContainer bindings =  BindingContext.getCurrent().getCurrentBindingsEntry();
 AttributeBinding at = (AttributeBinding)bindings.getControlBinding("Period");

The above mentioned code is useful only in case of retrieving values of any attribute binding in the page definition file. To retrieve specific information use it like

//For search binding use it like
FacesCtrlSearchBinding fc =
FacesCtrlSearchBinding fc =

//For LOV binding use it like
FacesCtrlLOVBinding fc = (FacesCtrlLOVBinding)bindings.get("PeriodLOV");

some of the useful methods that can also be used for retrieving binding is

private BindingContainer getBindings() {
BindingContainer bindings =
(BindingContainer)fc.getApplication().evaluateExpressionGet(fc, "#{bindings}",
return (bindings == null) ? null : bindings;

to retrieve the bindingsĀ  or executable you use it like

//to retireve the tree/table bindings
FacesCtrlHierBinding fc = (FacesCtrlHierBinding)bindings.get("Period");

//to retireve the tree/table iterator
DCIteratorBinding dc = (DCIteratorBinding)bindings.get("PeriodIterator");