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.

4.7. Customizing Using Generator Templates<br />

This paragraph discusses how you can use custom generator templates to implement<br />

functionality in your application that cannot be generated using the default templates.<br />

The following topics are discussed:<br />

• Recommended approach to customizations<br />

• Introduction into the <strong>JHeadstart</strong> template structure and how to configure<br />

<strong>JHeadstart</strong> to use your custom templates<br />

• Introduction into the Velocity Template Language used by <strong>JHeadstart</strong><br />

• How to apply common customizations<br />

4.7.1. Recommended Approach for Customizing <strong>JHeadstart</strong> Generator Output<br />

It is important to understand that the artifacts produced by <strong>JHeadstart</strong> are fully ADF<br />

compliant, and implement numerous ADF best practices available on the internet. When<br />

you use ADF drag and drop, ADF creates code snippets in JSF pages, page definitions<br />

and bindings within these page definitions, and managed bean definitions. All these<br />

artifacts are also created by <strong>JHeadstart</strong>. At any time in your development process you<br />

can start using the visual design-time tools and code editors in JDeveloper to implement<br />

functionality that cannot be generated out-of-the-box.<br />

Now, if you start customizing a generated page, page definition or faces-config file, and<br />

then generate your application again, you would loose the changes again. So, you have<br />

three choices once you start customizing <strong>JHeadstart</strong>-generated output:<br />

1. Do not use the <strong>JHeadstart</strong> Application Generator anymore on the application<br />

definition that produced the output you customized.<br />

2. Switch off generation of the files you modified. Both at the service-level and at<br />

the group level you have generator switches that you can use to turn off specific<br />

output. The screen shot below shows these group-level switches in the<br />

Application Definition Editor. Note that these properties are only visible in<br />

expert mode.<br />

3. Move the customizations to custom templates, configure <strong>JHeadstart</strong> to use your<br />

custom template, and keep on generating.<br />

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Using the <strong>JHeadstart</strong> Addins 4 - 25

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

Saved successfully!

Ooh no, something went wrong!