How to Configure the String Content of the FacesMessage to use HTML Formatting and Line Breaks when Customizing the Oracle Identity Manager User Interface

(Doc ID 2150746.1)

Last updated on JUNE 17, 2016

Applies to:

Identity Manager - Version 11.1.2.0.0 and later
Oracle JDeveloper - Version 11.1.1.6.0 and later
Information in this document applies to any platform.

Goal

You've created a custom field validator based on the example in the OIM Developers Guide:

Oracle Fusion Middleware Developing and Customizing Applications for Oracle Identity Manager

19.7.5.4 Implementing Custom Field Validation

The validator used in the example generates an error message when validation fails and attaches it to the field being updated. This is through the use of FacesMessage and facesContext.addMessage().

The example in the document uses a String for the error message which has some short and simple content (ie...private static final String START_DATE_END_DATE_VALIDATION_MSG = "Start Date - End Date interval cannot exceed 180 days for Contractors.";).

When developing your customization, you've found that the error message content can be very long if needed and when the error message is bigger than the popup window, scroll bars will be displayed.  However, if the error message contains HTML, it's rendered as text and even line breaks like /n are ignored.

You'd like to know how you can configure the error message so that line breaks and HTML content are properly rendered.
 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms