Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to store an object in the session variable in XSJS?

$
0
0

XS is intentionally a stateless programming model.  You should design your applications so that they persist data either on the client side or in the database itself.

 

Personally I created a single database table to hold such session and application variables.  I then created some stored procedures and an xsjs library to make it reusable to write and read from this central "server cookie" table (very similar to BSP server cookies in ABAP).  It also contains a function to serialize/parse record sets to/from JSON for easy storage in this session table.  This is just demo/personal code - not production quality; but perhaps it offers some ideas. https://dl.dropboxusercontent.com/u/643382/HANA_XS_UTIL-sap.com.tgz


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>