How to access object from session storage ?

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 ?
3 answers

The new Mendix 8 Javascript actions can do that.


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



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