Dynamic Data Dropdown selection control won't show the content from http service

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

Dynamic Data Dropdown selection control won't show the content from http service

shineway
This post was updated on .
Hi there,

I'm using two Dynamic Data Dropdown selection controls in form builder(orbeon-4.0.0.M11.201210030639-PE) to create a new form. Both of the two controls get the content from a same http service, one using "Resource URL"  as pic1 shows:

and for the other dropdown control to show the content, I added an HTTP service pointing to the same Resource URL as pic2 shows, and an Action as pic3 shows (action Condition: Run on creation only, React to: Form Load):

But the result for the two controls are different:

selection control using "Resource URL" can show the content from the XML returned by the http service, while the other selection control using action can't show the content.

test.xml is just this:

<items>
    <item>
        <label>Cat</label>
        <value>cat</value>
    </item>
    <item>
        <label>Dog</label>
        <value>dog</value>
    </item>
    <item>
        <label>Bird</label>
        <value>bird</value>
    </item>
</items>

I also attach the form source.  Any pointers or help would be really appreciated.

Thanks in advance,

Shineway

t2.xhtml
test.xml

pic1

pic2

pic3
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Data Dropdown selection control won't show the content from http service

Alessandro  Vernet
Administrator
Hi Shineway,

If you want to set the itemset for a dropdown with an action, you need to use a plain dropdown; you can't a dynamic data dropdown. In your case, you can use either an action + plain dropdown, or a dynamic data dropdown. (I'd personally go with the dynamic data dropdown since it is simpler to use in that case.)

This is the source of the updated form with this change: form.xhtml (I am also using a publicly accessible URL on Dropbox to retrieve the XML file).

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet