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.

6.14. Hyperlink to Navigate Context-Sensitive to Another Page (Deep Linking)<br />

<strong>JHeadstart</strong> allows you generate hyperlinks (or buttons) that navigate context-sensitive to<br />

another page. With context-sensitive we mean that the data displayed in the target page,<br />

depends on the data displayed in the source page. This feature is called deep linking and<br />

can be implemented using custom generator templates.<br />

Attention: This section assumes you understand the concept of <strong>JHeadstart</strong><br />

Generator Templates and you know how to use custom templates as explained in<br />

section 4.7<br />

In this example, we will use the <strong>JHeadstart</strong> deep linking support in combination with a<br />

custom template to generate the JobId in the Employees group table as a hyperlink that<br />

navigates to the Job Edit page, querying the proper Job row.<br />

First we must enable deep linking for the Job Edit Page, which is the target of the deep<br />

link.<br />

6.14.1.1. Enabling Deep Linking for a Group<br />

To allow creation of deep links to the form page of a certain group (in this example the<br />

Jobs group), perform the following steps:<br />

1. In the Application Definition Editor, switch to Expert mode (see section Expert<br />

mode). This will ensure that the Deep Linking property category becomes visible<br />

at group level (between Table Layout and Generation Settings).<br />

2. Go to the Jobs group and set the Deep Linking Type to Query By Key Value.<br />

3. Set the Deep Linking Key Expression to #{param.jobId}<br />

4. Generate the application, to make a navigation rule DeepLinkJobs available (it is<br />

needed in the following steps).<br />

These deep linking settings ensure that when a JSF navigation outcome called<br />

'DeepLinkJobs' is used (this condition is specified in the Enable Deep Linking<br />

Expression), it will go to the Jobs page, and query the Jobs data collection using the key<br />

specified in the request parameter 'jobId' (the Deep Linking Key Expression).<br />

Attention: For the Type of Deep Linking you can also choose "Set Current<br />

Row Using Key Value". The difference is that instead of requerying the<br />

database and returning just the desired row, the current row indicator in the<br />

View Objects's row set will be pointed to the desired row.<br />

The next step is to manually change the Job field in the Employees page to a hyperlink,<br />

before moving that customization to a generator template.<br />

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Generating User Interface Widgets 6- 45

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

Saved successfully!

Ooh no, something went wrong!