Time for action – creating a list of values of a department
Carry out the following steps to create a list of values:
Add a view accessor mapping to the
DeptVO.xml
file, in theEmpEO.xml
file.Go to the
EmpVO.xml
file and then select theDeptno
attribute.Select the List of Values: section to add a new list of values, as shown in the following screenshot:
Select
EmpEO.DeptVO1
as List Data Source andDeptno
as List Attribute to map theDeptno
attribute ofDeptVO
to theEmpVO
attribute.Go to the UI Hints tab and move the
Dname
attribute from the Available: section to the Selected: list.Select Combo Box with List of Values as the value for Default List Type, as shown in the following screenshot:
What just happened?
We created a
list of values for our view object attribute, which will create a list of department names for the Deptno
attribute. The list of department names is displayed based on the result of the query executed by the DeptVO1
view object.
In this way, we can display valid values...