14.01.2013 Views

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Generating a tree for such a situation is only slightly different. The steps of section 5.6.1<br />

Generating a Basic Tree are applicable to this situation, though with minor changes. The<br />

step numbers here are variations of the basic tree steps with the same number.<br />

1. You need the self-referencing foreign key as a View Link in your ADF Business<br />

Components. The wizard ‘New Business Components from Tables’ will<br />

automatically create such a View Link if a self-referencing foreign key is present<br />

in the database.<br />

2. In the data model of the Application Module, it is sufficient to have only one<br />

level to generate a tree with an unlimited level of nesting. For example, to have a<br />

tree with unlimited recursion on Employees, you only need this data model:<br />

3. For this one-level data model it is not strictly necessary to also create a TreeSelect<br />

usage, but it is a good habit and might become necessary when the tree is<br />

extended.<br />

4. You only need one group in your Application Definition for the self-referencing<br />

View Object (similar to the hierarchy in the Application Module data model).<br />

5. Change the Layout Style property of this group to 'tree-form'.<br />

6. Change the Tree Data Collection to be the same as the original Data Collection<br />

property (this usage is for showing the hierarchy of tree nodes), and change the<br />

Data Collection property to the Tree Selection usage of that view (for example<br />

EmployeesViewTreeSelect).<br />

7. Select the right Descriptor Item.<br />

8. If desired set the Show Tree Expanded? property<br />

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Generating Page Layouts 5 - 31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!