Time for action – creating a view link between EmpVO and DeptVO
Now in the following steps, we will see
how to create a view link between EmpVO
and DeptVO
:
Since both the view objects are based on entity objects, we can map the view link based on the association between
EmpEO
andDeptEO
.Right-click on the
com.empdirectory.model.view
package and select New View Link.In the Create View Link wizard, enter
com.empdirectory.model.viewlink
as the Package name andEmpVOToDeptVOLink
as the Name value:In the next screen, we will select the cardinality as * to 1 which represents a many-to-one relationship and map the association
EmpEOToDeptEOAssoc
betweenEmpVO
andDeptVO
.Click on the Add button to add the view link:
Click on the Next > button to select the view link accessor attribute for the source view object and the destination view object.
Check the In View Object: DeptVO option to have this accessor attribute created in
EmpVO
. This accessor is used to retrieve the related information from...