JavaScript Application Development API for Oracle Visual Builder Cloud Service - Classic Applications

Class: ui/js/api/Notification

new ui/js/api/Notification()

stable API

UI notification descriptor support.

Helps creating notifications to be displayed to users. Notification can have various parameters - i.e. level (INFO, SUCCESS, WARNING, ...).

Source:
See:

Members

(static) Level :number

stable API

Notification levels.

Type:
  • number
Properties:
Name Type Description
SUCCESS number

Success message.

INFO number

Information message.

WARNING number

Warning message.

ERROR number

Error message.

Version:
  • 15.4.5
Source:

Methods

(static) create() → {ui/js/api/Notification}

stable API

Creates new notification instance.

Parameters:
Name Type Attributes Default Description
parameters.message string

message to show

parameters.level number <optional>
Level.INFO

message level

Version:
  • 15.4.5
Source:
Returns:
Type
ui/js/api/Notification
Examples

Creates the simplest Notification instance

var notification = Notification.create({
     message: 'Ahoy'
});

Creates Notification including level information

var notification = Notification.create({
     message: 'Ahoy',
     level: Notification.Level.SUCCESS
});

level(level) → {ui/js/api/Notification}

stable API

Sets the notification level.

Parameters:
Name Type Description
level ui/js/api/Notification.Level

severity of the reporting to use

Version:
  • 15.4.5
Source:
Returns:
Type
ui/js/api/Notification
Examples

Sets the message "Beware" and WARNING level to the Notification instance

Notification.create().message('Beware').level(Notification.Level.WARNING);

Sets the message "OK" and SUCCESS level to the Notification instance

var notification = Notification.create({message: 'OK'});
notification.level(Notification.Level.SUCCESS);

message(message) → {ui/js/api/Notification}

stable API

Sets the notification message.

Parameters:
Name Type Description
message string

message to show

Version:
  • 15.4.5
Source:
Returns:
Type
ui/js/api/Notification
Example

Sets the message "Ahoy" to the Notification instance

Notification.create().message('Ahoy');