Overriding attribute validation exceptions

At the ADF-BC layer, built-in validators are stored in the XML metadata definition file with no ability to customize the exception message and/or centralize the application error messages in a single application-wide message bundle file. To overcome this you can extend the oracle.jbo.ValidationException and oracle. jbo.AttrValException classes. Then in your custom entity object implementation class you can override the validateEntity() and setAttributeInternal() methods to throw these custom exceptions instead. Even better, if you have gone through the process of creating framework extension classes (see Setting up BC base classes, Chapter 1, Pre-requisites to Success: ADF Project Setup and ...

Get Oracle JDeveloper 11gR2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.