This topic has been locked.
5 replies Latest Post - 2011-01-07T05:34:05Z by SureshVengidusamy
Pinned topic Sessions in Widgets
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
hi How do we handle session in Widgets.
Updated on 2011-01-07T05:34:05Z at 2011-01-07T05:34:05Z by SureshVengidusamy
drdamour 0600029F9D23 Posts
drdamour 0600029F9D23 PostsACCEPTED ANSWER
Re: Sessions in Widgets2011-01-06T22:41:04Z in response to SureshVengidusamyThere's a lot of options for this:
If you were in Mashup Center 3.0, you could use the new User Context settings to store the value in a widget's managed item set specific to the current user
You could store the value on a DOM Object using the ECMAScript DOM API. Something like window.MyValueCache.ValueName = 'Value' and retrieve it later
You could store the value in a Cookie using the ECMAScript Cookie API.
You could use Mashup Hub to store & retrieve the value in a database using the user id (gotten from the iWidget iContext API) as a key value.
You could create a Web API that stores & retrieves your value (in a DB or perhaps in the JEE Web Session scope) and call the API from ECMAScript.
I've ordered this list from what i'd consider easiest to hardest to implement.
I am Just a new Boy,
A Stranger in this Town,
Where are All the Good Times,
Who's Gonna Show this Stranger Around?