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.

Warning: The exception to the rule of "Always use a top level Data Collection<br />

for tree selection" is when your tree starts at a detail group, and the parent<br />

group in your application structure does not have a tree layout. In that case,<br />

the first tree group should use a child Data Collection of the parent group for<br />

tree selection, to prevent that the default row shown does not belong to the<br />

selected parent.<br />

When you run the application, search for a department that has employees (for example<br />

'Marketing'), and click the Employees subtab. Only then the tree is shown, containing<br />

only employees of the selected department, and already a "default" Employee row is<br />

selected.<br />

As you can see, the "default" employee (that is shown before any tree node was clicked)<br />

belongs to the right department. This is because we set the Data Collection of the<br />

Employees child group to the child usage of Departments, instead of using<br />

EmployeesViewTreeSelect. If you would have used EmployeesViewTreeSelect, you<br />

might see employee 'King' by default, which is not an employee of the Marketing<br />

department.<br />

We are faced with a dilemma when we select a Department like 'Executive'. This<br />

department has 'King' as one of its employees, who manages employees that are not in<br />

department 'Executive'. When we select Hartstein in the tree, we still see employee 'King'<br />

in the Edit page. There is an error message ' JBO-25020: View row of key<br />

oracle.jbo.Key[201 ] not found in EmployeesIterator'. Of course, the EmployeesView3<br />

usage now includes only the employees of Human Resources, which does not include<br />

Hartstein!<br />

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

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

Saved successfully!

Ooh no, something went wrong!