Supported Bean: PreferencesBean

The PreferencesBean is an application level bean that allows end users to set their preferences values. Preferences allows users to customize the application to their own settings.
Preferences are managed by the Preferences class, which is an application level object shared through the appContext class. The PreferencesBean is responsible to present the end-user graphical interface and to handle the events of updating the Preferences values.
Graphically, preferences are grouped based on the level and their usage. Usually for the level, we would have user and administrator preferences. User preferences apply only to the current user and project; administrator preferences are only available to administrator and are applied to all users. On the usage we have groups like General, Grid display, Graph display, etc. We have groups that only apply at the user level, such as History List; we also have groups that only apply at the admin level, such as Login.
The PreferencesBean extends the AppComponent (the base for all Application beans). It provides an initFromXml() method which receives a Node and creates the internal structures for groups and group-sets.
It provides methods to retrieve/set the current group/group-set based on its name.
It has an EventHandler, this event handler is the one responsible to receive the request, update the Preferences or set the current group/group-set from it.
Each group will define the transform it should use to render the preferences. The generateOutput() method (inherited from WebComponent) will check which is the current group, and will call its transform to generate the MarkupOutput.
The class also provides a method to return a MarkupOutput to use to render the groups list.
It implements Persistable. We would use this to save the state of the bean. On the state the current group and group-set are saved.

Event handler: com.microstrategy.web.app.beans.EnumSysBeanTypes.AppBeanPreferences (25)

Application bean type for the Preferences bean

Events

addPromptCustomStyle, loadProjectDefaults, removePromptCustomStyle, selectGroup, selectGroupSet, showAdvancedSettings, showColorThemePreview, updatePreferences, validatePreferences

addPromptCustomStyle
Event to add a new custom prompt style. Required parameters: EnumPreferencesEvents.WebEventArgumentCustomStyleToAddName, EnumPreferencesEvents.WebEventArgumentCustomStyleToAddDescription, EnumPreferencesEvents.WebEventArgumentCustomStyleToAddBaseStyle, EnumPreferencesEvents.WebEventArgumentCustomStyleToAddPromptType,

25010

EnumPreferencesEvents.WebEventAddCustomPromptStyle

csToAddBaseStyle

25033

EnumPreferencesEvents.WebEventArgumentCustomStyleToAddBaseStyle

csToAddDescription

25035

EnumPreferencesEvents.WebEventArgumentCustomStyleToAddDescription

csToAddName

25032

EnumPreferencesEvents.WebEventArgumentCustomStyleToAddName

csToAddPromptStyle

25034

EnumPreferencesEvents.WebEventArgumentCustomStyleToAddPromptType

loadProjectDefaults
event to load the project defaults

25008

EnumPreferencesEvents.WebEventLoadProjectDefaults

allProjects

event argument: apply changes to all projects

25004

EnumPreferencesEvents.WebEventArgumentAllProjects

level

event argument: level that to which to set the preferences values.

25002

EnumPreferencesEvents.WebEventArgumentPreferencesLevel

removePromptCustomStyle
Event to add a new custom prompt style. Required parameters: EnumPreferencesEvents.WebEventArgumentCustomStyleToDeleteName, EnumPreferencesEvents.WebEventArgumentCustomStyleToDeleteDescription, EnumPreferencesEvents.WebEventArgumentCustomStyleToDeleteBaseStyle, EnumPreferencesEvents.WebEventArgumentCustomStyleToDeletePromptType,

25011

EnumPreferencesEvents.WebEventRemoveCustomPromptStyle

csToDeleteBaseStyle

25037

EnumPreferencesEvents.WebEventArgumentCustomStyleToDeleteBaseStyle

csToDeleteDescription

25039

EnumPreferencesEvents.WebEventArgumentCustomStyleToDeleteDescription

csToDeleteName

25036

EnumPreferencesEvents.WebEventArgumentCustomStyleToDeleteName

csToDeletePromptStyle

25038

