$.udb.settings
This article is about the settings property of the udb object.
$.udb.settings
Provides access to USoft web application settings and flags set in the Web Designer publication configuration. These settings are exposed via the application.xml file, and via <meta> tags with a "us:" prefix.
Returns a Map object with the current settings. These can be accessed and updated via its native .get() and .set() respectively.
Most of its values can be directly set in the publication configuration itself, although some need to added manually to its Properties table. Here is an overview of these settings:
| Name | Default value | Description |
|---|---|---|
| useHeaders | true | Display the Group and Menu Control headers |
| alignInputs | true | GroupControl aligns the widths of InputControls automatically |
| alignLabels | true | GroupControl aligns the widths of Labels automatically |
| displayLookupPagesAsDialog | true | Display Lookup Pages shown via lookup buttons as dialogs by default |
| displayFooterButtonsOnDialogPage | true | Display dialog pages shown with navigateToLookup/navigateToRelated with close buttons in its footer by default |
| useTimeoutEvent | true | Use automated timeout event to navigate to the login page when timed out |
| displayCalendarOnFocusOnly | "button" | Controls how calendar buttons are displayed for Text Input Controls with data type 'Date'. Possible values are "button", "always", true and false. |
| defaultMessageDialogWidth | 460 | Default width given to Message Controls |
It is possible to add your own application flags as well, and to read them via the $.udb.settings object. Just adding them in the Properties table of your publication configuration is enough to make them accessible via $.udb.settings with the existing functionality directly.
To change any other setting manually that is not one of the above is not considered good practice. Consider making these settings at design-time instead.
Examples
$.udb.settings.get("useTimeoutEvent");
$.udb.settings.set("useTimeoutEvent", false);