AJAX calls

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

AJAX calls

Hemant Joshi

Hi,

   Can I make AJAX call in Orbeon form on a specific field without refreshing the complete form.

 

 

 

 

Hemant

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: AJAX calls

Alessandro  Vernet
Administrator
Hi Hemant,

What do you mean by "make an Ajax call"? What would you like that Ajax call to do? In general, with Orbeon Forms, you're not explicit writing JavaScript that makes JavaScript calls, but instead rely on the engine to figure when calls to the servers have to made in order to refresh the page.

Alex

On Mon, Jun 22, 2015 at 5:18 PM, Joshi, Hemant <[hidden email]> wrote:

Hi,

   Can I make AJAX call in Orbeon form on a specific field without refreshing the complete form.

 

 

 

 

Hemant

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: AJAX calls

Hemant Joshi

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

 

 

 

 

Hemant

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet
Sent: Tuesday, June 23, 2015 2:04 AM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

Hi Hemant,

 

What do you mean by "make an Ajax call"? What would you like that Ajax call to do? In general, with Orbeon Forms, you're not explicit writing JavaScript that makes JavaScript calls, but instead rely on the engine to figure when calls to the servers have to made in order to refresh the page.

 

Alex

 

On Mon, Jun 22, 2015 at 5:18 PM, Joshi, Hemant <[hidden email]> wrote:

Hi,

   Can I make AJAX call in Orbeon form on a specific field without refreshing the complete form.

 

 

 

 

Hemant

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: AJAX calls

Alessandro  Vernet
Administrator
Hi Hemant,

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

Alex

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

 

 

 

 

Hemant

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet
Sent: Tuesday, June 23, 2015 2:04 AM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

Hi Hemant,

 

What do you mean by "make an Ajax call"? What would you like that Ajax call to do? In general, with Orbeon Forms, you're not explicit writing JavaScript that makes JavaScript calls, but instead rely on the engine to figure when calls to the servers have to made in order to refresh the page.

 

Alex

 

On Mon, Jun 22, 2015 at 5:18 PM, Joshi, Hemant <[hidden email]> wrote:

Hi,

   Can I make AJAX call in Orbeon form on a specific field without refreshing the complete form.

 

 

 

 

Hemant

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
DL
Reply | Threaded
Open this post in threaded view
|

Re: AJAX calls

DL


On 24/06/15 00:51, Alessandro Vernet wrote:
Hi Hemant,

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

Alex

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

RE: AJAX calls

Hemant Joshi

Hi Alex,

   I am not writing the complete X-Form by hand. Instead, I am creating the form using the form builder tool and want to  edit the generated code to include external CSS/JS. If I am able to include external JS and trigger event using the JS. Can’t I use the same JS to write AJAX?

 

 

 

 

Hemant

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of dl
Sent: Thursday, June 25, 2015 11:44 AM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

 

On 24/06/15 00:51, Alessandro Vernet wrote:

Hi Hemant,

 

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

 

Alex

 

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: AJAX calls

Alessandro  Vernet
Administrator
Hi Hemant,

Sure, you can write JavaScript, just like in any other web page. But I'd recommend you first try to use the Services & Actions feature, this way you won't have to write JavaScript, the service will be called from the Orbeon Forms server, so you can keep it behind a firewall.

Alex

On Thu, Jun 25, 2015 at 11:26 AM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   I am not writing the complete X-Form by hand. Instead, I am creating the form using the form builder tool and want to  edit the generated code to include external CSS/JS. If I am able to include external JS and trigger event using the JS. Can’t I use the same JS to write AJAX?

 

 

 

 

Hemant

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of dl
Sent: Thursday, June 25, 2015 11:44 AM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

 

On 24/06/15 00:51, Alessandro Vernet wrote:

Hi Hemant,

 

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

 

Alex

 

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: AJAX calls

Alessandro  Vernet
Administrator
In reply to this post by DL
dl,

Yes, if you want to do testing, then I'd say Selenium is the way to go. This is also the way we're testing the forms created with Orbeon Forms.

Alex

On Thu, Jun 25, 2015 at 8:44 AM, dl <[hidden email]> wrote:


On 24/06/15 00:51, Alessandro Vernet wrote:
Hi Hemant,

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

Alex

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: AJAX calls

Hemant Joshi
Will Try that. Thank you Alex.


From: [hidden email] [[hidden email]] on behalf of Alessandro Vernet [[hidden email]]
Sent: Thursday, June 25, 2015 7:42 PM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

dl,

Yes, if you want to do testing, then I'd say Selenium is the way to go. This is also the way we're testing the forms created with Orbeon Forms.

Alex

On Thu, Jun 25, 2015 at 8:44 AM, dl <[hidden email]> wrote:


On 24/06/15 00:51, Alessandro Vernet wrote:
Hi Hemant,

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

Alex

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
DL
Reply | Threaded
Open this post in threaded view
|

Re: AJAX calls

DL
Further information on researching form testing scenarios:-

Sikuli Slides and its later fork SikuliX scripts can also simulate user form data input.

Sikuli Slides only needs a powerpoint slide (e.g. orbeontest.pptx) to target forms including new forms creation.
So no programming with JS etc. (or "AJAX calls") is required with Sikuli Slides.
And *.pptx slides can be shared through google slides.

But SikuliX offers a scripting IDE instead of using powerpoint slides.

Sikuli Slides and SikuliX scripts both use image recognition (openCV) instead of DOM navigation as in Selenium.

A useful Firefox add-on to capture and trim Orbeon form images is qSnap. 
But SikuliX IDE can also capture and trim target unique images such as elements of forms.

Just be aware that across different clients Orbeon target form images might vary (e.g. across different browsers, different platforms).
And styles/themes might change.   But you can vary the sensitivity of image matching with a variable.  And Sikuli(X) can conditionally search through multiple images for a best match.


http://slides.sikuli.org/

http://www.sikulix.com/

https://qsnapnet.com


If Selenium is preferred (DOM based) them there are some Selenium add-ons for Firefox.


DL

