$.udb.settings
note
This article is about the settings property of the udb object.
$.udb.settings
Provides access to USoft web application settings and flags by exposing the following resources.
Resource | Description |
---|---|
$.udb.settings.browser | Name of current browser |
$.udb.settings.browserVersion | Version of current browser. Useful only when the browser is IE. |
$.udb.settings.compatibilityMode | Name indicating compatibility with the UI of a USoft version |
$.udb.settings.get() | Accesses settings from the “application.xml” file. These settings can be overridden on application initialisation by <meta> tags in the "application.html" file with the same name and the "us:" prefix. |
$.udb.settings.menu | Contains properties of menu controls corresponding to the user group menu passed by the Page Engine. |
$.udb.settings.set() | Changes a setting from the “application.xml” file temporarily. These settings can be overridden at application initialization with <meta> tags in the "application.html" file with the same name and the "us:" prefix. Refreshing the browser will re-apply the initial setting. Resetting settings with .set() is unlikely to be effective because, for the new setting to take effect, a page reload is required, or even an application reload. |
danger
To script behaviour with these function calls is unlikely to be good practice. Consider making these settings at design-time instead.
Possible values returned by .settings.compatibilityMode are usoft7, usoft8 and usoft9 and usoft10. By setting the application's compatibility mode to an older USoft version you may disable certain UI features that were introduced after that version. This gives you backward compatibility at the price of having less available features.
Examples
$.udb.settings.get("useTimeoutEvent");
$.udb.settings.set("useTimeoutEvent", false);