Jon Crump
Posts: 0
Joined: Tue Dec 11, 2012 8:34 pm

Binding rest response to a select?

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Binding rest response to a select?

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".

Jon Crump
Posts: 0
Joined: Tue Dec 11, 2012 8:34 pm

Binding rest response to a select?

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?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Binding rest response to a select?

Known bug.. going to be fixed next week.

Jon Crump
Posts: 0
Joined: Tue Dec 11, 2012 8:34 pm

Binding rest response to a select?

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?

Return to “Issues”