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.

However, when the block is updateable, it is quite likely that a List of Values (LOV) has<br />

been defined in the form that populates the foreign key item (for example<br />

department_id), as well as lookup items (for example department_name). If such an LOV<br />

is present, JFG will create so-called calculated attributes for the lookup items that are<br />

populated through an LOV. The calculated attribute gets a SQL expression that returns<br />

the lookup item value based on the Record Group Query associated with the LOV.<br />

In addition for the VO’s created for data blocks, read-only VO’s, not based on an EO, are<br />

created for each Record Group Query found in the form. These read-only VO’s are used<br />

as the data collection for the LOV groups created in the <strong>JHeadstart</strong> Application<br />

Definition.<br />

The WHERE and ORDER BY clauses of the data blocks are also migrated to the View<br />

Object. Any references to block items are replaced with Query Bind variables, and in the<br />

<strong>JHeadstart</strong> Application Definition, the Query Bind Arguments group property is set up<br />

to populate these bind variables with the correct values. References to Forms globals and<br />

system variables cannot be replaced with bind variables, and therefore these references<br />

are changed to literal values by enclosing them in brackets, to keep the SQL query valid.<br />

When the JFG encounters such a reference to a Forms global or System variable, you are<br />

notified in the log window. Make sure you revisit these View Object and change the<br />

query, where clause or order by clause as needed.<br />

13.4.1.4. View Links<br />

When a relation has been defined between two data blocks in the form, the JFG attempts<br />

to create a view link between the View Objects created for the two blocks involved.<br />

First, the JFG tries to find a foreign key constraint between the two tables, as defined in<br />

the data dictionary. If such a foreign key constraint exists, the view link is created based<br />

on this foreign key. If no foreign key is found, JFG parses the content of the forms<br />

Relation Join Condition property. If the value of this property exists of one or more<br />

conditions connected with the AND operator and each condition uses a simple ‘=’<br />

operator with two item references, JFG creates a view link based on the attributes created<br />

for these items. If the Relation Join Condition is more complex, or the JFG cannot find<br />

matching attributes for the items, the JFG will display a warning in the log window:<br />

In such a situation, the view link will be created without source and destination<br />

attributes. You will need to add those attributes manually by double clicking on the view<br />

link.<br />

13.4.1.5. Application Module<br />

For each form, an application module is created that contains usages for all the View<br />

Objects created for the form. Each form-specific application module is added as a nested<br />

application module usage to the Root Application Module.<br />

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Forms2ADF Generator 13 - 15

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

Saved successfully!

Ooh no, something went wrong!