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 :)

Comments

Popular posts from this blog

Setting up the environment for Angular2 and Hello World Example in Angular2

Showing number of rows or row count on top and bottom of table in ADF.

Build a Simple ReactJS application using react-cli