Difference between revisions of "Template:MDBTutorialViewPropertiesAndContext"
m (Typo fix) |
|||
(18 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | == Defining View Properties and | + | == Defining View Properties and Variables == |
− | + | To define context variables, type in the name of the variable to the text field and click the check mark. After that, you can click the value field and type in the value for your context variable. Context variables starting with "'''sys:'''" are system variables which have special purpose in QPR UI - use them only for their intended purpose. The '''Behavior''' selection affects the context variable used explained in [[Context_Variables_in_QPR_UI#Context Variable Behaviors|Context Variable Behaviors]]. To see what context variable values are used in the view, panel, or presentation object, select the '''Show effective context''' check box in the Context tab of the view, panel, or presentation object properties pages. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | # | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | + | == Variables Usage Example == |
− | + | There is a view with one panel, in which there is one presentation object. The '''Session''' variable values are defined as follows:<br> | |
+ | {| class="wikitable" | ||
+ | !'''Variable name''' | ||
+ | ! '''Value''' | ||
+ | |- | ||
+ | ||AccountManager | ||
+ | ||John Smith | ||
+ | |- | ||
+ | ||Country | ||
+ | ||Sweden | ||
+ | |} | ||
+ | |||
+ | In the '''View Properties''', the following variable values are defined:<br> | ||
+ | {| class="wikitable" | ||
+ | !'''Variable name''' | ||
+ | ! '''Value''' | ||
+ | ! '''Behavior''' | ||
+ | |- | ||
+ | ||AccountManager | ||
+ | ||William Taylor | ||
+ | ||Stored variable | ||
+ | |- | ||
+ | ||CustomerGroup | ||
+ | ||Kids | ||
+ | ||Local variable | ||
+ | |} | ||
+ | |||
+ | In the '''Panel Properties''', the following variable values are defined:<br> | ||
+ | {| class="wikitable" | ||
+ | !'''Variable name''' | ||
+ | ! '''Value''' | ||
+ | ! '''Behavior''' | ||
+ | |- | ||
+ | ||AccountManager | ||
+ | ||Susan Chapman | ||
+ | ||Local variable | ||
+ | |- | ||
+ | ||Country | ||
+ | ||Finland | ||
+ | ||Local variable | ||
+ | |} | ||
+ | |||
+ | In the '''Presentation Object Properties''', the following variable values are defined:<br> | ||
+ | {| class="wikitable" | ||
+ | !'''Variable name''' | ||
+ | ! '''Value''' | ||
+ | ! '''Behavior''' | ||
+ | |- | ||
+ | ||ProductGroup | ||
+ | ||Umbrellas | ||
+ | ||Stored variable | ||
+ | |} | ||
+ | |||
+ | 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:<br> | ||
+ | {| class="wikitable" | ||
+ | !'''Variable name''' | ||
+ | ! '''Value''' | ||
+ | ! '''Source''' | ||
+ | ! '''Scope''' | ||
+ | |- | ||
+ | ||AccountManager | ||
+ | ||William Taylor | ||
+ | ||Scope of the view | ||
+ | ||View | ||
+ | |- | ||
+ | ||Country | ||
+ | ||Sweden | ||
+ | ||Inherited from session context | ||
+ | ||Session | ||
+ | |- | ||
+ | ||CustomerGroup | ||
+ | ||Kids | ||
+ | ||Scope of the view | ||
+ | ||View | ||
+ | |} | ||
+ | |||
+ | 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:<br> | ||
+ | {| class="wikitable" | ||
+ | !'''Variable name''' | ||
+ | ! '''Value''' | ||
+ | ! '''Source''' | ||
+ | ! '''Scope''' | ||
+ | |- | ||
+ | ||AccountManager | ||
+ | ||Susan Chapman | ||
+ | ||Initialized from the panel's context | ||
+ | ||Panel | ||
+ | |- | ||
+ | ||Country | ||
+ | ||Finland | ||
+ | ||Initialized from the panel's context | ||
+ | ||Panel | ||
+ | |- | ||
+ | ||CustomerGroup | ||
+ | ||Kids | ||
+ | ||Inherited from the effective context of the view | ||
+ | ||View | ||
+ | |} | ||
+ | |||
+ | 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: | ||
+ | {| class="wikitable" | ||
+ | !'''Variable name''' | ||
+ | ! '''Value''' | ||
+ | ! '''Source''' | ||
+ | ! '''Scope''' | ||
+ | |- | ||
+ | ||AccountManager | ||
+ | ||Susan Chapman | ||
+ | ||Inherited from the effective context of the panel | ||
+ | ||Panel | ||
+ | |- | ||
+ | ||Country | ||
+ | ||Finland | ||
+ | ||Inherited from the effective context of the panel | ||
+ | ||Panel | ||
+ | |- | ||
+ | ||ProductGroup | ||
+ | ||Umbrellas | ||
+ | ||Scope of the presentation object | ||
+ | ||Presentation object | ||
+ | |- | ||
+ | ||CustomerGroup | ||
+ | ||Kids | ||
+ | ||Inherited from the effective context of the view | ||
+ | ||View | ||
+ | |} | ||
+ | |||
+ | To put it more concisely, the context variable values (and their behaviors) are as follows:<br> | ||
+ | {| class="wikitable" | ||
+ | !Context Variable||Session||View||Panel||Presentation Object | ||
+ | |- | ||
+ | |AccountManager||John Smith||William Taylor (Stored variable)||Susan Chapman (Local variable)|| | ||
+ | |- | ||
+ | |Country||Sweden|| ||Finland (Local variable) || | ||
+ | |- | ||
+ | |ProductGroup|| || || ||Umbrellas (Stored variable) | ||
+ | |- | ||
+ | |CustomerGroup|| ||Kids (Local variable)|| || | ||
+ | |} | ||
+ | |||
+ | The effective context values are: | ||
<br> | <br> | ||
− | + | {| class="wikitable" | |
− | + | !Context Variable||Session||View||Panel||Presentation Object | |
− | + | |- | |
− | + | |AccountManager||John Smith||William Taylor||Susan Chapman||Susan Chapman | |
+ | |- | ||
+ | |Country||Sweden||Sweden||Finland||Finland | ||
+ | |- | ||
+ | |ProductGroup|| || || ||Umbrellas | ||
+ | |- | ||
+ | |CustomerGroup|| ||Kids||Kids||Kids | ||
+ | |} |
Latest revision as of 10:29, 23 December 2019
Defining View Properties and Variables
To define context variables, type in the name of the variable to the text field and click the check mark. After that, you can click the value field and type in the value for your context variable. Context variables starting with "sys:" are system variables which have special purpose in QPR UI - use them only for their intended purpose. The Behavior selection affects the context variable used explained in Context Variable Behaviors. To see what context variable values are used in the view, panel, or presentation object, select the Show effective context check box in the Context tab of the view, panel, or presentation object properties pages.
Variables Usage Example
There is a view with one panel, in which there is one presentation object. The Session variable values are defined as follows:
Variable name | Value |
---|---|
AccountManager | John Smith |
Country | Sweden |
In the View Properties, the following variable values are defined:
Variable name | Value | Behavior |
---|---|---|
AccountManager | William Taylor | Stored variable |
CustomerGroup | Kids | Local variable |
In the Panel Properties, the following variable values are defined:
Variable name | Value | Behavior |
---|---|---|
AccountManager | Susan Chapman | Local variable |
Country | Finland | Local variable |
In the Presentation Object Properties, the following variable values are defined:
Variable name | Value | Behavior |
---|---|---|
ProductGroup | Umbrellas | Stored variable |
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:
Variable name | Value | Source | Scope |
---|---|---|---|
AccountManager | William Taylor | Scope of the view | View |
Country | Sweden | Inherited from session context | Session |
CustomerGroup | Kids | Scope of the view | View |
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:
Variable name | Value | Source | Scope |
---|---|---|---|
AccountManager | Susan Chapman | Initialized from the panel's context | Panel |
Country | Finland | Initialized from the panel's context | Panel |
CustomerGroup | Kids | Inherited from the effective context of the view | View |
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:
Variable name | Value | Source | Scope |
---|---|---|---|
AccountManager | Susan Chapman | Inherited from the effective context of the panel | Panel |
Country | Finland | Inherited from the effective context of the panel | Panel |
ProductGroup | Umbrellas | Scope of the presentation object | Presentation object |
CustomerGroup | Kids | Inherited from the effective context of the view | View |
To put it more concisely, the context variable values (and their behaviors) are as follows:
Context Variable | Session | View | Panel | Presentation Object |
---|---|---|---|---|
AccountManager | John Smith | William Taylor (Stored variable) | Susan Chapman (Local variable) | |
Country | Sweden | Finland (Local variable) | ||
ProductGroup | Umbrellas (Stored variable) | |||
CustomerGroup | Kids (Local variable) |
The effective context values are:
Context Variable | Session | View | Panel | Presentation Object |
---|---|---|---|---|
AccountManager | John Smith | William Taylor | Susan Chapman | Susan Chapman |
Country | Sweden | Sweden | Finland | Finland |
ProductGroup | Umbrellas | |||
CustomerGroup | Kids | Kids | Kids |