Knowledge Base
  • Introduction
  • Events and Actions
  • Action Panel
  • sending email
  • calling a SQL action from a client side js action
  • Accessing to translations form a server
  • Executing SQL statements from within an action
  • How to invoke a generic SQL statement defined through a SQL action
  • How to show a message dialog
  • checking for "undefined" values
  • How to add spaces to the right of a text
  • How to create a docx report and show it on the web browser Enterprise Edition only
  • How to get or set a value from the graphics control
  • How to invoke a generic SQL query defined through a business component
  • How to remove spaces to the left and right of a text
  • How to support multiple themes in a single application, accoding to a rule
  • How to set content to a Google Map linked to a grid or form
  • How to replace all occurences of a pattern from a text
  • Utility methods
  • Link auto login
  • Creation of a link for the first access of a new user without give the user a password and forcing
  • Forgot password
  • setting up default values from values coming from a filter panel
  • identifing the modified record after the alteration
  • enabling/disabling checkboxes in a grid
  • Filtering a Lookup
  • formatting a column
  • using checkboxes to select rows in grid
  • showing a summary row in grid
  • Disabling a toolbar button
  • Configuring grid exports
  • Adding filter conditions to a grid
  • Filtering the grid content from a tree
  • Filtering the tree content, starting from a filter panel linked to a grid
  • collapsing a panel
  • validating a lookup
  • accessing the authorizations set for a specific grid
  • How to design a web service
  • How to remotelly invoke an action or business component or perform a write operation through a Restf
  • how to feed a grid from a JS business component
  • converting a JS object to a JSON string
  • executing a query
  • passing parameters to a server side JS action
  • return value
  • scheduling and frequency
  • finding the right filter panel
  • checking out if a component has been defined
  • Deploying an application
  • Enquiring a table belonging to the Platform repository
  • Adding a where clause to a business component linked to grid
  • Integrating Mailchimp lists
  • Formatting a number as a currency value to use it inside an email template
  • sending email from a template
  • How to send an email
  • Error 'smtpHost' is empty
  • Linking two windows
  • How to open manually a window from another window
  • How to open manually a popup window
  • How to hide a panel in a window dinamically
  • How to manage folder panels
  • How to manage card panels
  • Predefined variables supported by Platform
  • Accessing the application parameters
  • Application Log
  • How to design a web service
  • How to import java classes in server
  • How to import java classes in server
  • How to dynamically set a value on a combo
  • 4WS.Platform
  • How to listen to events in a mobile HTML panel
  • Issues with HTTPS requests
  • How to manage row totals in grid
  • How to send to the UI a notification to execute code automatically
  • How to filter a chart by date interval
  • How to filter a grid by date interval
  • How to read a text or csv file and save data on the database
  • How to write text or csv files
  • Reading an xls file stored in the specified path
  • How to create a report with Jasper Report
  • How to customize the alert message content
  • Setting up a cluster
  • Uploading and downloading files
  • How to listen to user definition changes
  • How to auto-show a window from login
  • How to manage encrypted fields
  • How to change CSS settings for a grid row
  • Customizing a Tree Panel
  • How to execute complex queries on Google Datastore
  • Theme customization
  • Retrieve and send the log of a mobile app
  • Import Roles and Users
  • How to synchronize multiple Form panels in the same window
  • Anchor buttons
  • Properties of subpanels
  • Bulk import
  • How to display the data not found message in a grid
  • How to setup an LDAP based authentication
  • How to synchronize data from Datastore to BigQuery
  • How to synchronize data from Datastore to Google Spanner
  • How to synchronize data from Datastore to CloudSQL
  • Scrollable form list
  • How to setup SAML authentication
  • How to export data from BigQuery in streaming
  • Update Google Spreadsheet
  • How to setup OAuth2 authentication
Powered by GitBook
On this page
  • Customizing Layout and colors, through CSS classes
  • Additional commands to include, through an optional application parameter

Was this helpful?

How to customize the alert message content

It is possible to customize the notification list on the top-bar in terms of:

  1. layout and colors, through CSS classes

  2. additional commands to include, through an optional application parameter

