Accessing destination View Object using View Link Accessor

When you need to programmatically access the 'child' view object from a 'master' view object by virtue of a view link accessor, you can use the the below API.

ViewObject destVO = originVO.findAttributeDef("View Link Accessor Name").getAccessorVO(originVO);

Example:

ViewObjectImpl deptVO = getDepartmentsView();
ViewObject empVO = deptVO.findAttributeDef("EmployeesView").getAccessorVO(deptVO );

Comments

  1. Hi jobinesh,
    This post is very useful.
    in
    ViewObject empVO = deptVO.findAttributeDef("EmployeesView").getAccessorVO(deptVO );
    "EMployee View" refers to child view object name or we should specify the view link name .

    Thanks,
    Abhilash

    ReplyDelete

Post a Comment