Don
Posts: 0
Joined: Sun Feb 17, 2013 4:09 pm

Possible to group a select menu (via REST)?

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

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

Possible to group a select menu (via REST)?

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.

Don
Posts: 0
Joined: Sun Feb 17, 2013 4:09 pm

Possible to group a select menu (via REST)?

Thanks Max, I will check that out.

Don
Posts: 0
Joined: Sun Feb 17, 2013 4:09 pm

Possible to group a select menu (via REST)?

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

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

Possible to group a select menu (via REST)?

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

Return to “Issues”