Link | xs_sessionVars |
Author | Jonathan Guthrie |
Category | Session |
Version | 8.x |
License | http://creativecommons.org/licenses/by/2.5/ |
Posted | 08 Mar 2006 |
Updated | 08 Mar 2006 |
More by this author... |
Defines session vars from a supplied map and data type. A possible later extension would be to have separate datatypes per variable.
local('varMap'=(Map: 'sv_sessionvar1'='', 'sv_sessionvar1'='', )); xs_sessionVars(-varMap=#varMap,-sName=$sessionName);
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define_tag('xs_sessionVars', -Required='varMap', -Optional='dataType', -Required='sName', -Description='Defines session vars from a supplied map and data type'); iterate(#varMap,(local('temp'))); Session_AddVariable(-Name=#sName,(#temp->First)); if((Variable_Defined(#temp->First))==False); select(local('dataType')); case('integer'); var((#temp->First)=(integer:(#temp->Second))); case:'decimal'; var((#temp->First)=(decimal:(#temp->Second))); case:'array'; var((#temp->First)=(#temp->Second)); case:'map'; var((#temp->First)=(#temp->Second)); case:'boolean'; var((#temp->First)=(#temp->Second)); case; var((#temp->First)=(string:(#temp->Second))); /select; /if; /iterate; /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft