Variables in QPR UI

From Mea Wiki
Revision as of 10:06, 13 March 2017 by TeeHiet (talk | contribs) (306933)
Jump to navigation Jump to search

Context in QPR MobileDashboard is an integration mechanism for storing and communicating configuration and settings data between the different elements (views, panels, presentation objects, external applications) in QPR MobileDashboard. For example, the context can define the starting point for querying data from QPR ProcessAnalyzer or QPR Suite Web Services, or it can be used, for example, to define the chart type and chart colors.

Effective Context and Context Inheritance

The context is defined with context variables that have a certain values. The context variables in QPR MobileDashboard have two types of behavior: Default and Fixed. There are four levels where the context is defined: Session, View, Panel, and Presentation Object. The context variable behavior type defines how the context variable value is inherited from the Session context, i.e. what the effective contexts of the view, its panel(s), and presentation object(s) are:

  • Default: context variables with the "Default" behavior will inherit the context variable value from the higher level (Session -> View -> Panel -> Presentation Object), if there is an effective context variable value on the higher level. If there isn't an effective context variable value on the higher level, the value defined for the View, Panel, or Presentation Object will be used.
  • Fixed: the value of the context variable will overwrite any existing effective value of the same context variable.

Example

There is a view with one panel, in which there is one presentation object.

The Session context variable values are defined as follows:
800px

In the View Properties, the following context variable values are defined:
800px

In the Panel Properties, the following context variable values are defined:
800px

In the Presentation Object Properties, the following context variable values are defined:
800px

In the Effective View Context, these result into the values shown below. Note the Source column displaying the information where the effective context comes from: 800px

In the Effective Panel Context, these result into the values shown below. Note the Source column displaying the information where the effective context comes from: 800px

In the Effective Presentation Object Context, these result into the values shown below. Note the Source column displaying the information where the effective context comes from: 800px

To put it more concisely, the context variable values (and their behaviors) are as follows:

Context Variable Session View Panel Presentation Object
AccountManager William Taylor John Smith (Default) Susan Chapman (Fixed)
Country Sweden Finland (Default) Norway (Fixed)
ProductGroup Umbrellas Pants (Fixed)

The effective context values are:

Context Variable Session View Panel Presentation Object
AccountManager William Taylor William Taylor Susan Chapman Susan Chapman
Country Sweden Sweden Sweden Norway
ProductGroup Umbrellas Pants Pants Pants

Context and Navigating the Views

Any time the Session Context is modified (like when clicking a Pushbutton or modifying ProcessAnalyzer Presentation Object settings that cause session variables to be modified), a browser history entry is created. The preceding values in the Session Context can be restored via the browser's Back button. Left-clicking the Back button will restore the previous session context values, whereas right-clicking the Back button will show a list of Session Context changes to select from. Selecting an entry on the list, will restore the session context from that entry.
BrowserHistory.png