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.

• which exceptions should be treated as expected exception, for which the stack<br />

trace will never be written to the log.<br />

• whether the error code (product code and error number) should be displayed.<br />

Attention: To avoid losing your changes in the managed property values after<br />

generating again, you should create a custom template based on the<br />

JhsCommonBeans.vm template and make the changes in this custom template.<br />

To use your custom template rather than the default template, select the<br />

Service node in the Application Definition Editor, go to the Templates tab, and<br />

set the value of template key JHS_COMMON_BEANS to the name of your<br />

custom template. See chapter 4, section “Using Generator templates” for more<br />

information on using custom templates.<br />

Note that using the same technique of creating a custom template, you can use<br />

your own subclass of ErrorReportingUtils when the exposed managed<br />

properties are not sufficient to meet your specific needs.<br />

Additional functionality implemented in this class relates to database errors. When the<br />

underlying exception is a SQLException that indicates a database constraint violation, a<br />

message with the constraint name as key will be added to the JSF Message stack, so you<br />

can provide a user-friendly message to the user by adding this constraint name as key to<br />

your message resource bundle. Note that the <strong>JHeadstart</strong> Application Generator already<br />

generates such messages into your message resource bundle for all key constraints<br />

defined in the XML file of your Entity Objects.<br />

Reference: See the Javadoc or source of<br />

ErrorReportingUtils.reportErrors<br />

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Internationalization 11- 13

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

Saved successfully!

Ooh no, something went wrong!