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.

Group Beans Faces Config<br />

Directory<br />

For example: /WEB-INF/faces-confighr.xml<br />

//beandefs/<br />

UI Pages Directory //pages/<br />

UI Page Regions Directory //regions/<br />

By using a subsystem indication (short name or abbreviation) in the name, all files of a<br />

subsystem can easily be located. Since only one main faces-config is generated for each<br />

application definition (which only holds the navigation rules) , this file is not organized<br />

into a subsystem directory.<br />

Note that by using this naming convention, <strong>JHeadstart</strong> will not generate the default<br />

faces-config.xml file, that is created and updated by ADF when using the visual designtime<br />

tools to create a JSF managed bean. So, with these settings you will never accidently<br />

wipe out custom managed bean definitions when running the <strong>JHeadstart</strong> Application<br />

Generator.<br />

One drawback of not generating the default faces-config.xml is that ADF will add the<br />

default element to the faces-config.xml when performing a drag and drop<br />

operation from the data control palette:<br />

Since <strong>JHeadstart</strong> uses a customized version of the ADFPhaseListener (see chapter “JSF-<br />

ADF Page Lifecycle” for more info), you should remove this element again after your<br />

drag and drop action. If you forget to do this, you might loose the transactional messages<br />

displayed by <strong>JHeadstart</strong> when pressing Commit, or all messages might be displayed<br />

twice. Since you might easily forget to remove this element if you perform a lot of drag<br />

and drop actions on the generated pages, a more structural solution is to move the<br />

<strong>JHeadstart</strong>–required definition from JhsCommon-beans.xml to facesconfig.xml:<br />

To prevent generation of this element into JhsCommon-beans.xml, you should create a<br />

custom template for JhsCommonBeans.vm and remove the element in this customized<br />

template.<br />

2 - 12 Getting Started <strong>JHeadstart</strong> <strong>Developer's</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!