Page 2 of 4

how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 8:18 am
by Maryna Brodina

Hello!
On page assign_load:
1) delete get_driver_names service call from get_driver_names - Complete event
2) delete get_driver_names service call from driver_list1 - Value change event
3) add get_driver_names service call on assign_load - Page show event
4) you have incorrect parameters in service getDriverNames (for service getDriverNames in Test tab click Test button, after service response created successfully, click "Automatically Create Service Response"
5) on page assign_load you would need to add mapping from:

$ to mobileselectmenuitem_13
from id to mobileselectmenuitem_13.value
from driver_name to mobileselectmenuitem_13.Label
to
get_driver_names.


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 4:25 pm
by John Herdean

ok, but #3 I cant seem to find exactly what your telling me. You need to be more specific. 1st, do i need to be inside the Design tab or the Data tab? Then I cannot find any event called "show event" in either tab. I need to know which is my component im selecting, then the name of the event, then the action. You were not detailed enough on this. This is the 1st time im populating e select menu so i need to know step by step.

the rest was pretty straight forward. Even the mapping was easy enough.

Thanks for your time.


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 5:14 pm
by John Herdean

Can I please get some more details (as i explained above) for #3?


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 5:46 pm
by maxkatz

#3 simply talks about adding a service invocation on page show event.


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 5:53 pm
by John Herdean

ok, but like i said before, can you please be more specific? Is it in Design Tab or Data Tab? What should be my component, the name of the event i should select, and what is the action i should select? I'm totally lost here and needs exact details???


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 6:27 pm
by maxkatz

how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 6:29 pm
by Kateryna Grynko

Hi John,

In Design mode open Events panel, then choose the page, "Page Show" event and invoke the service "get_driver_names"...


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 7:28 pm
by John Herdean

ok i got it... Thanks..

I tested it and its starting to work. In my test Im returning a list, not just one record. And in the live test - its only showing the 1st record. Is there anything else i need to do to make all my records populate?


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 7:31 pm
by Kateryna Grynko

Do you mean select menu doesn't contain options (list items)?


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 7:31 pm
by John Herdean

i already checked off the items as an array in the list of parameters.. I dont know what else to do to populate the full list coming from json... Please tell me what else i need to do??