On 26/06/15 01:54, Joshi, Hemant wrote:
Will Try that. Thank you Alex.eate


From: [hidden email] [[hidden email]] on behalf of Alessandro Vernet [[hidden email]]
Sent: Thursday, June 25, 2015 7:42 PM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

dl,

Yes, if you want to do testing, then I'd say Selenium is the way to go. This is also the way we're testing the forms created with Orbeon Forms.

Alex

On Thu, Jun 25, 2015 at 8:44 AM, dl <[hidden email]> wrote:


On 24/06/15 00:51, Alessandro Vernet wrote:
Hi Hemant,

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

Alex

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL
--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

RE: AJAX calls

Hemant Joshi
In reply to this post by Alessandro Vernet

Hi Alex,

   I saw the Action and Services in Orbeon. However the scope of Actions is limited to only four actions (values change, Value change on load, Activation, form load). So I am trying to add my own Java script in my form. It’s a simple test form just for verification. I am able to Add JS internally as well as externally. However there are few issues I am facing:

 

1.       Initially I just added an Alert (not within any function) and did not call it. However it was automatically being called on load. Not sure why.

2.       Later I added the alert inside a function. Now it’s not working onload. I tried calling it onclick of a button. However it’s not working at all.

 

Could you please suggest what I am missing? I have given the code in my email below. Thanks.

 