EnumPreferencesEvents.WebEventArgumentCustomStyleToDeletePromptType

selectGroup
event to change the current group

25002

EnumPreferencesEvents.WebEventSelectPreferencesGroup

keepPreferences

event argument: argument to temporarily keep the value of the preferences.
The preferences do not get saved to the metadata until the event EnumPreferencesEvents.WebEventUpdatePreferences is submited from the page that contains those preferences.

Possible values:
PreferencesBean.SAVE_TEMP_PREFERENCE - Save the preferences temporarily.
PreferencesBean.KEEP_TEMP_PREFERENCE - Keep the current temporary preferences.

If the argument is not specified when calling the event EnumPreferencesEvents.WebEventSelectPreferencesGroup, the current temporary preferences will be deleted.
Note: Used to keep the preferences value when moving between the Print/PDF and the Header Footer Editor.

25028

EnumPreferencesEvents.WebEventArgumentKeepTempPreferences

prevGroupName

event argument: argument to denote the name of the previous group preferences.
Used on the header/footer editor to know what preferences group to go to when users submit the form.

25029

EnumPreferencesEvents.WebEventArgumentPrevGroupName

target

event argument: target parameter for the group/group-set that will be selected.

25001

EnumPreferencesEvents.WebEventArgumentTarget

selectGroupSet
event to change the current group-set

25001

EnumPreferencesEvents.WebEventSelectPreferencesGroupSet

target

event argument: target parameter for the group/group-set that will be selected.

25001

EnumPreferencesEvents.WebEventArgumentTarget

showAdvancedSettings

25009

EnumPreferencesEvents.WebEventSwitchAdvancedSettings

settingDiv

25030

EnumPreferencesEvents.WebEventArgumentAdvancedSettingDiv

visibility

25031

EnumPreferencesEvents.WebEventArgumentDynamicDivVisibility

showColorThemePreview
Event to toggle Color Theme Preview in HTML mode note - this event will use the same set of arguments IDs for event 25009.

25017

EnumPreferencesEvents.WebEventSwitchColorThemePreview

previewDiv

25030

EnumPreferencesEvents.WebEventArgumentAdvancedSettingDiv

previewVisibility

25031

EnumPreferencesEvents.WebEventArgumentDynamicDivVisibility

updatePreferences
event to update the preferences values:

25003

EnumPreferencesEvents.WebEventUpdatePreferences

addFont

event argument: argument to denote the add button of the font names shopping cart.

25022

EnumPreferencesEvents.WebEventArgumentAddFont

allProjects

event argument: apply changes to all projects

25004

EnumPreferencesEvents.WebEventArgumentAllProjects

apply

event argument: apply changes

25003

EnumPreferencesEvents.WebEventArgumentApply

availableFonts

event argument: argument to denote the list of available fonts in the system.

25026

EnumPreferencesEvents.WebEventArgumentAvailableFonts

defaults

event argument: load default values

25005

EnumPreferencesEvents.WebEventArgumentLoadDefaults

level

event argument: level that to which to set the preferences values.

25002

EnumPreferencesEvents.WebEventArgumentPreferencesLevel

moveFontDown

event argument: argument to denote the move down button of the font names shopping cart.

25025

EnumPreferencesEvents.WebEventArgumentMoveFontDown

moveFontUp

event argument: argument to denote the move up button of the font names shopping cart.

25024

EnumPreferencesEvents.WebEventArgumentMoveFontUp

removeFont

event argument: argument to denote the remove button of the font names shopping cart.

25023

EnumPreferencesEvents.WebEventArgumentRemoveFont

selectedFonts

event argument: argument to denote the selected fonts.

25027

EnumPreferencesEvents.WebEventArgumentSelectedFonts

validatePreferences
event to validate the values of the preferences which are submitted:

25006

EnumPreferencesEvents.WebEventValidatePreferences

level

event argument: level that to which to set the preferences values.

25002

EnumPreferencesEvents.WebEventArgumentPreferencesLevel


Notes

* denotes required field.