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 Primary Key Values. Alternatively, you can create an intersection<br />

table with a composite primary key consisting of the two foreign key columns.<br />

2. Go to the Application Module and add another (top-level) usage of the<br />

EmployeesView. Call the usage “EmployeesShuttle”.<br />

3. Create a new Dynamic Domain in the Application Definition Editor. Call it<br />

EmployeesShuttle and set its Data Collection to EmployeesShuttle. The Value<br />

Attribute should be EmployeeId and the Meaning Attribute LastName<br />

4. Make the following changes to the Hirable detail group of the Departments base<br />

group. The Layout Style of Hirable should be intersection-shuttle. Check the<br />

checkbox Same Page?. Set the Domain for Unselected List in Shuttle to<br />

“EmployeesShuttle”. Set the Tabname to “Unassigned”. Set Display Title<br />

(plural) to “Assign Hirable Employees” and Display Title (singular) to<br />

“Assigned”.<br />

5. When you now run the JAG, you will get the following error:<br />

JAG-00126 [ Departments / Hirable2 ] View Object Usage EmployeesShuttle<br />

should have a nested View Object Usage based on HirableView.<br />

The reason you get this error is this: at runtime, <strong>JHeadstart</strong> needs to know which<br />

foreign key attribute(s) in the HirableView map to the primary key attribute(s) of<br />

EmployeesView. This information is required to correctly insert a row in the<br />

HIRABLE intersection table. <strong>JHeadstart</strong> uses the ViewLink on which the nested<br />

HirableView usage is based to lookup this attribute mapping. So, open te<br />

Application Module Editor, and add the HirableView as a nested ViewObject<br />

usage under the EmployeesShuttle usage:<br />

6. Generate again. The error should have gone now. Run the application and your<br />

page will look like this:<br />

5 - 42 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!