First page Back Continue Last page Text

oracle adf workshop

Notes:


Providing Data for Trees (continued)

To build a hierarchical tree view in ADF Faces with ADF Business Components, you need to create related view objects that build the basis for the tree binding rules. The data for this particular tree comes from the RootCategory1 view object instance; this VO queries for root categories (those with no parent category.) Subnodes of the tree display the subcategories from the instance of the SubCategoryVO view object, which is linked to the RootCategoryVO with a view link. In this way, a typical SQL hierarchical query with a start with…connect by prior clause is constructed to use as the tree data. The query starts with categories whose parent category id is null, and connects category id to parent category id.