<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"

         xmlns:xs="http://www.w3.org/2001/XMLSchema"

         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:ev="http://www.w3.org/2001/xml-events"

         xmlns:xi="http://www.w3.org/2001/XInclude"

         xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"

         xmlns:xxf="http://orbeon.org/oxf/xml/xforms"

         xmlns:exf="http://www.exforms.org/exf/1-0"

         xmlns:fr="http://orbeon.org/oxf/xml/form-runner"

         xmlns:saxon="http://saxon.sf.net/"

         xmlns:sql="http://orbeon.org/oxf/xml/sql"

         xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

         xmlns:fb="http://orbeon.org/oxf/xml/form-builder">

    <xh:head>

        <xh:title>Untitled Form</xh:title>

       

        <xh:script type="text/javascript">

        function Clickme(){ alert("Test Hemant"); 

        </xh:script>

       

        <xf:model id="fr-form-model" xxf:expose-xpath-types="true">

 

            <!-- Main instance -->

            <xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all">

                <form>

                    <section-1>

                        <control-1/>

                        <control-3/>

                        <control-5 onclick="Clickme()"/>

                    </section-1>

                </form>

            </xf:instance>

 

            <!-- Bindings -->

            <xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">

                <xf:bind id="section-1-bind" name="section-1" ref="section-1">

                    <xf:bind id="control-1-bind" name="control-1" ref="control-1"/>

                    <xf:bind id="control-3-bind" ref="control-3" name="control-3"/>

                    <xf:bind id="control-5-bind" ref="control-5" name="control-5" onclick="Clickme()"/>

                </xf:bind>

            </xf:bind>

 

            <!-- Metadata -->

            <xf:instance xxf:readonly="true" id="fr-form-metadata" xxf:exclude-result-prefixes="#all">

                <metadata>

                    <application-name>jstest</application-name>

                    <form-name>jstest</form-name>

                    <title xml:lang="en">Untitled Form</title>

                    <description xml:lang="en"/>

                    <singleton>false</singleton>

                </metadata>

            </xf:instance>

 

            <!-- Attachments -->

            <xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">

                <attachments>

                    <css mediatype="text/css" filename="" size=""/>

                    <pdf mediatype="application/pdf" filename="" size=""/>

                </attachments>

            </xf:instance>

 

            <!-- All form resources -->

            <!-- Don't make readonly by default in case a service modifies the resources -->

            <xf:instance id="fr-form-resources" xxf:readonly="false" xxf:exclude-result-prefixes="#all">

                <resources>

                    <resource xml:lang="en">

                        <section-1>

                            <label>Untitled Section</label>

                        </section-1>

                        <control-1>

                            <label>input</label>

                            <hint/>

                            <alert/>

                        </control-1>

                        <control-3>

                            <label>Testinput</label>

                            <hint/>

                        </control-3>

                        <control-5 onclick="Clickme()">

                            <label>TestButton</label>

                            <hint/>

                        </control-5>

                    </resource>

                </resources>

            </xf:instance>

 

            <!-- Utility instances for services -->

            <xf:instance id="fr-service-request-instance" xxf:exclude-result-prefixes="#all">

                <request/>

            </xf:instance>

 

            <xf:instance id="fr-service-response-instance" xxf:exclude-result-prefixes="#all">

                <response/>

            </xf:instance>

 

        </xf:model>

    </xh:head>

    <xh:body>

        <fr:view>

            <fr:body xmlns:oxf="http://www.orbeon.com/oxf/processors"

                     xmlns:p="http://www.orbeon.com/oxf/pipeline"

                     xmlns:xbl="http://www.w3.org/ns/xbl">

                <fr:section id="section-1-control" bind="section-1-bind">

                    <xf:label ref="$form-resources/section-1/label"/>

                    <fr:grid>

                        <xh:tr>

                            <xh:td>

                                <xf:input id="control-1-control" bind="control-1-bind">

                                    <xf:label ref="$form-resources/control-1/label"/>

                                    <xf:hint ref="$form-resources/control-1/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:input>

                            </xh:td>

                            <xh:td>

                                <xf:input id="control-3-control" bind="control-3-bind">

                                    <xf:label ref="$form-resources/control-3/label"/>

                                    <xf:hint ref="$form-resources/control-3/hint"/>

                       

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:input>

                            </xh:td>

                            <xh:td>

                                <xf:trigger id="control-5-control" bind="control-5-bind" onclick="Clickme()">

                                    <xf:label ref="$form-resources/control-5/label"/>

                   

                                    <xf:hint ref="$form-resources/control-5/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:trigger>

                            </xh:td>

                            <xh:td/>

                        </xh:tr>

                    </fr:grid>

                </fr:section>

            </fr:body>

        </fr:view>

    </xh:body>

</xh:html>

 

 

 

 

Hemant

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet
Sent: Thursday, June 25, 2015 7:41 PM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

Hi Hemant,

 

Sure, you can write JavaScript, just like in any other web page. But I'd recommend you first try to use the Services & Actions feature, this way you won't have to write JavaScript, the service will be called from the Orbeon Forms server, so you can keep it behind a firewall.

 

Alex

 

On Thu, Jun 25, 2015 at 11:26 AM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   I am not writing the complete X-Form by hand. Instead, I am creating the form using the form builder tool and want to  edit the generated code to include external CSS/JS. If I am able to include external JS and trigger event using the JS. Can’t I use the same JS to write AJAX?

 

 

 

 

Hemant

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of dl
Sent: Thursday, June 25, 2015 11:44 AM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

 

On 24/06/15 00:51, Alessandro Vernet wrote:

Hi Hemant,

 

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

 

Alex

 

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

RE: AJAX calls

Hemant Joshi
In reply to this post by Alessandro Vernet

PS: There was one curly closing bracket missing in previous email. However even after adding that, it’s not working.

 

        <xh:script type="text/javascript">

        function Clickme(){ alert("Test Hemant")

}; 

        </xh:script>

 

 

 

 

 

 

Hemant Joshi, PMP

AIG

Mobile +1 201 748 9680

 

[hidden email] | www.aig.com

 

 

IMPORTANT NOTICE:

The information in this email (and any attachments hereto) is confidential and may be protected by legal privileges and work product immunities. If you are not the intended recipient, you must not use or disseminate the information. Receipt by anyone other than the intended recipient is not a waiver of any attorney-client or work product privilege. If you have received this email in error, please immediately notify me by "Reply" command and permanently delete the original and any copies or printouts thereof. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by American International Group, Inc. or its subsidiaries or affiliates either jointly or severally, for any loss or damage arising in any way from its use.

 

From: Joshi, Hemant
Sent: Monday, June 29, 2015 1:00 PM
To: [hidden email]
Subject: RE: [orbeon] AJAX calls

 

Hi Alex,

   I saw the Action and Services in Orbeon. However the scope of Actions is limited to only four actions (values change, Value change on load, Activation, form load). So I am trying to add my own Java script in my form. It’s a simple test form just for verification. I am able to Add JS internally as well as externally. However there are few issues I am facing:

 

1.       Initially I just added an Alert (not within any function) and did not call it. However it was automatically being called on load. Not sure why.

2.       Later I added the alert inside a function. Now it’s not working onload. I tried calling it onclick of a button. However it’s not working at all.

 

Could you please suggest what I am missing? I have given the code in my email below. Thanks.

 

<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"

         xmlns:xs="http://www.w3.org/2001/XMLSchema"

         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:ev="http://www.w3.org/2001/xml-events"

         xmlns:xi="http://www.w3.org/2001/XInclude"

         xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"

         xmlns:xxf="http://orbeon.org/oxf/xml/xforms"

         xmlns:exf="http://www.exforms.org/exf/1-0"

         xmlns:fr="http://orbeon.org/oxf/xml/form-runner"

         xmlns:saxon="http://saxon.sf.net/"

         xmlns:sql="http://orbeon.org/oxf/xml/sql"

         xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

         xmlns:fb="http://orbeon.org/oxf/xml/form-builder">

    <xh:head>

        <xh:title>Untitled Form</xh:title>

       

        <xh:script type="text/javascript">

        function Clickme(){ alert("Test Hemant"); 

        </xh:script>

       

        <xf:model id="fr-form-model" xxf:expose-xpath-types="true">

 

            <!-- Main instance -->

            <xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all">

                <form>

                    <section-1>

                        <control-1/>

                        <control-3/>

                        <control-5 onclick="Clickme()"/>

                    </section-1>

                </form>

            </xf:instance>

 

            <!-- Bindings -->

            <xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">

                <xf:bind id="section-1-bind" name="section-1" ref="section-1">

                    <xf:bind id="control-1-bind" name="control-1" ref="control-1"/>

                    <xf:bind id="control-3-bind" ref="control-3" name="control-3"/>

                    <xf:bind id="control-5-bind" ref="control-5" name="control-5" onclick="Clickme()"/>

                </xf:bind>

            </xf:bind>

 

            <!-- Metadata -->

            <xf:instance xxf:readonly="true" id="fr-form-metadata" xxf:exclude-result-prefixes="#all">

                <metadata>

                    <application-name>jstest</application-name>

                    <form-name>jstest</form-name>

                    <title xml:lang="en">Untitled Form</title>

                    <description xml:lang="en"/>

                    <singleton>false</singleton>

                </metadata>

            </xf:instance>

 

            <!-- Attachments -->

            <xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">

                <attachments>

                    <css mediatype="text/css" filename="" size=""/>

                    <pdf mediatype="application/pdf" filename="" size=""/>

                </attachments>

            </xf:instance>

 

            <!-- All form resources -->

            <!-- Don't make readonly by default in case a service modifies the resources -->

            <xf:instance id="fr-form-resources" xxf:readonly="false" xxf:exclude-result-prefixes="#all">

                <resources>

                    <resource xml:lang="en">

                        <section-1>

                            <label>Untitled Section</label>

                        </section-1>

                        <control-1>

                            <label>input</label>

                            <hint/>

                            <alert/>

                        </control-1>

                        <control-3>

                            <label>Testinput</label>

                            <hint/>

                        </control-3>

                        <control-5 onclick="Clickme()">

                            <label>TestButton</label>

                            <hint/>

                        </control-5>

                    </resource>

                </resources>

            </xf:instance>

 

            <!-- Utility instances for services -->

            <xf:instance id="fr-service-request-instance" xxf:exclude-result-prefixes="#all">

                <request/>

            </xf:instance>

 

            <xf:instance id="fr-service-response-instance" xxf:exclude-result-prefixes="#all">

                <response/>

            </xf:instance>

 

        </xf:model>

    </xh:head>

    <xh:body>

        <fr:view>

            <fr:body xmlns:oxf="http://www.orbeon.com/oxf/processors"

                     xmlns:p="http://www.orbeon.com/oxf/pipeline"

                     xmlns:xbl="http://www.w3.org/ns/xbl">

                <fr:section id="section-1-control" bind="section-1-bind">

                    <xf:label ref="$form-resources/section-1/label"/>

                    <fr:grid>

                        <xh:tr>

                            <xh:td>

                                <xf:input id="control-1-control" bind="control-1-bind">

                                    <xf:label ref="$form-resources/control-1/label"/>

                                    <xf:hint ref="$form-resources/control-1/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:input>

                            </xh:td>

                            <xh:td>

                                <xf:input id="control-3-control" bind="control-3-bind">

                                    <xf:label ref="$form-resources/control-3/label"/>

                                    <xf:hint ref="$form-resources/control-3/hint"/>

                       

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:input>

                            </xh:td>

                            <xh:td>

                                <xf:trigger id="control-5-control" bind="control-5-bind" onclick="Clickme()">

                                    <xf:label ref="$form-resources/control-5/label"/>

                   

                                    <xf:hint ref="$form-resources/control-5/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:trigger>

                            </xh:td>

                            <xh:td/>

                        </xh:tr>

                    </fr:grid>

                </fr:section>

            </fr:body>

        </fr:view>

    </xh:body>

</xh:html>

 

 

 

 

Hemant

 

From: [hidden email] [[hidden email]] On Behalf Of Alessandro Vernet
Sent: Thursday, June 25, 2015 7:41 PM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

Hi Hemant,

 

Sure, you can write JavaScript, just like in any other web page. But I'd recommend you first try to use the Services & Actions feature, this way you won't have to write JavaScript, the service will be called from the Orbeon Forms server, so you can keep it behind a firewall.

 

Alex

 

On Thu, Jun 25, 2015 at 11:26 AM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   I am not writing the complete X-Form by hand. Instead, I am creating the form using the form builder tool and want to  edit the generated code to include external CSS/JS. If I am able to include external JS and trigger event using the JS. Can’t I use the same JS to write AJAX?

 

 

 

 

Hemant

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of dl
Sent: Thursday, June 25, 2015 11:44 AM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

 

On 24/06/15 00:51, Alessandro Vernet wrote:

Hi Hemant,

 

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

 

Alex

 

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: AJAX calls

Alessandro  Vernet
Administrator
Hi Hemant,

You can't add an onclick on an <xf:trigger>, and it is better to keep your code separate and not to change what Form Builder produced. The easiest is to add, in Form Builder's Control Settings dialog a custom class on the control, say "my-trigger". Then, you can have JavaScript that does:

ORBEON.jQuery('.my-trigger button').on('click', function() { alert('Clicked!'); })

If you're using a version of Orbeon Forms before 4.9, you can just refer to jQuery with $ instead of ORBEON.jQuery; more on this on:


Alex

On Mon, Jun 29, 2015 at 10:52 AM, Joshi, Hemant <[hidden email]> wrote:

PS: There was one curly closing bracket missing in previous email. However even after adding that, it’s not working.

 

        <xh:script type="text/javascript">

        function Clickme(){ alert("Test Hemant")

}; 

        </xh:script>

 

 

 

 

 

 

Hemant Joshi, PMP

AIG

Mobile <a href="tel:%2B1%20201%20748%209680" value="+12017489680" target="_blank">+1 201 748 9680

 

[hidden email] | www.aig.com

 

 

IMPORTANT NOTICE:

The information in this email (and any attachments hereto) is confidential and may be protected by legal privileges and work product immunities. If you are not the intended recipient, you must not use or disseminate the information. Receipt by anyone other than the intended recipient is not a waiver of any attorney-client or work product privilege. If you have received this email in error, please immediately notify me by "Reply" command and permanently delete the original and any copies or printouts thereof. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by American International Group, Inc. or its subsidiaries or affiliates either jointly or severally, for any loss or damage arising in any way from its use.

 

From: Joshi, Hemant
Sent: Monday, June 29, 2015 1:00 PM
To: [hidden email]
Subject: RE: [orbeon] AJAX calls

 

Hi Alex,

   I saw the Action and Services in Orbeon. However the scope of Actions is limited to only four actions (values change, Value change on load, Activation, form load). So I am trying to add my own Java script in my form. It’s a simple test form just for verification. I am able to Add JS internally as well as externally. However there are few issues I am facing:

 

1.       Initially I just added an Alert (not within any function) and did not call it. However it was automatically being called on load. Not sure why.

2.       Later I added the alert inside a function. Now it’s not working onload. I tried calling it onclick of a button. However it’s not working at all.

 

Could you please suggest what I am missing? I have given the code in my email below. Thanks.

 

<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"

         xmlns:xs="http://www.w3.org/2001/XMLSchema"

         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:ev="http://www.w3.org/2001/xml-events"

         xmlns:xi="http://www.w3.org/2001/XInclude"

         xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"

         xmlns:xxf="http://orbeon.org/oxf/xml/xforms"

         xmlns:exf="http://www.exforms.org/exf/1-0"

         xmlns:fr="http://orbeon.org/oxf/xml/form-runner"

         xmlns:saxon="http://saxon.sf.net/"

         xmlns:sql="http://orbeon.org/oxf/xml/sql"

         xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

         xmlns:fb="http://orbeon.org/oxf/xml/form-builder">

    <xh:head>

        <xh:title>Untitled Form</xh:title>

       

        <xh:script type="text/javascript">

        function Clickme(){ alert("Test Hemant"); 

        </xh:script>

       

        <xf:model id="fr-form-model" xxf:expose-xpath-types="true">

 

            <!-- Main instance -->

            <xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all">

                <form>

                    <section-1>

                        <control-1/>

                        <control-3/>

                        <control-5 onclick="Clickme()"/>

                    </section-1>

                </form>

            </xf:instance>

 

            <!-- Bindings -->

            <xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">

                <xf:bind id="section-1-bind" name="section-1" ref="section-1">

                    <xf:bind id="control-1-bind" name="control-1" ref="control-1"/>

                    <xf:bind id="control-3-bind" ref="control-3" name="control-3"/>

                    <xf:bind id="control-5-bind" ref="control-5" name="control-5" onclick="Clickme()"/>

                </xf:bind>

            </xf:bind>

 

            <!-- Metadata -->

            <xf:instance xxf:readonly="true" id="fr-form-metadata" xxf:exclude-result-prefixes="#all">

                <metadata>

                    <application-name>jstest</application-name>

                    <form-name>jstest</form-name>

                    <title xml:lang="en">Untitled Form</title>

                    <description xml:lang="en"/>

                    <singleton>false</singleton>

                </metadata>

            </xf:instance>

 

            <!-- Attachments -->

            <xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">

                <attachments>

                    <css mediatype="text/css" filename="" size=""/>

                    <pdf mediatype="application/pdf" filename="" size=""/>

                </attachments>

            </xf:instance>

 

            <!-- All form resources -->

            <!-- Don't make readonly by default in case a service modifies the resources -->

            <xf:instance id="fr-form-resources" xxf:readonly="false" xxf:exclude-result-prefixes="#all">

                <resources>

                    <resource xml:lang="en">

                        <section-1>

                            <label>Untitled Section</label>

                        </section-1>

                        <control-1>

                            <label>input</label>

                            <hint/>

                            <alert/>

                        </control-1>

                        <control-3>

                            <label>Testinput</label>

                            <hint/>

                        </control-3>

                        <control-5 onclick="Clickme()">

                            <label>TestButton</label>

                            <hint/>

                        </control-5>

                    </resource>

                </resources>

            </xf:instance>

 

            <!-- Utility instances for services -->

            <xf:instance id="fr-service-request-instance" xxf:exclude-result-prefixes="#all">

                <request/>

            </xf:instance>

 

            <xf:instance id="fr-service-response-instance" xxf:exclude-result-prefixes="#all">

                <response/>

            </xf:instance>

 

        </xf:model>

    </xh:head>

    <xh:body>

        <fr:view>

            <fr:body xmlns:oxf="http://www.orbeon.com/oxf/processors"

                     xmlns:p="http://www.orbeon.com/oxf/pipeline"

                     xmlns:xbl="http://www.w3.org/ns/xbl">

                <fr:section id="section-1-control" bind="section-1-bind">

                    <xf:label ref="$form-resources/section-1/label"/>

                    <fr:grid>

                        <xh:tr>

                            <xh:td>

                                <xf:input id="control-1-control" bind="control-1-bind">

                                    <xf:label ref="$form-resources/control-1/label"/>

                                    <xf:hint ref="$form-resources/control-1/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:input>

                            </xh:td>

                            <xh:td>

                                <xf:input id="control-3-control" bind="control-3-bind">

                                    <xf:label ref="$form-resources/control-3/label"/>

                                    <xf:hint ref="$form-resources/control-3/hint"/>

                       

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:input>

                            </xh:td>

                            <xh:td>

                                <xf:trigger id="control-5-control" bind="control-5-bind" onclick="Clickme()">

                                    <xf:label ref="$form-resources/control-5/label"/>

                   

                                    <xf:hint ref="$form-resources/control-5/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:trigger>

                            </xh:td>

                            <xh:td/>

                        </xh:tr>

                    </fr:grid>

                </fr:section>

            </fr:body>

        </fr:view>

    </xh:body>

</xh:html>

 

 

 

 

Hemant

 

From: [hidden email] [[hidden email]] On Behalf Of Alessandro Vernet
Sent: Thursday, June 25, 2015 7:41 PM


To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

Hi Hemant,

 

Sure, you can write JavaScript, just like in any other web page. But I'd recommend you first try to use the Services & Actions feature, this way you won't have to write JavaScript, the service will be called from the Orbeon Forms server, so you can keep it behind a firewall.

 

Alex

 

On Thu, Jun 25, 2015 at 11:26 AM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   I am not writing the complete X-Form by hand. Instead, I am creating the form using the form builder tool and want to  edit the generated code to include external CSS/JS. If I am able to include external JS and trigger event using the JS. Can’t I use the same JS to write AJAX?

 

 

 

 

Hemant

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of dl
Sent: Thursday, June 25, 2015 11:44 AM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

 

On 24/06/15 00:51, Alessandro Vernet wrote:

Hi Hemant,

 

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

 

Alex

 

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: AJAX calls

Hemant Joshi
Thanks Alex. I am able to do that now with jquery. 

Apart from that, in the following documentation, I saw the below code for client side JS. Could you please help how this can be done in form?

http://wiki.orbeon.com/forms/doc/developer-guide/xforms-actions/actions-script-actionhttp://wiki.orbeon.com/forms/doc/developer-guide/xforms-actions/actions-script-action



<xforms:action ev:event="xforms-value-changed">
    <xforms:setvalue ref=".">test</xforms:setvalue>
    <xxforms:script>var v = 2; myValueChanged(v);</xxforms:script>
</xforms:action>


<xforms:action ev:event="xforms-value-changed">
    <xforms:setvalue ref=".">test</xforms:setvalue>
    <xforms:action type="javascript">var v = 2; myValueChanged(v);</xxforms:script>
</xforms:action>




From: [hidden email] [[hidden email]] on behalf of Alessandro Vernet [[hidden email]]
Sent: Monday, June 29, 2015 5:53 PM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

Hi Hemant,

You can't add an onclick on an <xf:trigger>, and it is better to keep your code separate and not to change what Form Builder produced. The easiest is to add, in Form Builder's Control Settings dialog a custom class on the control, say "my-trigger". Then, you can have JavaScript that does:

ORBEON.jQuery('.my-trigger button').on('click', function() { alert('Clicked!'); })

If you're using a version of Orbeon Forms before 4.9, you can just refer to jQuery with $ instead of ORBEON.jQuery; more on this on:


Alex

On Mon, Jun 29, 2015 at 10:52 AM, Joshi, Hemant <[hidden email]> wrote:

PS: There was one curly closing bracket missing in previous email. However even after adding that, it’s not working.

 

        <xh:script type="text/javascript">

        function Clickme(){ alert("Test Hemant")

}; 

        </xh:script>

 

 

 

 

 

 

Hemant Joshi, PMP

AIG

Mobile <a href="tel:%2B1%20201%20748%209680" value="&#43;12017489680" target="_blank">+1 201 748 9680 

 

[hidden email] | www.aig.com

 

 

IMPORTANT NOTICE:

The information in this email (and any attachments hereto) is confidential and may be protected by legal privileges and work product immunities. If you are not the intended recipient, you must not use or disseminate the information. Receipt by anyone other than the intended recipient is not a waiver of any attorney-client or work product privilege. If you have received this email in error, please immediately notify me by "Reply" command and permanently delete the original and any copies or printouts thereof. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by American International Group, Inc. or its subsidiaries or affiliates either jointly or severally, for any loss or damage arising in any way from its use.

 

From: Joshi, Hemant
Sent: Monday, June 29, 2015 1:00 PM
To: [hidden email]
Subject: RE: [orbeon] AJAX calls

 

Hi Alex,

   I saw the Action and Services in Orbeon. However the scope of Actions is limited to only four actions (values change, Value change on load, Activation, form load). So I am trying to add my own Java script in my form. It’s a simple test form just for verification. I am able to Add JS internally as well as externally. However there are few issues I am facing:

 

1.       Initially I just added an Alert (not within any function) and did not call it. However it was automatically being called on load. Not sure why.

2.       Later I added the alert inside a function. Now it’s not working onload. I tried calling it onclick of a button. However it’s not working at all.

 

Could you please suggest what I am missing? I have given the code in my email below. Thanks.

 

<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"

         xmlns:xs="http://www.w3.org/2001/XMLSchema"

         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:ev="http://www.w3.org/2001/xml-events"

         xmlns:xi="http://www.w3.org/2001/XInclude"

         xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"

         xmlns:xxf="http://orbeon.org/oxf/xml/xforms"

         xmlns:exf="http://www.exforms.org/exf/1-0"

         xmlns:fr="http://orbeon.org/oxf/xml/form-runner"

         xmlns:saxon="http://saxon.sf.net/"

         xmlns:sql="http://orbeon.org/oxf/xml/sql"

         xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

         xmlns:fb="http://orbeon.org/oxf/xml/form-builder">

    <xh:head>

        <xh:title>Untitled Form</xh:title>

       

        <xh:script type="text/javascript">

        function Clickme(){ alert("Test Hemant"); 

        </xh:script>

       

        <xf:model id="fr-form-model" xxf:expose-xpath-types="true">

 

            <!-- Main instance -->

            <xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all">

                <form>

                    <section-1>

                        <control-1/>

                        <control-3/>

                        <control-5 onclick="Clickme()"/>

                    </section-1>

                </form>

            </xf:instance>

 

            <!-- Bindings -->

            <xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">

                <xf:bind id="section-1-bind" name="section-1" ref="section-1">

                    <xf:bind id="control-1-bind" name="control-1" ref="control-1"/>

                    <xf:bind id="control-3-bind" ref="control-3" name="control-3"/>

                    <xf:bind id="control-5-bind" ref="control-5" name="control-5" onclick="Clickme()"/>

                </xf:bind>

            </xf:bind>

 

            <!-- Metadata -->

            <xf:instance xxf:readonly="true" id="fr-form-metadata" xxf:exclude-result-prefixes="#all">

                <metadata>

                    <application-name>jstest</application-name>

                    <form-name>jstest</form-name>

                    <title xml:lang="en">Untitled Form</title>

                    <description xml:lang="en"/>

                    <singleton>false</singleton>

                </metadata>

            </xf:instance>

 

            <!-- Attachments -->

            <xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">

                <attachments>

                    <css mediatype="text/css" filename="" size=""/>

                    <pdf mediatype="application/pdf" filename="" size=""/>

                </attachments>

            </xf:instance>

 

            <!-- All form resources -->

            <!-- Don't make readonly by default in case a service modifies the resources -->

            <xf:instance id="fr-form-resources" xxf:readonly="false" xxf:exclude-result-prefixes="#all">

                <resources>

                    <resource xml:lang="en">

                        <section-1>

                            <label>Untitled Section</label>

                        </section-1>

                        <control-1>

                            <label>input</label>

                            <hint/>

                            <alert/>

                        </control-1>

                        <control-3>

                            <label>Testinput</label>

                            <hint/>

                        </control-3>

                        <control-5 onclick="Clickme()">

                            <label>TestButton</label>

                            <hint/>

                        </control-5>

                    </resource>

                </resources>

            </xf:instance>

 

            <!-- Utility instances for services -->

            <xf:instance id="fr-service-request-instance" xxf:exclude-result-prefixes="#all">

                <request/>

            </xf:instance>

 

            <xf:instance id="fr-service-response-instance" xxf:exclude-result-prefixes="#all">

                <response/>

            </xf:instance>

 

        </xf:model>

    </xh:head>

    <xh:body>

        <fr:view>

            <fr:body xmlns:oxf="http://www.orbeon.com/oxf/processors"

                     xmlns:p="http://www.orbeon.com/oxf/pipeline"

                     xmlns:xbl="http://www.w3.org/ns/xbl">

                <fr:section id="section-1-control" bind="section-1-bind">

                    <xf:label ref="$form-resources/section-1/label"/>

                    <fr:grid>

                        <xh:tr>

                            <xh:td>

                                <xf:input id="control-1-control" bind="control-1-bind">

                                    <xf:label ref="$form-resources/control-1/label"/>

                                    <xf:hint ref="$form-resources/control-1/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:input>

                            </xh:td>

                            <xh:td>

                                <xf:input id="control-3-control" bind="control-3-bind">

                                    <xf:label ref="$form-resources/control-3/label"/>

                                    <xf:hint ref="$form-resources/control-3/hint"/>

                       

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:input>

                            </xh:td>

                            <xh:td>

                                <xf:trigger id="control-5-control" bind="control-5-bind" onclick="Clickme()">

                                    <xf:label ref="$form-resources/control-5/label"/>

                   

                                    <xf:hint ref="$form-resources/control-5/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:trigger>

                            </xh:td>

                            <xh:td/>

                        </xh:tr>

                    </fr:grid>

                </fr:section>

            </fr:body>

        </fr:view>

    </xh:body>

</xh:html>

 

 

 

 

Hemant

 

From: [hidden email] [[hidden email]] On Behalf Of Alessandro Vernet
Sent: Thursday, June 25, 2015 7:41 PM


To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

Hi Hemant,

 

Sure, you can write JavaScript, just like in any other web page. But I'd recommend you first try to use the Services & Actions feature, this way you won't have to write JavaScript, the service will be called from the Orbeon Forms server, so you can keep it behind a firewall.

 

Alex

 

On Thu, Jun 25, 2015 at 11:26 AM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   I am not writing the complete X-Form by hand. Instead, I am creating the form using the form builder tool and want to  edit the generated code to include external CSS/JS. If I am able to include external JS and trigger event using the JS. Can’t I use the same JS to write AJAX?

 

 

 

 

Hemant

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of dl
Sent: Thursday, June 25, 2015 11:44 AM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

 

On 24/06/15 00:51, Alessandro Vernet wrote:

Hi Hemant,

 

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

 

Alex

 

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: AJAX calls

Alessandro  Vernet
Administrator
Hi Hemant,

I'm glad the solution with jQuery works for you. But I'm not sure what you're asking regarding the xforms-value-changed events. I see your code there, but you're not saying what you'd like to do, and what the mismatch is between what you want to do and what the code does.

Alex

On Mon, Jun 29, 2015 at 5:30 PM, Joshi, Hemant <[hidden email]> wrote:
Thanks Alex. I am able to do that now with jquery. 

Apart from that, in the following documentation, I saw the below code for client side JS. Could you please help how this can be done in form?




<xforms:action ev:event="xforms-value-changed">
    <xforms:setvalue ref=".">test</xforms:setvalue>
    <xxforms:script>var v = 2; myValueChanged(v);</xxforms:script>
</xforms:action>


<xforms:action ev:event="xforms-value-changed">
    <xforms:setvalue ref=".">test</xforms:setvalue>
    <xforms:action type="javascript">var v = 2; myValueChanged(v);</xxforms:script>
</xforms:action>




From: [hidden email] [[hidden email]] on behalf of Alessandro Vernet [[hidden email]]
Sent: Monday, June 29, 2015 5:53 PM

To: [hidden email]
Subject: Re: [orbeon] AJAX calls

Hi Hemant,

You can't add an onclick on an <xf:trigger>, and it is better to keep your code separate and not to change what Form Builder produced. The easiest is to add, in Form Builder's Control Settings dialog a custom class on the control, say "my-trigger". Then, you can have JavaScript that does:

ORBEON.jQuery('.my-trigger button').on('click', function() { alert('Clicked!'); })

If you're using a version of Orbeon Forms before 4.9, you can just refer to jQuery with $ instead of ORBEON.jQuery; more on this on:


Alex

On Mon, Jun 29, 2015 at 10:52 AM, Joshi, Hemant <[hidden email]> wrote:

PS: There was one curly closing bracket missing in previous email. However even after adding that, it’s not working.

 

        <xh:script type="text/javascript">

        function Clickme(){ alert("Test Hemant")

}; 

        </xh:script>

 

 

 

 

 

 

Hemant Joshi, PMP

AIG

Mobile <a href="tel:%2B1%20201%20748%209680" value="+12017489680" target="_blank">+1 201 748 9680 

 

[hidden email] | www.aig.com

 

 

IMPORTANT NOTICE:

The information in this email (and any attachments hereto) is confidential and may be protected by legal privileges and work product immunities. If you are not the intended recipient, you must not use or disseminate the information. Receipt by anyone other than the intended recipient is not a waiver of any attorney-client or work product privilege. If you have received this email in error, please immediately notify me by "Reply" command and permanently delete the original and any copies or printouts thereof. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by American International Group, Inc. or its subsidiaries or affiliates either jointly or severally, for any loss or damage arising in any way from its use.

 

From: Joshi, Hemant
Sent: Monday, June 29, 2015 1:00 PM
To: [hidden email]
Subject: RE: [orbeon] AJAX calls

 

Hi Alex,

   I saw the Action and Services in Orbeon. However the scope of Actions is limited to only four actions (values change, Value change on load, Activation, form load). So I am trying to add my own Java script in my form. It’s a simple test form just for verification. I am able to Add JS internally as well as externally. However there are few issues I am facing:

 

1.       Initially I just added an Alert (not within any function) and did not call it. However it was automatically being called on load. Not sure why.

2.       Later I added the alert inside a function. Now it’s not working onload. I tried calling it onclick of a button. However it’s not working at all.

 

Could you please suggest what I am missing? I have given the code in my email below. Thanks.

 

<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"

         xmlns:xs="http://www.w3.org/2001/XMLSchema"

         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:ev="http://www.w3.org/2001/xml-events"

         xmlns:xi="http://www.w3.org/2001/XInclude"

         xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"

         xmlns:xxf="http://orbeon.org/oxf/xml/xforms"

         xmlns:exf="http://www.exforms.org/exf/1-0"

         xmlns:fr="http://orbeon.org/oxf/xml/form-runner"

         xmlns:saxon="http://saxon.sf.net/"

         xmlns:sql="http://orbeon.org/oxf/xml/sql"

         xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

         xmlns:fb="http://orbeon.org/oxf/xml/form-builder">

    <xh:head>

        <xh:title>Untitled Form</xh:title>

       

        <xh:script type="text/javascript">

        function Clickme(){ alert("Test Hemant"); 

        </xh:script>

       

        <xf:model id="fr-form-model" xxf:expose-xpath-types="true">

 

            <!-- Main instance -->

            <xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all">

                <form>

                    <section-1>

                        <control-1/>

                        <control-3/>

                        <control-5 onclick="Clickme()"/>

                    </section-1>

                </form>

            </xf:instance>

 

            <!-- Bindings -->

            <xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">

                <xf:bind id="section-1-bind" name="section-1" ref="section-1">

                    <xf:bind id="control-1-bind" name="control-1" ref="control-1"/>

                    <xf:bind id="control-3-bind" ref="control-3" name="control-3"/>

                    <xf:bind id="control-5-bind" ref="control-5" name="control-5" onclick="Clickme()"/>

                </xf:bind>

            </xf:bind>

 

            <!-- Metadata -->

            <xf:instance xxf:readonly="true" id="fr-form-metadata" xxf:exclude-result-prefixes="#all">

                <metadata>

                    <application-name>jstest</application-name>

                    <form-name>jstest</form-name>

                    <title xml:lang="en">Untitled Form</title>

                    <description xml:lang="en"/>

                    <singleton>false</singleton>

                </metadata>

            </xf:instance>

 

            <!-- Attachments -->

            <xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">

                <attachments>

                    <css mediatype="text/css" filename="" size=""/>

                    <pdf mediatype="application/pdf" filename="" size=""/>

                </attachments>

            </xf:instance>

 

            <!-- All form resources -->

            <!-- Don't make readonly by default in case a service modifies the resources -->

            <xf:instance id="fr-form-resources" xxf:readonly="false" xxf:exclude-result-prefixes="#all">

                <resources>

                    <resource xml:lang="en">

                        <section-1>

                            <label>Untitled Section</label>

                        </section-1>

                        <control-1>

                            <label>input</label>

                            <hint/>

                            <alert/>

                        </control-1>

                        <control-3>

                            <label>Testinput</label>

                            <hint/>

                        </control-3>

                        <control-5 onclick="Clickme()">

                            <label>TestButton</label>

                            <hint/>

                        </control-5>

                    </resource>

                </resources>

            </xf:instance>

 

            <!-- Utility instances for services -->

            <xf:instance id="fr-service-request-instance" xxf:exclude-result-prefixes="#all">

                <request/>

            </xf:instance>

 

            <xf:instance id="fr-service-response-instance" xxf:exclude-result-prefixes="#all">

                <response/>

            </xf:instance>

 

        </xf:model>

    </xh:head>

    <xh:body>

        <fr:view>

            <fr:body xmlns:oxf="http://www.orbeon.com/oxf/processors"

                     xmlns:p="http://www.orbeon.com/oxf/pipeline"

                     xmlns:xbl="http://www.w3.org/ns/xbl">

                <fr:section id="section-1-control" bind="section-1-bind">

                    <xf:label ref="$form-resources/section-1/label"/>

                    <fr:grid>

                        <xh:tr>

                            <xh:td>

                                <xf:input id="control-1-control" bind="control-1-bind">

                                    <xf:label ref="$form-resources/control-1/label"/>

                                    <xf:hint ref="$form-resources/control-1/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:input>

                            </xh:td>

                            <xh:td>

                                <xf:input id="control-3-control" bind="control-3-bind">

                                    <xf:label ref="$form-resources/control-3/label"/>

                                    <xf:hint ref="$form-resources/control-3/hint"/>

                       

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:input>

                            </xh:td>

                            <xh:td>

                                <xf:trigger id="control-5-control" bind="control-5-bind" onclick="Clickme()">

                                    <xf:label ref="$form-resources/control-5/label"/>

                   

                                    <xf:hint ref="$form-resources/control-5/hint"/>

                                    <xf:alert ref="$fr-resources/detail/labels/alert"/>

                                </xf:trigger>

                            </xh:td>

                            <xh:td/>

                        </xh:tr>

                    </fr:grid>

                </fr:section>

            </fr:body>

        </fr:view>

    </xh:body>

</xh:html>

 

 

 

 

Hemant

 

From: [hidden email] [[hidden email]] On Behalf Of Alessandro Vernet
Sent: Thursday, June 25, 2015 7:41 PM


To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

Hi Hemant,

 

Sure, you can write JavaScript, just like in any other web page. But I'd recommend you first try to use the Services & Actions feature, this way you won't have to write JavaScript, the service will be called from the Orbeon Forms server, so you can keep it behind a firewall.

 

Alex

 

On Thu, Jun 25, 2015 at 11:26 AM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   I am not writing the complete X-Form by hand. Instead, I am creating the form using the form builder tool and want to  edit the generated code to include external CSS/JS. If I am able to include external JS and trigger event using the JS. Can’t I use the same JS to write AJAX?

 

 

 

 

Hemant

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of dl
Sent: Thursday, June 25, 2015 11:44 AM
To: [hidden email]
Subject: Re: [orbeon] AJAX calls

 

 

On 24/06/15 00:51, Alessandro Vernet wrote:

Hi Hemant,

 

With Orbeon Forms, you wouldn't do this with an Ajax request you hand-code in JavaScript. Instead, if writing the XForms "by hand", you'd use an xf:submission, and if creating your form in Form Builder, you'd use the Services and Actions. In which case are you? And does the above make sense? Of course, just let us know if you need any additional pointers.

 

Alex

 

On Tue, Jun 23, 2015 at 1:42 PM, Joshi, Hemant <[hidden email]> wrote:

Hi Alex,

   As we can add external JS in Orbeon form which will do the client side validations. Simile way, based on some user performed action, I want to make an asynchronous AJAX call to server and update the value of a particular field with the data returned from server without refreshing the complete form. Is this possible? Thanks.

Hemant


Bump.

This thread seems to have halted without coming to a conclusion.

I understood the OP to be looking for a mechanism (referred to as "AJAX call") to PUSH data from client into Orbeon form elements instead of PULL data from client (using server side Services and Actions in Orbeon form).

For example what is the recommended way of creating a client side simulator (PHP based in my case) to flood Orbeon forms with simulated data input from a simulated user community? Testing Orbeon to extremes.

Selenium scripts?

Thanks.

DL

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet