IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 5 replies
  • Latest Post - ‏2011-01-07T05:34:05Z by SureshVengidusamy
SureshVengidusamy
SureshVengidusamy
6 Posts

Pinned topic Sessions in Widgets

‏2011-01-04T06:23:09Z |
hi How do we handle session in Widgets.
Updated on 2011-01-07T05:34:05Z at 2011-01-07T05:34:05Z by SureshVengidusamy
  • drdamour
    drdamour
    23 Posts

    Re: Sessions in Widgets

    ‏2011-01-04T08:19:42Z  
    can you be more specific on what you mean?

    I am Just a new Boy,
    A Stranger in this Town,
    Where are All the Good Times,
    Who's Gonna Show this Stranger Around?
  • SystemAdmin
    SystemAdmin
    25 Posts

    Re: Sessions in Widgets

    ‏2011-01-04T11:59:26Z  
    • drdamour
    • ‏2011-01-04T08:19:42Z
    can you be more specific on what you mean?

    I am Just a new Boy,
    A Stranger in this Town,
    Where are All the Good Times,
    Who's Gonna Show this Stranger Around?
    Guys like this rarely understand what they mean.
  • SureshVengidusamy
    SureshVengidusamy
    6 Posts

    Re: Sessions in Widgets

    ‏2011-01-05T07:26:52Z  
    • drdamour
    • ‏2011-01-04T08:19:42Z
    can you be more specific on what you mean?

    I am Just a new Boy,
    A Stranger in this Town,
    Where are All the Good Times,
    Who's Gonna Show this Stranger Around?
    Hi Dude,
    I need to carry a value and display it in a text box when next time i open the step processor.
  • drdamour
    drdamour
    23 Posts

    Re: Sessions in Widgets

    ‏2011-01-06T22:41:04Z  
    Hi Dude,
    I need to carry a value and display it in a text box when next time i open the step processor.
    There'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?
  • SureshVengidusamy
    SureshVengidusamy
    6 Posts

    Re: Sessions in Widgets

    ‏2011-01-07T05:34:05Z  
    • drdamour
    • ‏2011-01-06T22:41:04Z
    There'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?
    Thanks...Dude....