Canvas contains its own property descriptor to display the labels of the canvas Canvas components such as the tool-tip texts on the canvas apps, Error error and Information information messages about form items, and other labels that appear apart from the developer's control. The canvas Canvas property file name is canvas-default.properties (expertctstudioResource.jar).
Some of the label keys in the canvas-default_en_US.properties file ,are as follows:
Code Block |
---|
|
# Tools tips text for the app tools
TOOL_TIPS_REFRESH = Refresh
TOOL_TIPS_PRINT = Print
TOOLTIP_PIN = More
TOOL_TIPS_MAXIMIZE = Maximize |
Apart from providing common properties, Canvas also provides the extension to override these properties so that the developer provided values appear. The developer can create their own property file that contains the list of canvas common label keys and values. After creating the property file, the developer must enter the property file name against the label key CT_LABELS_OVERRIDE_BUNDLE_NAME in the multilingualconfig.properties file.
Sample A sample multilingualconfig.properties ,is as follows:
Code Block |
---|
|
# This will be used to override the default labels provided by Canvas.
CT_LABELS_OVERRIDE_BUNDLE_NAME = mycanvas |
Sample My Canvas A sample mycanvas_en_US.properties file ,is as follows:
Code Block |
---|
|
TOOL_TIPS_REFRESH = Reload Data
TOOL_TIPS_PRINT = Print
TOOLTIP_PIN = More...
TOOL_TIPS_MAXIMIZE = Maximise |
Overriding Default Data Messages for Specific Widget
The Canvas property file canvas-default.properties contains two properties for displaying default messages. The first property is NO_DATA_MSG that is used when there is no application data to display on the widget. The second property is NO_DATA_TO_DISP that is used when the logged-in user is not entitled to view the application data. The default values of these properties are as follows:
Code Block |
---|
|
# The message to be displayed if there is no data in the list view
NO_DATA_MSG = Sorry, there is no data to act upon.
NO_DATA_TO_DISP = No data to display. |
If suppose, you want to customize these messages based on some context, e.g. a widget displaying recent transactions must display an appropriate message when there are no recent transactions. To achieve this, you must append the widget ID (view ID) to the NO_DATA_MSG property as follows:
Code Block |
---|
|
<VIEW_ID>_NO_DATA_MSG = <messages text>
# For example:
VW_RECENT_TRAN_NO_DATA_MSG = There are no recent transactions in the last 10 days. |