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

How can I bind the session variable to dropdown list?

SOLVED
bmarimuthu-2
Newbie

How can I bind the session variable to dropdown list?

How can I bind the session variable to dropdown list? Is it only a one way binding?

But in Text box, it works fine.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: How can I bind the session variable to dropdown list?

I have a dropdown list on the left here and the GetGlobalSessionValues from CurrentSessionInfo service bound to it:

Then i need to configure the list widget itself in the following fields:

View solution in original post

7 REPLIES 7

Re: How can I bind the session variable to dropdown list?

Create a getter service on a thing that reads the data stored in your session variable and returns an infotable.  Bind the All Data from your getter service to the dropdown list.

var result = Resources["CurrentSessionInfo"].GetGlobalSessionValues().<YourSessionVariable>;

Re: How can I bind the session variable to dropdown list?

How can I retain my entire mashup value( including selected values of dropdown list and "label" value) navigating from this mashup to another?

Re: How can I bind the session variable to dropdown list?

Hi, I tried using this var result = Resources["CurrentSessionInfo"].GetGlobalSessionValues().<YourSessionVariable>;

B​ut the value in the dropdown list remains same even after reloading.

But  my requirement is When I reload , the session value of dropdown list has  to be updated based on the selection.

Re: How can I bind the session variable to dropdown list?

You need to make sure your getter service is called when the mashup is loaded.  You also need to make sure you call your getter whenever any changes are made to push new data in to your session variable.  If you're passing the selected value to another mashup, you have the use the SelecteRows parameter from the getter service and bind that to a parameter that exists on the mashup that you're trying to navigate to.  I'm assuming you're using a Navigation widget, so when you configure that widget to use the other mashup, you should be able to drag/drop the "Selected Rows" attribute from the getter service directly to the Navigation widget and then select the property it should bind to.  This will make your selected value from the dropdown list available to some other widget in your other mashup.

Re: How can I bind the session variable to dropdown list?

But what all the values I select in dropdown , It is updating here var result = Resources["CurrentSessionInfo"].GetGlobalSessionValues().<YourSessionVariable>;

But I dont know how to bind the updating session value to my dropdown list.

Please anyone help me out of this!!

Re: How can I bind the session variable to dropdown list?

I have a dropdown list on the left here and the GetGlobalSessionValues from CurrentSessionInfo service bound to it:

Then i need to configure the list widget itself in the following fields:

View solution in original post

Re: How can I bind the session variable to dropdown list?

Hi Bavithraa Marimuthu​,

You can use Session variables to save the parameters and then retrieve it again. You simply need to bind the property from Selected Rows(s) of the service (which feeds the data to the Dropdown widget) with the session variable and then bind it again to selected text property of the Dropdown widget.

I hope it helps.

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.