sessionScope.put("key", "some string value"); var a = new Array(); a.push("value1"); a.push("value2"); sessionScope.put("anotherkey", a);
var v = sessionscope.get("key");
Hi Julian,
do sessionScope vars also work across databases (during the same session of course)?
yes
...but I do not receive data, when retrieving them from within another database...
Bug or feature? sessionScope is local for every NSF. Also applicationScope has key based on NSF path, so differrent URLs to the same app lead to different applicationScope storage. (tested on 8.5.2)
feature! (from my point of view :-) ).
ApplicationScope means by it's name that it's per application. And since sessionScope is lower than applicationScope, it has to be per application, too.
Can you explane me the difference from ViewScope and RequestScope? ViewScope exist only when I have Views Domino?
ViewScope is as long as the focus is on the Xpage (the xp:view)
RequestScope is as long as an action (in which the RequestScope is set) takes place, soon as you click enter a tab or your code continues with something else, it is lost.
How to set the sessionscope's parameters in agent? Use session???
in an agent you don't have access to scoped variables