Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how to populate a selectmenu from a json list response?

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.

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to populate a selectmenu from a json list response?

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.

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to populate a selectmenu from a json list response?

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

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

how to populate a selectmenu from a json list response?

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

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to populate a selectmenu from a json list response?

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???

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to populate a selectmenu from a json list response?

Hi John,

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

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to populate a selectmenu from a json list response?

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to populate a selectmenu from a json list response?

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

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to populate a selectmenu from a json list response?

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??

Return to “Issues”