First page Back Continue Last page Text

oracle adf workshop

Notes:


Creating View Objects with Polymorphic View Rows: Defining the VO Hierarchy (continued)

6. On the Attributes page of the wizard, move any columns that are specific to the subtype to the Selected list. In this example, move the Salary column.

7. On the Attributes Settings page of the wizard, supply a distinct value for the discriminator attribute in the extended view object. The EmployeeListVO VO provides the value of STAFF for the PersonType discriminator attribute.

8. If needed, enable a custom view row class for the extended VO. If appropriate, add additional custom view row methods or override custom view row methods inherited from the parent view object’s row class. The example does not use such methods.

9. Repeat steps 4-8 to add additional extended view objects as needed. For example, the CustomerListVO VO is a second one that extends PersonListVO. It supplies the value CUST for the PersonType discriminator attribute.

Note: Another way to create the VO hierarchy is to use a single EO that has all attributes as the base, then create a base VO with only the common attributes, and define a discriminator column on it. Then create a VO for each subtype that extends the base VO, and add the attributes, behaviors, and discriminator values for each.