cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <>
Subject Altering session variables via flowscript
Date Fri, 09 Nov 2007 09:57:36 GMT
Working with Cocoon 2.1.8.
I have set a session value for a user, using the session transformer 
in the sitemap.  I now want to alter that value, based on other 
My sample testing flowscript code looks like:
//1. get user's current session  value
var _authContext  = contextMan.getContext("authentication");
var _currUserFrag = authContext.getXML("/authentication/colors"); 
var _currUserColors =;
print ("current Colors for user:" + _currUserColors);
newColorID = "blue"
var newUserColors = _currUserColors + ',' + newColorID;
print ("new Colors:"+newUserColors);
//3. set new value in session
//4. check user's  new session value
_authContext  = contextMan.getContext("authentication");
_currUserFrag = authContext.getXML("/authentication/colors"); 
_currUserColors =;
print ("revised Colors for user:" + _currUserColors)
Part 1 might show a value of "red"; Part 2 then shows a value of 
"red,blue" but part 4 still shows a value of "red" - what needs 
to be different in the code?

This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice,
and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.

View raw message