Understanding Oracle JET's Messaging APIs on Editable Components

Oracle JET provides a messaging API to support messaging on Oracle JET editable components.

Editable components include the following:

  • oj-checkboxset

  • oj-color-palette

  • oj-color-spectrum

  • oj-combobox-many

  • oj-combobox-one

  • oj-input-date

  • oj-input-date-time

  • oj-input-number

  • oj-input-password

  • oj-input-text

  • oj-input-time

  • oj-radioset

  • oj-select-many

  • oj-select-one

  • oj-slider

  • oj-switch

  • oj-text-area

Topics:

The Oracle JET Cookbook also includes descriptions and examples for working with each component at: Form Controls.

Oracle JET Editable Component Messaging Attributes

The following attributes impact messaging on editable elements.

Element Attribute Description

converter

Default converter hint displayed as placeholder text when a placeholder attribute is not already set.

display-options

JSON object literal that specifies the location where the element should display auxiliary content such as messages, converterHint, validatorHint, and helpInstruction in relation to itself. Refer to the element's API documentation for details.

help

Help message displayed on an oj-label element when the user hovers over the Help icon. No formatted text is available for the message. The oj-label has two exclusive attributes, help.definition and help.source.

The help.definition attribute's value appears and the attribute's value is read by a screen reader when you hover with a mouse, when you tab into the Help icon, or when you press and hold on a device. The default value is null.

The help.source attribute’s value is a link, which is opened when you click with a mouse or tap on a device. The default value is null.

help.instruction

Displays text in a note window that displays when the user sets focus on the input field. You can format the text string using standard HTML formatting tags.

messages-custom

List of messages that the application provides when it encounters business validation errors or messages of other severity type.

placeholder

The placeholder text to set on the element.

translations

Object containing all translated resources relevant to the component and all its superclasses. Use sub-properties to modify the component's translated resources.

validators

List of validators used by element when performing validation. Validator hints are displayed in a note window by default.

See the Attributes section of the element's API documentation in JavaScript API Reference for Oracle® JavaScript Extension Toolkit (JET) for additional details about its messaging properties. Select the component you're interested in viewing from the API list.

Oracle JET Component Messaging Methods

Editable value components support the following method for messaging purposes.

Component Event Description

showMessages

Takes all deferred messages and shows them. If there were no deferred messages this method simply returns. When the user sets focus on the component, the deferred messages will display inline.

See the Methods section of the component's API documentation in the JavaScript API Reference for Oracle® JavaScript Extension Toolkit (JET) for details on how to call the method, its parameters, and return value. Select the component you're interested in viewing from the list.