AdaptableBlotter.JS makes it easy for you, via configuration, to store user state, in a location most suitable to your requirements (ie. locally or remotely). User state can be created at run-time (through user action) or provided at design-time (through predefined config).
User State includes both properties (e.g. the current Advanced Search, which layout is loaded, what colour palette to use etc.) and Adaptable Blotter Objects (e.g. Advanced Searches, Layouts, Shortcuts, Conditional Styles etc.).
User state can be created in 2 ways:
Run-Time - while AdaptableBlotter.JS is running, users can create as many Adaptable Blotter Objects as their permissions allow. Additionally the Adaptable Blotter will automatically save other relevant information (e.g. current Advanced Search or Layout, visible Function Toolbars etc.).
-
Design-Time - administrators and / or developers can ship an application with predefined config: either Adaptable Blotter Objects (e.g. a predefined Search called "Today's Trades" or Shortcut where 'M' multiples numeric cells by 1,000,000) or properties (e.g. which shortcut buttons or function toolbars to show in the Dashboard when first launching the application).
Tip
Depending on the Entitlements you provide, objects in the predefined config can be made read-only for the user and not editable at run-time.
For more information on managing entitlements see Permissions.
User State Storage Options
There are 2 modes of storage available in AdaptableBlotter.JS:
-
Local Storage - by default, user state is stored in the browser's local storage using the Blotter's unique Id (the blotterId property in IAdaptableBlotterOptions).
Warning
If using Local Storage, all user state will be lost each time the user clear's the browser cache and will not be available when switching computer.
Note
Local Storage is turned on by default; if you want to store settings somewhere more useful, you will need to enable ConfigServer.
-
Remote Storage - user state is stored remotely (via ConfigServer) at a configured location. All user state is automatically sent to the location specified in ConfigServer and then persisted there.
Important
Remote Storage is enabled by setting the enableConfigServer property in IAdaptableBlotterOptions.ConfigServerOptions to true when the Blotter is integrated with the host application. (If this is set to false, then Local Storage will be used.)
You will, additionally, need to provide the location where you want the configuration to be stored. This is done via the configServerUrl property also in IAdaptableBlotterOptions.
For more details of both properties see Blotter Options.
Note
When using Remote Storage, all user configuration is still available even after switching computers.
For more information, see Config Server.
Loading and Saving State
When the Adaptable Blotter is first loaded, any predefined config (see below) is read into memory and then stored (either locally or remotely - depending on your settings) together with any user state that is created during that session.
Subsequently, each time the application is launched, that User State is retrieved (either from local storage or remote storage) and the Blotter is pre-populated with it.
Tip
The Blotter API provides a large number of methods to enable you to access this State at runtime. (See Config API for full details)l
Predefined Config
Predefined Config is User State that is provided at design time and effectively shipped with that instance of the Adaptable Blotter. It includes all the settings and objects you want AdaptableBlotter.JS to have at start-up.
Note
You can use Predefined Config for both local and remote storage - the Adaptable Blotter will take care of the details.
You don't have to supply any Predefined Config - in which case the defaults will be used.
The predefined config is specified in the predefinedConfig property of the AdaptableBlotterObjects. This property can either be the JSON itself or the location of a .json file (see Integration for more details).
There is a large number of different configuration sections, each with various properties, lists or objects which you can specify. For a full list of the options (together with defaults) see the Predefined Config section.
Comments
0 comments
Article is closed for comments.