Customizing Layout and colors, through CSS classes

In the following section we suppose the notification system has been already set up.

It is possible to customize a few settings about the notification list, through a series of CSS classes:

  • alertButton - this class is linked to the whole notification container; it csan be used to set a max width, change border, etc.

  • chatnotificationlist - this class is related to the title on the top of the notification list; it can be used to change its height or font size/style, etc.

  • chatnomessage - this class is related to the message showed when there is not any message to show (empty list)

  • chatmarkasreadall - this class is related to the command "Mark all messages as read"

  • chatmarkasreadchatmsg - this class is related to the command "Mark chat message as read"

  • chatmarkasreademailmsg - this class is related to the command "Mark email message as read"

Apart from the CSS classes, it is possible to customize the notification through a series of application parameters, located in the ALERT sub-section:

Parameter name

Value

Show title in the alert message list (def. N)

Flag Y/N. If not specified, no title bar is showed on the top of the notification list. If set to true, the default text "Notification list" is viewed. This text can be customized through the translations functionality, by setting the entry: "chat.notificationlist"

Disable click on alert message (def. N)

Flag Y/N. If not specified, Platform will listen to the click event on a message reported in the notification list and automatically open a message detail window. If set to Y, the listener is removed and it will be up to the developer to optionally open or execute some other action on the click event.

Alert message template

This represents the content of the message to show in the notification list. This is a template, i.e. the real content to show is reckoned starting from this template + data in input, where each variable expressed as {varname} within the template is replaced by the corresponding value in the message in input.

Note: if the Alert message template has not been specified, the default value is:

<table><tr>
<td class="chatnote" >{typeIcon}</td>
    <td width="100px" class="x-menu-list-item-chat">  {from}  </td>
    <td width="200px" class="x-menu-list-item-chat" onClick=\'{openUrl}\'><b>{title}</b></td>
    <td width="150px" class="x-menu-list-item-chat">  {dt}  </td>
    <td align="right" class="x-menu-list-item-chat chat-icon-close" onClick=\'{markAsReadUrl}\'></td>
</tr></table>

The supported variables are:

  • typeIcon - can be: mail or chat or alert

  • from - username of the user sending the alert message

  • openUrl - a javascript command to open the standard message detail window, i.e. manageClickOnItem(createDate, userId, note, destinations, pk.logType, pk.logId, conversationId)

  • title - the message text, i.e. CON60_LOGS.NOTE field value

  • dt - the formatted date+time of the message

  • markAsReadUrl - a javascript command to mark the message as read, i.e. markMessageAsRead(createDate, userId, note, destinations, pk.logType, pk.logId, conversationId)

Additional commands to include, through an optional application parameter

Through the application parameter ALERT -> "Command list to add to the alert dialog", it is possibile to include additional commands to add just after the default commands (close, close all) and before the alert messages.

The value required by this parameter must be a JSON string represeting a list of objects, having the following attributes:

  • text - (mandatory) the command text (it can be translated, if needed, through the Custom section in the Translation feature)

  • css - (optional) define an optional CSS class name to use for this item

  • cmd - (mandatory) define a javascript function expressed as a string with brackets, to invoke when clicking on the command; this function must be declared at global level (window.xxx...)

  • itemId - (optional) the internal name for this command; it can be used to refer the command and access to it, for example to enable/disable it at runtime

Example:

[{ "text": "Apri", "css": "red", "cmd": "openWindowxxx()", "itemId": "mywindowxxx" },{ "text": "Salva", "css": "red", "cmd": "openW()","disabled": true }]

Note: pay attention to the attribute names, which must be included between double apex ".

Once defined these commands, it is possible to access them, through a utility method on the UI:

var command = getAlertCommand(String itemId);

Example:

    var commandxxx = getAlertCommand("mywindowxxx");
    commandxxx.setDisabled(true); // disable the specified com
PreviousHow to create a report with Jasper ReportNextSetting up a cluster

Last updated 4 years ago

Was this helpful?