I'm trying to merge two jquery mobile examples such that I get a listview for a text input using a remote data source.
The first example demonstrates how to use a predefined data set with a listview to fill a text input (when the required item is selected)
http://jsbin.com/upirol/11/edit
The second example (when you view source) demonstrates how to use a remote datasource with listview.
http://api.jquerymobile.com/resources/listview/example16.html
Ideally the remote data would return a label and value for this list i.e. the label is displayed on the list dropdown and the value is placed in the text box when selected.
I have put together my attempt at merging these two examples however it doesn't seem to be working as I would expect - i.e. like the first link but with remote data. The example is available at http://jsbin.com/InucEvU/1/edit?html,output . As you can see the bottom listview autofill works and fills the text input. However the top one does not - despite the relevant variables being changed. Further, I'm not quite sure how to roll in the label/value as one is able to do with jquery ui autocomplete. Any ideas on how I can accomplish these two objectives?