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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Bug ? Session parameter lost after calling the service to renew the Collection widget.

seanccc
17-Peridot

Bug ? Session parameter lost after calling the service to renew the Collection widget.

Hi ,

I thought the session parameter remains until the web page get refreshed. 

However,  I found the values are lost after calling a service which bind to  a Collection widget .   Is it correct ? 

 

Please try the attached Entities.xml to reproduce the problem: 

1.   run mashup TestSessionParameterContainer  

2.   press F12 to monitor the Chrome's console log

3.   click any of the check box.  It will update session parameter and the expression which subscribe the session parameter will call the backend service to renew the list of the Collection. 

4.   you'll see the log like below: 

 

CanUpdateSessionParameter: [true]
VM37957:16 Checkbox was clicked, set session parameter from [undefined], to:[{"Station_169.32965781565557":1,"UpdatedStation":"Station_169.32965781565557"}]
VM37958:3 call RefreshCheckBoxList. Session parameter now is: [{"Station_169.32965781565557":1,"UpdatedStation":"Station_169.32965781565557"}], invoke GetCheckBoxList service:[true]
VM37959:2 Invoke GetCheckBoxList finished. session paramter now is:[{"Station_169.32965781565557":1,"UpdatedStation":"Station_169.32965781565557"}]
VM37960:3 call RefreshCheckBoxList. Session parameter now is: [undefined], invoke GetCheckBoxList service:[false]
6VM37961:3 call RefreshCheckBoxList. Session parameter now is: [undefined], invoke GetCheckBoxList service:[false]

Please notice the last two logs, you can find that the session parameter become undefined after invoking GetCheckBoxList. 

 

If I have to use SetGlobalSessionStringValue as following for such a case , does it means the session parameter is just mashup level instead of web page level ?  if so, it violates common sense for Session somehow. 

Resources["CurrentSessionInfo"].SetGlobalSessionStringValue({name: "your_session_var", value: input_str});

 

Regards,

Sean

0 REPLIES 0
Top Tags