Get View Accesor or View Object From ListOfValue binding
Hi All,
In this post I am going to show how you can get view accessor or underlying view object from ListOfValue binding.
Suppose you have created LOV on DepartmentId Attribute of EmployeesVO and for LOV you have used DepartmentRO as shown below.
This attribute you have drag and drop on your page as InputListOfValues. So in corresponding page definition file you can see the ListOfValue binding as shown below.
If you want to get the underlying view object or view accessor of this LOV programatically then in you bean code use following lines of code:
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = bctx.getCurrentBindingsEntry();
JUCtrlListBinding allDepartsmentList =
(JUCtrlListBinding)bindings.get("DepartmentId");
ViewObjectImpl lovVO =
(ViewObjectImpl)allDepartsmentList.getListIterBinding().getViewObject();
Happy Coding :)
In this post I am going to show how you can get view accessor or underlying view object from ListOfValue binding.
Suppose you have created LOV on DepartmentId Attribute of EmployeesVO and for LOV you have used DepartmentRO as shown below.
This attribute you have drag and drop on your page as InputListOfValues. So in corresponding page definition file you can see the ListOfValue binding as shown below.
If you want to get the underlying view object or view accessor of this LOV programatically then in you bean code use following lines of code:
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = bctx.getCurrentBindingsEntry();
JUCtrlListBinding allDepartsmentList =
(JUCtrlListBinding)bindings.get("DepartmentId");
ViewObjectImpl lovVO =
(ViewObjectImpl)allDepartsmentList.getListIterBinding().getViewObject();
Happy Coding :)
Comments
Post a Comment