By implementing the UserPromptService
interface, clients can implement their own strategy for how they
deal with messages that need to be displayed to the user. The standard implementation of UserPromptService
(StandardUserPromptService
), merely displays the alerts within a
simple DHTML dialog box.
Methods
alert(message, options)
Displays an alert dialog box to the user.
Since this is a non-blocking method, the fCallBack
parameter should be used to provide any code that
must be executed once the dialog has been closed.
fCallBack
function will always be passed
true
as its first parameter.
The previous api (message,callback,caption) should still be supported by UserPromptServices.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
message |
String | The alert message template to be displayed to the user. |
||||||||||||||||||||||||
options |
Map |
Parameters that affect the alert and can be referenced by the message. Properties
|
confirm(message, options)
Displays a confirmation dialog box to the user.
Since this is a non-blocking method, the fCallBack
parameter should be used to provide any code that
must be executed once the dialog has been closed. The fCallBack
function will be passed
true
as its first parameter if the user clicks the 'Ok' button, and false
otherwise.
The previous api (message,callback,ok,cancel,caption) should still be supported by UserPromptServices.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
message |
String | The alert message template to be displayed to the user. |
||||||||||||||||||||||||||||
options |
Map |
Parameters that affect the alert and can be referenced by the message. Properties
|
is Alert Showing() → {boolean}
Used to query if an alert or confirm alert dialog is currently displayed.
Does not cover confirm dialogs only alerts.
Returns:
true
if an alert/confirm alert is currently displayed, otherwise false
.
- Type
- boolean
optional Alert(message, options)
Displays an alert dialog box to the user, with an option to never see the alert again.
Since this is a non-blocking method, the fCallBack
parameter should be used to provide any code that
must be executed once the dialog has been closed.
fCallBack
function will always be passed
true
as its first parameter.
The previous api (message,code,callback,caption) should still be supported by UserPromptServices.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
message |
String | The alert message template to be displayed to the user. |
||||||||||||||||||||||||
options |
Map |
Parameters that affect the alert and can be referenced by the message. Properties
|
optional Confirm(message, options)
Displays a confirmation dialog box to the user, with an option to never see the confirmation again.
Since this is a non-blocking method, the fCallBack
parameter should be used to provide any code that
must be executed once the dialog has been closed. The fCallBack
function will be passed
true
as its first parameter if the user clicks the 'Ok' button, and false
otherwise.
The previous api (message,code,callback,ok,cancel,caption) should still be supported by UserPromptServices.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
message |
String | The alert message template to be displayed to the user. |
||||||||||||||||||||||||||||
options |
Map |
Parameters that affect the alert and can be referenced by the message. Properties
|