cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Session parameters issue.

egolindano
7-Bedrock

Session parameters issue.

Hi. I got a problem with some session parameters that i'm sending to another mashup, the thing is , after I redirect from one mashup to another I have to refresh the page once more to get the updated parameters in the session. Does anyone know what could be the reason of this?

Thank You for your time.

ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:egolindano)

Please be aware that Setting a session value Server side doesn't show on the client side unless you 'refresh' the mashup.

from your scenario it sounds like it should work properly, but to make sure you always have the most recent values, you can use GetGlobalSessionValues in the mashup.

Something that I do, 1 service that fires and modifies the Session, but then on service invoke completes it retrieves the value from the session client side using the GetGlobalSessionValues and I bind from that service.

This type of scenario prevents the usage of client side Session Value changed event though.

View solution in original post

7 REPLIES 7
posipova
20-Turquoise
(To:egolindano)

Could you please provide the details on how your mashups are connected and how you are sending the parameter? I've just tested it in my system and did not need to refresh.

My scenario:

1. First mashup contains a textbox widget and a navigation widget:

     - textbox widget then feeds data to the session variable (of type String - for the textbox widget)

     - navigation widget opens a mashup 2 in a new window

2. Second mashup contains a textbox widget that consumes data from the same session variable

When viewing Mashup 1, I enter some value into the textbox , then navigate through the widget to Mashup 2. Mashup 2 shows the textbox with my session variable value.

Hi, Pollina.

1) I have a combobox where i choose some options

2) After i've chose the options i call a service which retrieve some information from another software and store that information in a session parameter.


3) I use a navigation widget to navigate to the other mashup


4) After the mashup is loaded I call a service to use the information of the session.

posipova
20-Turquoise
(To:egolindano)

For the step 4 -- is your service running on the "mashup loaded" event? When you load the mashup your session variable should already be set - as a test you may bind it to some display widget and see if it shows properly at runtime.

PaiChung
22-Sapphire I
(To:egolindano)

Please be aware that Setting a session value Server side doesn't show on the client side unless you 'refresh' the mashup.

from your scenario it sounds like it should work properly, but to make sure you always have the most recent values, you can use GetGlobalSessionValues in the mashup.

Something that I do, 1 service that fires and modifies the Session, but then on service invoke completes it retrieves the value from the session client side using the GetGlobalSessionValues and I bind from that service.

This type of scenario prevents the usage of client side Session Value changed event though.

At the end I settled the parameters on client side and It worked properly. Thank You all for your time.

I think this is a better way to explain my current scenario.

1) Mashup1 -> Service1 (Create the session parameter) -

2) Navigate to Mashup2

3) Call Service2 (Once the mashup is loaded I call a service and get the session parameter, but outdated)

4) Refresh the page.

5) repeat step 3 but now here i get the updated parameter.

Hello Eddison,

The solution to your problem is synchronization.

For achieving this, you need to call the service before the redirect event  and set  the value returned by the service in the session parameter and and then link the redirect event (say 'navigate') with the "ServiceInvokeCompleted" event of that service(which is given for each service you register with a mashup).By this before you navigate to the new mashup you would always recieve the update session parameter value.

Steps:-

1. On select option event, call the service to retrieve the updated value. Set it in the session parameter.

2. Link the "ServiceInvokeCompleted" of the service in step 1 to the navigation to other mashup.

3. In the new mashup use the session parameter which will have updated value.

Announcements


Top Tags