Page 1 of 1

Possible to group a select menu (via REST)?

Posted: Sun Feb 17, 2013 10:00 pm
by Don

I have a select menu that retrieves its list from REST.

Is it possible to group the response like in the below image?

Image

The webservice returns data like:

precode
<DESTINATION><CODE>60<&#47;CODE><REGION>Bermuda<&#47;REGION><NAME>Bermuda<&#47;NAME><&#47;DESTINATION>
<DESTINATION><CODE>70<&#47;CODE><REGION>Costa Rica<&#47;REGION><NAME>Liberia<&#47;NAME><&#47;DESTINATION>
<DESTINATION><CODE>64<&#47;CODE><REGION>Costa Rica<&#47;REGION><NAME>Puntarenas<&#47;NAME><&#47;DESTINATION>
<DESTINATION><CODE>92<&#47;CODE><REGION>Cuba<&#47;REGION><NAME>Cayo Coco<&#47;NAME><&#47;DESTINATION>
<DESTINATION><CODE>6<&#47;CODE><REGION>Cuba<&#47;REGION><NAME>Holguin<&#47;NAME><&#47;DESTINATION>
/code/pre


Possible to group a select menu (via REST)?

Posted: Mon Feb 18, 2013 12:07 am
by maxkatz

See "Optgroups" section: http://jquerymobile.com/demos/1.2.0/d.... Looks like jQuery Mobile does have basic support for it. You could try to create it via JavaScript. There is no such option in Properties yet in the builder.


Possible to group a select menu (via REST)?

Posted: Mon Feb 18, 2013 12:14 am
by Don

Thanks Max, I will check that out.


Possible to group a select menu (via REST)?

Posted: Mon Feb 18, 2013 12:23 am
by Don

Where can I find doc on how to retrieve the REST variables within Javascript, so I can build the menu?


Possible to group a select menu (via REST)?

Posted: Mon Feb 18, 2013 12:29 am
by maxkatz

Use Success event to get the data returned by the service: http://docs.tiggzi.com/documentation/...