populate dropdown with data form database service

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

populate dropdown with data form database service

Guannan
Hi,
I'm new to orbeon and trying to create my first test form.
I was trying to populate a dynamic dropdown with date from database services.
From the orbeon log, I can see I got my data successfully and I follow the example but the dropdown still empty. Can some body help me? Thank you!
orbeon log:

action setting:


Do I need to set anything in the dropdown?
Thank you.
Jez
Reply | Threaded
Open this post in threaded view
|

Re: populate dropdown with data form database service

Jez
Hi Guannan

When you say you are trying to populate a dynamic dropdown - do you mean that you are using the Form Builder Dynamic Data Dropdown (databound-select1) control? If so, that has its own resource setting to dynamically populate the items. Try with a Dropdown Menu (select1) control instead, with your service populating the items on form load.
Reply | Threaded
Open this post in threaded view
|

Re: populate dropdown with data form database service

Guannan
Thank you! Yes I was trying to use a dynamic data dropdown. The setting is like this:

What should I put in the resource url box? I tried leave is empty, doesn't work, or put the database service name, got some exception...
Thank you
Jez
Reply | Threaded
Open this post in threaded view
|

Re: populate dropdown with data form database service

Jez
Hi Guannan

Dynamic Data Dropdown controls are for real-time retrieval of the items from the Resource URL specified in the Control Details.

It looks like in your situation you have constructed a Web Service request (load-customer) which is submitted by the Action (load-customer-action) to populate the menu items at Form Load. In that situation you need to use the standard Form Builder Dropdown Menu control.

Create a new Dropdown Menu control and give it a label. It should now show up as an option in your load-customer-action Action settings for Destination Selection Control. Select the new control and save the Action.

Hope that helps.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: populate dropdown with data form database service

Guannan
It works now!
Thank you very much for your help!