Alert
Send an alert message to a user
The destination user has the same SITE_ID of the sender user.
In case you need to send a message to a user belonging to another SITE_ID, use the next method.
Syntax
Details
Note: in order to use this feature, you have first to define an application parameters named "SHOW_ALERT_MENU_ITEM" to "Y", otherwise these messages cannot be showed on the client side.
Send an alert message to a specific SITE_ID + username
The destination user is identified by the couple SITE_ID + username specified in input, so that the destination user can have a SITE_ID different from the one used by the sender user.
Syntax
Details
Note: in order to use this feature, you have first to define an application parameters named "SHOW_ALERT_MENU_ITEM" to "Y", otherwise these messages cannot be showed on the client side.
Send a chat message to a user
The SITE_ID of the destination users is the same of the sender user.
Syntax
Details
Note: in order to use this feature, you have first to define an application parameters named "SHOW_ALERT_MENU_ITEM" or "SHOW_CHAT_POPUP_MESSAGE" to "Y", otherwise these messages cannot be showed on the client side.
Send a not visible notification to the client
(available form 5.3.2) Send a notification to the client side; this is not a visual notification: it can be used to automate the invocation of a javascript method defined on the client. This automation can be helpful for example to open a window or reload a grid or form, when a server-side long operation has terminated.
You have to specify the function name and the argument to pass forward.
A limit it has is that you can only invoke functions having one only argument.
The SITE_ID of the destination users is the same of the sender user.
In case you need to send a message to a user belonging to another SITE_ID, use the next method.
Syntax
Details
Note: in order to use this feature, you have first to define an application parameters named "SHOW_ALERT_MENU_ITEM" or "SHOW_CHAT_POPUP_MESSAGE" to "Y", otherwise these messages cannot be showed on the client side.
In case you need to invoke something from complex, you have to declare a one argument function in some global .js file (stored in the "scripts" folder of your application web context) and use it to do it.
Example of a global scoped js function with one argument, used to show a popup warning window:
The server-side js action generating the notification would be:
Send a not visible notification to a client having a specific SITE_ID + username
(available form 5.3.2) Send a notification to the client side; this is not a visual notification: it can be used to automate the invocation of a javascript method defined on the client. This automation can be helpful for example to open a window or reload a grid or form, when a server-side long operation has terminated.
You have to specify the function name and the argument to pass forward.
A limit it has is that you can only invoke functions having one only argument.
The specific client is identified by the couple SITE_ID + username.
Syntax
Details
Note: in order to use this feature, you have first to define an application parameters named "SHOW_ALERT_MENU_ITEM" or "SHOW_CHAT_POPUP_MESSAGE" to "Y", otherwise these messages cannot be showed on the client side.
In case you need to invoke something from complex, you have to declare a one argument function in some global .js file (stored in the "scripts" folder of your application web context) and use it to do it.
Example of a global scoped js function with one argument, used to show a popup warning window:
The server-side js action generating the notification would be:
Send an alert message to a user with a clickable callback
The sendAlertMessage function can be used also to include a clickable link which can be used to execute a js client side function.
This is possible since the message content is HTML based and therefore you can include a <A> tag to do it.
Example:
Show a toast message
A toast message is a popup message shown starting from the top margin of the browser window, reporting a title and a text. The popup is automatically hidden after a few seconds.
Syntax
Details
Settings is a javascript object containing the following attributes:
Example on the UI
The same example, starting from the server
Last updated