Appboard/2.4/builder/system administration/session variables: Difference between revisions

imported>Jason.nicholls
imported>Jason.nicholls
Line 52: Line 52:
|-
|-
|''Type''
|''Type''
|Drop-down selection of the data type of the variable. The default is <tt>STRING</tt>, but other types include <tt>BOOLEAN, NUMBER, INT, DATE<tt>
|Drop-down selection of the data type of the variable. The default is <tt>STRING</tt>, but other types include <tt>BOOLEAN, NUMBER, INT</tt>, and <tt>DATE</tt>
|-
|-
|''Scope''
|''Scope''
|
|See the
|-
|-
|''Options''
|''Options''

Revision as of 11:54, 3 October 2013


The Session Variable administration page allows the definition and default configuration for session variables within the AppBoard system.

Session Variables administration page


Overview

Typical uses for session variables:

  • storing environmental information that is subject to change such as database hostnames, usernames, passwords.
  • associating extra information for domains and users, which can then be used for a variety of purposes such as modifying queries etc... This may be helpful in multi-tenanted deployments.
  • a central place to store simple key information used in multiple places

Session variables can be used anywhere SHIM expressions are permitted using session.var.get.

There are a number of ways to set session variables:

  • Session Variables administration page to define and set defaults
  • URL parameters to override session variables (only allowed if configured this way)
  • Explicitly set through the use of a SHIM expression session.var.set.
  • Imported at runtime dynamically, for example by pulling in additional user attributes from LDAP and assigning them to session variables.

Variable Scoping

An important concept is that session variables are globally available but can actually have different values depending on the session and whether the session variable has been defined to have Domain and/or User scope. For example, in a case where all three levels are defined (Global, Domain, and User) then the most specific version is used, i.e. the User version.


Managing Session Variables

Manage Variables dialog

The default screen when accessing the Sessions Variable administration page provides the mechanism to override Domain and User scoped variables. To actually define and edit default values click the Manage Variables button to bring up the Manage Variables dialog as shown to the right.

This dialog can be used to:

  • Add new variables
  • Delete variables
  • Configure existing variables

The following table provides a description of the configuration fields when defining variables:

Field Description
Name Shows the name of the currently selected variable. This is not editable, if a variable with an incorrect name is created then delete it and create another.
Description This description is purely for the AppBoard administrator. Best practices is to provide some information around why and what the variable is used for.
Type Drop-down selection of the data type of the variable. The default is STRING, but other types include BOOLEAN, NUMBER, INT, and DATE
Scope See the
Options
Ordinal Position
Default Value