Page 1 of 1

Binding rest response to a select?

Posted: Mon Jan 14, 2013 2:59 pm
by Jon Crump

I have a rest response (a list of projects) and would like to bind them simply to a select.

The projects have a name and an id field.

It doesn't seem possible to bind them using the UI. I can bind the same data to a List object no problem, aside from there isn't a value property of the list item, so I can't store the id fields.

I'm sure there is an easy / obvious solution to this, I searched through the documentation and forum and haven't found one though.


Binding rest response to a select?

Posted: Mon Jan 14, 2013 3:19 pm
by Kateryna Grynko

Hi Jon,

Mobile Select Menu has a child item.
You have to create Response mapping from array to the child item.
Then create mapping from "name" and "id" to component properties "Label" and "Value".


Binding rest response to a select?

Posted: Mon Jan 14, 2013 6:28 pm
by Jon Crump

Hi Katya,
Thanks I got it working now, it seems like you can't map a response to two different objects on the same page. Once I removed the list object the select is now showing the data.

A related question is... now when I select an item it doesn't stay selected in the select object, is there some additional code I need to make that happen?


Binding rest response to a select?

Posted: Mon Jan 14, 2013 6:30 pm
by maxkatz

Known bug.. going to be fixed next week.


Binding rest response to a select?

Posted: Mon Jan 14, 2013 6:40 pm
by Jon Crump

I just tried checking the option "Native Menu" a property of the select and that seems to make it work like a regular select.
I checked the documentation and don't see any explanation for what a "Native Menu" is and when it should be used?


Binding rest response to a select?

Posted: Mon Jan 14, 2013 6:41 pm
by maxkatz