r9645 - helma-ng/trunk/modules/helma/webapp
[email protected] Wed, 22 Apr 2009 01:41:50 +0200 (CEST)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20090421234150.18B073D0D6@mia> |
Author: hannes
Date: 2009-04-22 01:41:50 +0200 (Wed, 22 Apr 2009)
New Revision: 9645
Modified:
helma-ng/trunk/modules/helma/webapp/request.js
Log:
Make request.session work
Details at http://dev.helma.org/trac/helma/changeset/9645
Modified: helma-ng/trunk/modules/helma/webapp/request.js
===================================================================
--- helma-ng/trunk/modules/helma/webapp/request.js 2009-04-21 23:41:48 UTC (rev 9644)
+++ helma-ng/trunk/modules/helma/webapp/request.js 2009-04-21 23:41:50 UTC (rev 9645)
@@ -91,8 +91,14 @@
define("data", {
get: function() {
if (!data) {
- data = new ScriptableMap();
- getSession().setAttribute("helma", data);
+ var session = getSession();
+ data = session.getAttribute("helma");
+ if (!data) {
+ data = new ScriptableMap();
+ session.setAttribute("helma", data);
+ } else {
+ data = new ScriptableMap(data);
+ }
}
return data;
}