How to access object from session storage ?

0
I am storing some object in session storage using javascript in index.html of my app.  Now at runtime I require that object by passing key of it. is it possible to do so? How ?  If not, what will be the best alternative for this ?
asked
3 answers
3

The new Mendix 8 Javascript actions can do that.

answered
1

Hello Rushikesh, 

I suggest creating an entity for your temporary data associated either to the user or to the session in Mendix. This is a bit more reliable as Mendix can carry sessions between browser sessions, maintains them a while after the browser is closed and re-activates them if the user re-opens the page. 

You can then retrieve and use them in any MF logic.

Hope this helps

 

answered
0

Either use entities (Non Persistent) as Dragos Vrabie describes or you can take a look at the example in the appstore / github on LocalStorage https://github.com/cdcharlebois/mxLocalStorage

answered