Configuration > User Settings XML |
Use the User Settings XML to personalize the App's behavior according to the user configuration. Place the file in the App userSetting folder.
For example: myapp\myapp-runtime\src\main\install\userSetting\myapp-settings.xml
To get a user setting value, use UserSettingService:getUserSetting, public String getUserSetting( String categoryID, String contextID, String settingID)
For example, to retrieve the value of the data filter setting in the example at the bottom of this topic, use:
String dataFilterUserSetting = userSettingsService.getUserSetting("NOTES", "filter_settings", "data.filter.name");
Property name | Description |
---|---|
category name | The App serviceId |
category version | The App version |
context name | A key to the section that contains the user setting. Each setting can be placed under specific section. This key will be sent by the App to retrieve setting of specific section. |
context nameKey | A key to the translated section label value. Each setting can be placed under specific section. It will be displayed in the User settings UI under the selected App tab. Note: if no translation is found in the App resource bundle, the key will be displayed as is in the user settings UI |
Setting name | The key of the user setting, this key will be sent by the App to retrieve its value. |
Setting nameKey | A key to the translated name value. Each setting has different name label. The settings names will be displayed in the user settings UI for the selected App. Note: if no translation is found in the App resource bundle, the key will be displayed as is in the user UI |
Setting Required | Supported values: “true”/”false” When required is set to true, user will have to set value to this setting in order to save the settings in the user settings UI. When required is set to false, the value of this setting can remain empty (null). |
Value element: <string></string> <boolean></ boolean> <integer></integer> <float></ float> <enumeration ></ enumeration> < encrypted></ encrypted> |
The initial setting value. Setting value type can be string, boolean, integer,float, enumeration or encrypted. For boolean value type the value can be true/false. For enumeration value type the value can be selection of enum string values, where one of the enum values will be the default value when it is set with default=”true” For example: <enumeration> <enum value="LWSSO" default="true"/> <enum value="BasicAuth"/> </enumeration> Encrypted value type means the input value will not be displayed for the user |
<category name="noteshpit" version="1.01.00" > <context name="filter_settings" nameKey="filter_settings.context.name"> <setting name="data.filter.name" nameKey="data.filter.name.key" required="false"> <string></string> </setting> </context> </category>