Page 1 of 2

populating select list from REST result

Posted: Sun Feb 05, 2012 10:00 pm
by GregJohnson

Is there an easy way to populate a select list from the result of a rest call?


populating select list from REST result

Posted: Sun Feb 05, 2012 10:26 pm
by maxkatz

We are working on this exact feature. The select list will work as input for a service. There is of course the option to get the values and create the list in JavaScript. You can use grid, collapsible block and list (jQuery one) to display a list of values.


populating select list from REST result

Posted: Sun Feb 05, 2012 10:34 pm
by GregJohnson

ok, making my first "learning project" a interface for Redmine which we use at work. Figured that would be a good to learn both simple and advanced coding for mobiles using HTML5. Defiantly like your system. I spent a good time surfing both application and services for something that would build them visually but also give more backend power like accessing REST services etc as well as using jQuery which I already use at work and know.


populating select list from REST result

Posted: Mon Feb 06, 2012 2:26 am
by maxkatz

Sounds great, let us know if we can help with anything.


populating select list from REST result

Posted: Tue Jul 17, 2012 1:49 pm
by adi

HI Max, did you manage to implement this feature


populating select list from REST result

Posted: Tue Jul 17, 2012 3:47 pm
by maxkatz

populating select list from REST result

Posted: Tue Jul 17, 2012 11:35 pm
by adi

i think there might be a defect in the implementation of select list.
I've tried as described in the documentation link but getting this error message:
c[0] is undefined

if (c[0].tagName == "A" && c.parents().eq(3).is("[data-role='listview']")) {

its in tiggzi.js (line 1085)


populating select list from REST result

Posted: Wed Jul 18, 2012 3:25 am
by maxkatz

I tested, it seems to work. You just need to have one value in the list preset (it won't be shown in the actual page). Can you post a screen shot of your mapping?


populating select list from REST result

Posted: Wed Jul 18, 2012 6:46 am
by adi

ok, after entering just a dummy value in the select list it works. i would still call it a defect Max, there is no meaning\logic to have this dummy value there. the select list gets populated from the REST class. think about it.

thanks
Adi


populating select list from REST result

Posted: Wed Jul 18, 2012 1:34 pm
by maxkatz

Yes, it should work when empty as well. We'll fix it.