Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hello all,
I got a question from a colleague on how they can automatically select a node in a tree widget after refreshing their 9.3 mashup.
I recommended that they use the "localStorage" object in an expression, as I had used it before (in 9.1).
But it seems like after the update from "Type" : "expression" to "Type" : "expression2" (the security update) this is no longer working.
We also saw that the sessionStorage object has been depricated in this PTC help center article
I just wanted to clarify what our options are.
This PTC help center article talks about session parameters, but that they only last during the session and that the recommended way for session breaking parameters is to store this type of information in a database or on a thing.
Is this the proper way going forward?
Thanks,
Jens
Solved! Go to Solution.
If creating an extension that can read/write the browser storage is not feasible for you, I would store such "meta"-information as a persistent property in a UI-controller thing. In your specific case I would create an infotable (or maybe JSON) property that contains a row for each user and their respective selection in the tree widget.
Of course this solution has its downsides. When a user is deleted you need to remove his selection entry in this infotable. Furthermore, depending on your user count and the usage of the widget in the UI, this can put heavy load on your database.
I would prefer the session parameters if the users are accepting it.
If creating an extension that can read/write the browser storage is not feasible for you, I would store such "meta"-information as a persistent property in a UI-controller thing. In your specific case I would create an infotable (or maybe JSON) property that contains a row for each user and their respective selection in the tree widget.
Of course this solution has its downsides. When a user is deleted you need to remove his selection entry in this infotable. Furthermore, depending on your user count and the usage of the widget in the UI, this can put heavy load on your database.
I would prefer the session parameters if the users are accepting it.