Don't work - value of control in HTTP Services - Resource URL

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

Don't work - value of control in HTTP Services - Resource URL

AlexFet
Hi. Sorry for my bad english.

I have a form with two select box. I need to - when I select a value in the first, get the value in the second according to the selected value in the first. Data downloaded from RESTful web services. So I need to add URL to selected value from the first select box.

I "learned" google, this mailing list. Read http://orbeon-forms-ops-users.24843.n4.nabble.com/Orbeon-XForms-Submission-Struts-2-Webservice-Http-call-with-query-parameters-td4352336.html and http://orbeon-forms-ops-users.24843.n4.nabble.com/Passing-parameters-in-RestFul-web-service-url-of-an-xforms-submission-td1678112.html.

The result was as follows (this sample from Orbeon 4 M7 PE, similar was created in Orbeon 3.9.1 PE with the same result):

...
        <xforms:model id="fr-form-model">
            <xforms:instance id="fr-form-instance">
                <form>
                    <section-3>
                        <control-2/>
                        <control-3/>
                        <control-4/>
                        <control-5/>
                        <control-6/>
                        <control-7/>
                        <control-9/>
                        <control-8/>
                        <control-10/>
                        <control-11/>
                        <control-12/>
                        <control-13/>
                        <control-14/>
                        <control-15/>
                        <control-16/>
                        <control-17/>
                        <grid-18>
                            <OrgTitle/>                         
                            <EquipmentTitle/>               
                            <PlanStart/>
                            <PlanFinish/>
                            <FactStart/>
                            <FactFinish/>
                            <ReasonDescription/>
                        </grid-18>
                    </section-3>
                </form>
            </xforms:instance>
...
<xforms:submission xmlns:formRunner="java:org.orbeon.oxf.fr.FormRunner"
                               xmlns:xh="http://www.w3.org/1999/xhtml"
                               xmlns:controlOps="java:org.orbeon.oxf.fb.ControlOps"
                               xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
                               xmlns:xpl="java:org.orbeon.oxf.pipeline.api.FunctionLibrary"
                               xmlns:xformsUtils="java:org.orbeon.oxf.xforms.XFormsUtils"
                               xmlns:xf="http://www.w3.org/2002/xforms"
                               id="NSI.GetEquipmentList-submission"
                               class="fr-service"
                               ref="instance('fr-service-request-instance')"
                               <b>resource="http://mss-holding.ru/techi2/rs/mdm/children/kind/equipment/parent/{xxforms:instance('fr-form-instance')/section-3/grid-18/OrgTitle}"
                               method="get"
                               serialization="application/xml"
                               mediatype="application/xml"
                               replace="instance"
                               instance="fr-service-response-instance"
                               xxforms:username=""
                               xxforms:password=""/>
...

And this not working.

What's wrong?

In orbeon log file (all debug is on) log file has no errors.

When I'm try with static URL all work fine - when select value in first select box, second select box successfully initialise from web service.

Reply | Threaded
Open this post in threaded view
|

Re: Don't work - value of control in HTTP Services - Resource URL

AlexFet
This post was updated on .
The necessary clarification.

The form contains a grid with repeater:

            <xforms:instance xxforms:readonly="true" id="grid-18-template">
                <grid-18>
                    <OrgTitle/>              <-- DropDown Menu 1
                    <EquipmentTitle/>    <-- DropDown Menu 2
                    <PlanStart/>
                    <PlanFinish/>
                    <FactStart/>
                    <FactFinish/>
                    <ReasonDescription/>
                </grid-18>
            </xforms:instance>
                                ...
                                <fr:grid min="1" repeat="true" id="grid-18-grid" bind="grid-18-bind"
                             origin="instance('grid-18-template')">
                                ...                            
                                </fr:grid>

Both select box (dropdown menu) are elements in the cells of the grid.

I need to, after selecting a value in the first select box to receive this value. Use this value as a parameter in RESTfull request, a list of values from result use for the second select box.

I can set up a logic to the usual grid. But in the grid with repeater does not work. Starting from the second line refers to the first repeater select box is no longer valid.

Can anyone help me and explain how such a logic can be configured in a grid with repeater?