GregJohnson
Posts: 0
Joined: Sun Feb 05, 2012 9:39 pm

populating select list from REST result

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

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

populating select list from REST result

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.

GregJohnson
Posts: 0
Joined: Sun Feb 05, 2012 9:39 pm

populating select list from REST result

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.

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

populating select list from REST result

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

adi
Posts: 0
Joined: Tue Jun 26, 2012 8:09 pm

populating select list from REST result

HI Max, did you manage to implement this feature

adi
Posts: 0
Joined: Tue Jun 26, 2012 8:09 pm

populating select list from REST result

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)

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

populating select list from REST result

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?

adi
Posts: 0
Joined: Tue Jun 26, 2012 8:09 pm

populating select list from REST result

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

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

populating select list from REST result

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

Return to “Issues”