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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• Regenerate. You should get this (nodes in the picture expanded by hand to<br />

show contents):<br />

Each record is shown only once in the correct place in the tree structure.<br />

5.6.5. Variation: Tree showing only Children of selected Parent<br />

You might not want to show a tree of all rows in the database, but only of the child nodes<br />

of a certain parent row. For example, you want the user first to select a department, and<br />

then for that department show a tree of the employees of that department.<br />

With <strong>JHeadstart</strong> you can generate that by having a hierarchy of groups, and only setting<br />

the layout style to tree(-form) for a subset of child groups.<br />

The steps described here assume that you have already built the tree as described in<br />

section 5.6.3 Variation: Recursive Tree. We cannot use 5.6.4 Variation: Recursive Tree<br />

with Limited Set of Root Nodes because it would not show any nodes unless the<br />

department included a top manager in its employees. You already have a tree of<br />

Employees, and now we will add a Department group in front of it.<br />

• First ensure that the Application Module's data model includes the parentchild<br />

relations we want to use. We should have a top level DepartmentsView<br />

usage, with an EmployeesView child.<br />

• In the Application Definition Editor, create a new Base Group and call it<br />

Departments. Set the Data Collection to the top level DepartmentsView<br />

usage. Enter a Tab Name, Display Titles, and a Descriptor Item.<br />

• Set Advanced Search to samePage and Quick Search to singleSearchField, on<br />

item DepartmentName.<br />

• Make the Employees group of the recursive tree a detail group of the newly<br />

created Departments group. Save, leave and reopen the Application Definition<br />

Editor to reset the dropdown lists.<br />

• Change the Tree Data Collection of the Employees child group to the child<br />

usage of the Departments group.<br />

• Change the Data Collection of the Employees child group from<br />

'EmployeesViewTreeSelect' to the same child usage of Departments.<br />

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

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

Saved successfully!

Ooh no, something went wrong!