Disabling a form until it's fully loaded

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

Disabling a form until it's fully loaded

Alan Leavy

Some of my users access our web forms over slow internet connections. Every so often they raise issues that seem to be caused by them interacting with the form before it is fully loaded (the Orbeon-generated javascript behind a control is not available yet, or whatever).

 

Is there an easy way to disable a form until the xforms-ready event is received? Something like what xxforms:modal does in the context of triggers and submissions.

 

Regards,

    Alan.

 

 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Disabling a form until it's fully loaded

Jeremy Nix
Alan,

Not sure if this is this is exactly what you are looking for, but it
sounds like it would be close.  Here's what I'm doing:

..
<xforms:instance id="odm-instance">
<ODM/>
</xforms:instance>
<xforms:instance id="variables-instance" xxforms:validation="skip">
<Variables>
<Status loading="true"/>
</Variables>
</xforms:instance>
<!-- submission that populates my instance data once the
xforms-model-construct-done event occurs -->
<xforms:submission id="read-data" method="get"
action="http://localhost/xforms/xml/test.xml" replace="instance"
instance="odm-instance">
<xforms:action ev:event="xforms-submit-done">
<xforms:setvalue ref="instance('variables-instance')/Status/@loading"
value="'false'"/>
<!-- once the instance data is populated, here my own javascript
initialization -->
<xxforms:script>initJS();</xxforms:script>
</xforms:action>
</xforms:submission>
<!-- displatch new event once xforms-model-construct-done, but after
delay (read somewhere this was recommended) -->
<xforms:dispatch ev:event="xforms-model-construct-done"
target="odm-model" name="load-initial-data" delay="1"/>
<!-- perform the submission above to load my data -->
<xforms:action ev:event="load-initial-data">
<xforms:send submission="read-data"/>
</xforms:action>
..
<xhtml:body>
<!-- display this group while the page is loading...Status attribute
clues me in -->
<xforms:group
ref="instance('variables-instance')/Status[normalize-space(@loading) =
'true']" appearance="xxforms:fieldset">
<xhtml:div style="text-align:center;vertical-align:middle">
<xhtml:img src="/images/ajax/ajax_process.gif" alt="loading"/>
                 Please wait while the page loads...
</xhtml:div>
</xforms:group>
<!-- display this group once the page has loaded...again, Status
attribute clues me in. -->
<xforms:group style="background-color:#f5f5f5"
appearance="xxforms:fieldset"
ref="instance('variables-instance')/Status[normalize-space(@loading) =
'false']">
</xforms:group>



------------------------------------------------------------------------
Jeremy Nix
Senior Application Developer
Cincinnati Children's Hospital Medical Center

On 07/02/2010 05:04 AM, Leavy, Alan wrote:

>
> Some of my users access our web forms over slow internet connections.
> Every so often they raise issues that seem to be caused by them
> interacting with the form before it is fully loaded (the
> Orbeon-generated javascript behind a control is not available yet, or
> whatever).
>
> Is there an easy way to disable a form until the xforms-ready event is
> received? Something like what xxforms:modal does in the context of
> triggers and submissions.
>
> Regards,
>
>     Alan.
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Disabling a form until it's fully loaded

Alessandro  Vernet
Administrator
Alan, Jeremy,

I am surprised this could happen. In the HTML produced by the server,
<form> has a class xforms-initially-hidden, which is display: none.
That class is removed in JavaScript when all the JavaScript files we
need are loaded, and everything has been initialized. Do you have this
problem with 3.8 or a more recent version? If you do a "view source"
on a page served by Orbeon Forms, do you see that
xforms-initially-hidden class on the <form>?

Alex

On Fri, Jul 2, 2010 at 4:47 AM, Jeremy Nix <[hidden email]> wrote:

> Alan,
>
> Not sure if this is this is exactly what you are looking for, but it sounds
> like it would be close.  Here's what I'm doing:
>
> ..
> <xforms:instance id="odm-instance">
> <ODM/>
> </xforms:instance>
> <xforms:instance id="variables-instance" xxforms:validation="skip">
> <Variables>
> <Status loading="true"/>
> </Variables>
> </xforms:instance>
> <!-- submission that populates my instance data once the
> xforms-model-construct-done event occurs -->
> <xforms:submission id="read-data" method="get"
> action="http://localhost/xforms/xml/test.xml" replace="instance"
> instance="odm-instance">
> <xforms:action ev:event="xforms-submit-done">
> <xforms:setvalue ref="instance('variables-instance')/Status/@loading"
> value="'false'"/>
> <!-- once the instance data is populated, here my own javascript
> initialization -->
> <xxforms:script>initJS();</xxforms:script>
> </xforms:action>
> </xforms:submission>
> <!-- displatch new event once xforms-model-construct-done, but after delay
> (read somewhere this was recommended) -->
> <xforms:dispatch ev:event="xforms-model-construct-done" target="odm-model"
> name="load-initial-data" delay="1"/>
> <!-- perform the submission above to load my data -->
> <xforms:action ev:event="load-initial-data">
> <xforms:send submission="read-data"/>
> </xforms:action>
> ..
> <xhtml:body>
> <!-- display this group while the page is loading...Status attribute clues
> me in -->
> <xforms:group
> ref="instance('variables-instance')/Status[normalize-space(@loading) =
> 'true']" appearance="xxforms:fieldset">
> <xhtml:div style="text-align:center;vertical-align:middle">
> <xhtml:img src="/images/ajax/ajax_process.gif" alt="loading"/>
>                Please wait while the page loads...
> </xhtml:div>
> </xforms:group>
> <!-- display this group once the page has loaded...again, Status attribute
> clues me in. -->
> <xforms:group style="background-color:#f5f5f5" appearance="xxforms:fieldset"
> ref="instance('variables-instance')/Status[normalize-space(@loading) =
> 'false']">
> </xforms:group>
>
>
>
> ------------------------------------------------------------------------
> Jeremy Nix
> Senior Application Developer
> Cincinnati Children's Hospital Medical Center
>
> On 07/02/2010 05:04 AM, Leavy, Alan wrote:
>>
>> Some of my users access our web forms over slow internet connections.
>> Every so often they raise issues that seem to be caused by them interacting
>> with the form before it is fully loaded (the Orbeon-generated javascript
>> behind a control is not available yet, or whatever).
>>
>> Is there an easy way to disable a form until the xforms-ready event is
>> received? Something like what xxforms:modal does in the context of triggers
>> and submissions.
>>
>> Regards,
>>
>>    Alan.
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: Re: Re: Disabling a form until it's fully loaded

Alan Leavy
Hi Alex,

I'm still running 3.7 beta. I've been unable to upgrade to 3.8 because of the authentication issues I experienced with the latest version [http://forge.ow2.org/tracker/index.php?func=detail&aid=315104&group_id=168&atid=350207]

On that authentication issue, I'm surprised more users haven't been reporting it. Is there an alternative authentication method that others use instead?
I'd love to be able to upgrade to 3.8 as there are quite a few bugs in 3.7 that I'm having to continue working around.

Regards,
    Alan.

-----Original Message-----
From: Alessandro Vernet [mailto:[hidden email]]
Sent: Saturday, July 03, 2010 5:28 AM
To: ops-users
Subject: [ops-users] Re: Re: Disabling a form until it's fully loaded

Alan, Jeremy,

I am surprised this could happen. In the HTML produced by the server, <form> has a class xforms-initially-hidden, which is display: none.
That class is removed in JavaScript when all the JavaScript files we need are loaded, and everything has been initialized. Do you have this problem with 3.8 or a more recent version? If you do a "view source"
on a page served by Orbeon Forms, do you see that xforms-initially-hidden class on the <form>?

Alex

On Fri, Jul 2, 2010 at 4:47 AM, Jeremy Nix <[hidden email]> wrote:

> Alan,
>
> Not sure if this is this is exactly what you are looking for, but it
> sounds like it would be close.  Here's what I'm doing:
>
> ..
> <xforms:instance id="odm-instance">
> <ODM/>
> </xforms:instance>
> <xforms:instance id="variables-instance" xxforms:validation="skip">
> <Variables> <Status loading="true"/> </Variables> </xforms:instance>
> <!-- submission that populates my instance data once the
> xforms-model-construct-done event occurs --> <xforms:submission
> id="read-data" method="get"
> action="http://localhost/xforms/xml/test.xml" replace="instance"
> instance="odm-instance">
> <xforms:action ev:event="xforms-submit-done"> <xforms:setvalue
> ref="instance('variables-instance')/Status/@loading"
> value="'false'"/>
> <!-- once the instance data is populated, here my own javascript
> initialization --> <xxforms:script>initJS();</xxforms:script>
> </xforms:action>
> </xforms:submission>
> <!-- displatch new event once xforms-model-construct-done, but after
> delay (read somewhere this was recommended) --> <xforms:dispatch
> ev:event="xforms-model-construct-done" target="odm-model"
> name="load-initial-data" delay="1"/>
> <!-- perform the submission above to load my data --> <xforms:action
> ev:event="load-initial-data"> <xforms:send submission="read-data"/>
> </xforms:action> ..
> <xhtml:body>
> <!-- display this group while the page is loading...Status attribute
> clues me in --> <xforms:group
> ref="instance('variables-instance')/Status[normalize-space(@loading) =
> 'true']" appearance="xxforms:fieldset"> <xhtml:div
> style="text-align:center;vertical-align:middle">
> <xhtml:img src="/images/ajax/ajax_process.gif" alt="loading"/>
>                Please wait while the page loads...
> </xhtml:div>
> </xforms:group>
> <!-- display this group once the page has loaded...again, Status
> attribute clues me in. --> <xforms:group
> style="background-color:#f5f5f5" appearance="xxforms:fieldset"
> ref="instance('variables-instance')/Status[normalize-space(@loading) =
> 'false']"> </xforms:group>
>
>
>
> ----------------------------------------------------------------------
> --
> Jeremy Nix
> Senior Application Developer
> Cincinnati Children's Hospital Medical Center
>
> On 07/02/2010 05:04 AM, Leavy, Alan wrote:
>>
>> Some of my users access our web forms over slow internet connections.
>> Every so often they raise issues that seem to be caused by them
>> interacting with the form before it is fully loaded (the
>> Orbeon-generated javascript behind a control is not available yet, or whatever).
>>
>> Is there an easy way to disable a form until the xforms-ready event
>> is received? Something like what xxforms:modal does in the context of
>> triggers and submissions.
>>
>> Regards,
>>
>>    Alan.
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: Re: Disabling a form until it's fully loaded

Alistair Miles-2
On Mon, Jul 05, 2010 at 02:35:14AM -0400, Leavy, Alan wrote:
> Hi Alex,
>
> I'm still running 3.7 beta. I've been unable to upgrade to 3.8 because of the authentication issues I experienced with the latest version [http://forge.ow2.org/tracker/index.php?func=detail&aid=315104&group_id=168&atid=350207]
>
> On that authentication issue, I'm surprised more users haven't been reporting it. Is there an alternative authentication method that others use instead?
> I'd love to be able to upgrade to 3.8 as there are quite a few bugs in 3.7 that I'm having to continue working around.

Hi Alan, I don't know if this will help, but we're using Spring
Security to implement authentication with Orbeon. We're still on
Orbeon 3.7, so don't know yet if Spring + Orbeon 3.8 has issues.

For an example minimal spring security config on an orbeon web project
see [1].

Cheers

Alistair

[1] http://code.google.com/p/atombeat/source/browse/trunk/atombeat/war/WEB-INF/security-example.xml

>
> Regards,
>     Alan.
>
> -----Original Message-----
> From: Alessandro Vernet [mailto:[hidden email]]
> Sent: Saturday, July 03, 2010 5:28 AM
> To: ops-users
> Subject: [ops-users] Re: Re: Disabling a form until it's fully loaded
>
> Alan, Jeremy,
>
> I am surprised this could happen. In the HTML produced by the server, <form> has a class xforms-initially-hidden, which is display: none.
> That class is removed in JavaScript when all the JavaScript files we need are loaded, and everything has been initialized. Do you have this problem with 3.8 or a more recent version? If you do a "view source"
> on a page served by Orbeon Forms, do you see that xforms-initially-hidden class on the <form>?
>
> Alex
>
> On Fri, Jul 2, 2010 at 4:47 AM, Jeremy Nix <[hidden email]> wrote:
> > Alan,
> >
> > Not sure if this is this is exactly what you are looking for, but it
> > sounds like it would be close.  Here's what I'm doing:
> >
> > ..
> > <xforms:instance id="odm-instance">
> > <ODM/>
> > </xforms:instance>
> > <xforms:instance id="variables-instance" xxforms:validation="skip">
> > <Variables> <Status loading="true"/> </Variables> </xforms:instance>
> > <!-- submission that populates my instance data once the
> > xforms-model-construct-done event occurs --> <xforms:submission
> > id="read-data" method="get"
> > action="http://localhost/xforms/xml/test.xml" replace="instance"
> > instance="odm-instance">
> > <xforms:action ev:event="xforms-submit-done"> <xforms:setvalue
> > ref="instance('variables-instance')/Status/@loading"
> > value="'false'"/>
> > <!-- once the instance data is populated, here my own javascript
> > initialization --> <xxforms:script>initJS();</xxforms:script>
> > </xforms:action>
> > </xforms:submission>
> > <!-- displatch new event once xforms-model-construct-done, but after
> > delay (read somewhere this was recommended) --> <xforms:dispatch
> > ev:event="xforms-model-construct-done" target="odm-model"
> > name="load-initial-data" delay="1"/>
> > <!-- perform the submission above to load my data --> <xforms:action
> > ev:event="load-initial-data"> <xforms:send submission="read-data"/>
> > </xforms:action> ..
> > <xhtml:body>
> > <!-- display this group while the page is loading...Status attribute
> > clues me in --> <xforms:group
> > ref="instance('variables-instance')/Status[normalize-space(@loading) =
> > 'true']" appearance="xxforms:fieldset"> <xhtml:div
> > style="text-align:center;vertical-align:middle">
> > <xhtml:img src="/images/ajax/ajax_process.gif" alt="loading"/>
> >                Please wait while the page loads...
> > </xhtml:div>
> > </xforms:group>
> > <!-- display this group once the page has loaded...again, Status
> > attribute clues me in. --> <xforms:group
> > style="background-color:#f5f5f5" appearance="xxforms:fieldset"
> > ref="instance('variables-instance')/Status[normalize-space(@loading) =
> > 'false']"> </xforms:group>
> >
> >
> >
> > ----------------------------------------------------------------------
> > --
> > Jeremy Nix
> > Senior Application Developer
> > Cincinnati Children's Hospital Medical Center
> >
> > On 07/02/2010 05:04 AM, Leavy, Alan wrote:
> >>
> >> Some of my users access our web forms over slow internet connections.
> >> Every so often they raise issues that seem to be caused by them
> >> interacting with the form before it is fully loaded (the
> >> Orbeon-generated javascript behind a control is not available yet, or whatever).
> >>
> >> Is there an easy way to disable a form until the xforms-ready event
> >> is received? Something like what xxforms:modal does in the context of
> >> triggers and submissions.
> >>
> >> Regards,
> >>
> >>    Alan.
> >>
> >
> >
> > --
> > You receive this message as a subscriber of the [hidden email]
> > mailing list.
> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > OW2 mailing lists service home page: http://www.ow2.org/wws
> >
> >
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet

>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health <http://cggh.org>
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Web: http://purl.org/net/aliman
Email: [hidden email]
Tel: +44 (0)1865 287669


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: Re: Disabling a form until it's fully loaded

Alan Leavy
In reply to this post by Alessandro Vernet
RE: [ops-users] Re: Re: Disabling a form until it's fully loaded

Hi again Alex,

To answer your original question: I can see the following in the source:

<form id="xforms-form" class="xforms-form" action="/orbeon3.7beta/wetmill-weekly-report-input-2010-RW/" method="POST" onsubmit="return false">

  <input type="hidden" name="$static-state" value="pers:2A080485-5641-1E8A-A7F9-833E0F4FBFAC">

    <input type="hidden" name="$dynamic-state" value="pers:2A463372-9081-976E-CB24-3D9220FCEF3B">

      <input type="hidden" name="$server-events" value="">

        <input type="hidden" name="$client-state" value="">

          <input type="hidden" name="$repeat-tree" value="">

            <input type="hidden" name="$repeat-indexes" value="">

              <span class="xforms-loading-loading">Loading...</span>

              <span class="xforms-loading-none"></span>

              <div class="xforms-error-panel xforms-initially-hidden" xml:base="oxf:/config/error-dialog.xml">

Regards,

   Alan.

-----Original Message-----
From: Alessandro Vernet [[hidden email]]
Sent: Saturday, July 03, 2010 5:28 AM
To: ops-users
Subject: [ops-users] Re: Re: Disabling a form until it's fully loaded

Alan, Jeremy,

I am surprised this could happen. In the HTML produced by the server, <form> has a class xforms-initially-hidden, which is display: none.

That class is removed in JavaScript when all the JavaScript files we need are loaded, and everything has been initialized. Do you have this problem with 3.8 or a more recent version? If you do a "view source"

on a page served by Orbeon Forms, do you see that xforms-initially-hidden class on the <form>?

Alex

On Fri, Jul 2, 2010 at 4:47 AM, Jeremy Nix <[hidden email]> wrote:

> Alan,

>

> Not sure if this is this is exactly what you are looking for, but it

> sounds like it would be close.  Here's what I'm doing:

>

> ..

> <xforms:instance id="odm-instance">

> <ODM/>

> </xforms:instance>

> <xforms:instance id="variables-instance" xxforms:validation="skip">

> <Variables> <Status loading="true"/> </Variables> </xforms:instance>

> <!-- submission that populates my instance data once the

> xforms-model-construct-done event occurs --> <xforms:submission

> id="read-data" method="get"

> action="http://localhost/xforms/xml/test.xml" replace="instance"

> instance="odm-instance">

> <xforms:action ev:event="xforms-submit-done"> <xforms:setvalue

> ref="instance('variables-instance')/Status/@loading"

> value="'false'"/>

> <!-- once the instance data is populated, here my own javascript

> initialization --> <xxforms:script>initJS();</xxforms:script>

> </xforms:action>

> </xforms:submission>

> <!-- displatch new event once xforms-model-construct-done, but after

> delay (read somewhere this was recommended) --> <xforms:dispatch

> ev:event="xforms-model-construct-done" target="odm-model"

> name="load-initial-data" delay="1"/>

> <!-- perform the submission above to load my data --> <xforms:action

> ev:event="load-initial-data"> <xforms:send submission="read-data"/>

> </xforms:action> ..

> <xhtml:body>

> <!-- display this group while the page is loading...Status attribute

> clues me in --> <xforms:group

> ref="instance('variables-instance')/Status[normalize-space(@loading) =

> 'true']" appearance="xxforms:fieldset"> <xhtml:div

> style="text-align:center;vertical-align:middle">

> <xhtml:img src="/images/ajax/ajax_process.gif" alt="loading"/>

>                Please wait while the page loads...

> </xhtml:div>

> </xforms:group>

> <!-- display this group once the page has loaded...again, Status

> attribute clues me in. --> <xforms:group

> style="background-color:#f5f5f5" appearance="xxforms:fieldset"

> ref="instance('variables-instance')/Status[normalize-space(@loading) =

> 'false']"> </xforms:group>

>

>

>

> ----------------------------------------------------------------------

> --

> Jeremy Nix

> Senior Application Developer

> Cincinnati Children's Hospital Medical Center

>

> On 07/02/2010 05:04 AM, Leavy, Alan wrote:

>>

>> Some of my users access our web forms over slow internet connections.

>> Every so often they raise issues that seem to be caused by them

>> interacting with the form before it is fully loaded (the

>> Orbeon-generated javascript behind a control is not available yet, or whatever).

>>

>> Is there an easy way to disable a form until the xforms-ready event

>> is received? Something like what xxforms:modal does in the context of

>> triggers and submissions.

>>

>> Regards,

>>

>>    Alan.

>>

>

>

> --

> You receive this message as a subscriber of the [hidden email]

> mailing list.

> To unsubscribe: [hidden email]

> For general help: [hidden email]

> OW2 mailing lists service home page: http://www.ow2.org/wws

>

>



--

Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Re: Re: Disabling a form until it's fully loaded

Alan Leavy
In reply to this post by Alistair Miles-2
Thanks Alistair,
I'll try that alternative.
-Alan.

-----Original Message-----
From: Alistair Miles [mailto:[hidden email]]
Sent: Monday, July 05, 2010 10:46 AM
To: [hidden email]
Subject: [ops-users] Re: RE: Re: Re: Disabling a form until it's fully loaded

On Mon, Jul 05, 2010 at 02:35:14AM -0400, Leavy, Alan wrote:
> Hi Alex,
>
> I'm still running 3.7 beta. I've been unable to upgrade to 3.8 because
> of the authentication issues I experienced with the latest version
> [http://forge.ow2.org/tracker/index.php?func=detail&aid=315104&group_i
> d=168&atid=350207]
>
> On that authentication issue, I'm surprised more users haven't been reporting it. Is there an alternative authentication method that others use instead?
> I'd love to be able to upgrade to 3.8 as there are quite a few bugs in 3.7 that I'm having to continue working around.

Hi Alan, I don't know if this will help, but we're using Spring Security to implement authentication with Orbeon. We're still on Orbeon 3.7, so don't know yet if Spring + Orbeon 3.8 has issues.

For an example minimal spring security config on an orbeon web project see [1].

Cheers

Alistair

[1] http://code.google.com/p/atombeat/source/browse/trunk/atombeat/war/WEB-INF/security-example.xml

>
> Regards,
>     Alan.
>
> -----Original Message-----
> From: Alessandro Vernet [mailto:[hidden email]]
> Sent: Saturday, July 03, 2010 5:28 AM
> To: ops-users
> Subject: [ops-users] Re: Re: Disabling a form until it's fully loaded
>
> Alan, Jeremy,
>
> I am surprised this could happen. In the HTML produced by the server, <form> has a class xforms-initially-hidden, which is display: none.
> That class is removed in JavaScript when all the JavaScript files we need are loaded, and everything has been initialized. Do you have this problem with 3.8 or a more recent version? If you do a "view source"
> on a page served by Orbeon Forms, do you see that xforms-initially-hidden class on the <form>?
>
> Alex
>
> On Fri, Jul 2, 2010 at 4:47 AM, Jeremy Nix <[hidden email]> wrote:
> > Alan,
> >
> > Not sure if this is this is exactly what you are looking for, but it
> > sounds like it would be close.  Here's what I'm doing:
> >
> > ..
> > <xforms:instance id="odm-instance">
> > <ODM/>
> > </xforms:instance>
> > <xforms:instance id="variables-instance" xxforms:validation="skip">
> > <Variables> <Status loading="true"/> </Variables> </xforms:instance>
> > <!-- submission that populates my instance data once the
> > xforms-model-construct-done event occurs --> <xforms:submission
> > id="read-data" method="get"
> > action="http://localhost/xforms/xml/test.xml" replace="instance"
> > instance="odm-instance">
> > <xforms:action ev:event="xforms-submit-done"> <xforms:setvalue
> > ref="instance('variables-instance')/Status/@loading"
> > value="'false'"/>
> > <!-- once the instance data is populated, here my own javascript
> > initialization --> <xxforms:script>initJS();</xxforms:script>
> > </xforms:action>
> > </xforms:submission>
> > <!-- displatch new event once xforms-model-construct-done, but after
> > delay (read somewhere this was recommended) --> <xforms:dispatch
> > ev:event="xforms-model-construct-done" target="odm-model"
> > name="load-initial-data" delay="1"/>
> > <!-- perform the submission above to load my data --> <xforms:action
> > ev:event="load-initial-data"> <xforms:send submission="read-data"/>
> > </xforms:action> ..
> > <xhtml:body>
> > <!-- display this group while the page is loading...Status attribute
> > clues me in --> <xforms:group
> > ref="instance('variables-instance')/Status[normalize-space(@loading)
> > = 'true']" appearance="xxforms:fieldset"> <xhtml:div
> > style="text-align:center;vertical-align:middle">
> > <xhtml:img src="/images/ajax/ajax_process.gif" alt="loading"/>
> >                Please wait while the page loads...
> > </xhtml:div>
> > </xforms:group>
> > <!-- display this group once the page has loaded...again, Status
> > attribute clues me in. --> <xforms:group
> > style="background-color:#f5f5f5" appearance="xxforms:fieldset"
> > ref="instance('variables-instance')/Status[normalize-space(@loading)
> > = 'false']"> </xforms:group>
> >
> >
> >
> > --------------------------------------------------------------------
> > --
> > --
> > Jeremy Nix
> > Senior Application Developer
> > Cincinnati Children's Hospital Medical Center
> >
> > On 07/02/2010 05:04 AM, Leavy, Alan wrote:
> >>
> >> Some of my users access our web forms over slow internet connections.
> >> Every so often they raise issues that seem to be caused by them
> >> interacting with the form before it is fully loaded (the
> >> Orbeon-generated javascript behind a control is not available yet, or whatever).
> >>
> >> Is there an easy way to disable a form until the xforms-ready event
> >> is received? Something like what xxforms:modal does in the context
> >> of triggers and submissions.
> >>
> >> Regards,
> >>
> >>    Alan.
> >>
> >
> >
> > --
> > You receive this message as a subscriber of the [hidden email]
> > mailing list.
> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > OW2 mailing lists service home page: http://www.ow2.org/wws
> >
> >
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet

>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health <http://cggh.org> The Wellcome Trust Centre for Human Genetics Roosevelt Drive Oxford
OX3 7BN
United Kingdom
Web: http://purl.org/net/aliman
Email: [hidden email]
Tel: +44 (0)1865 287669


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: Re: Disabling a form until it's fully loaded

Alessandro  Vernet
Administrator
In reply to this post by Alan Leavy
Alan,

So you have no xforms-initially-hidden on the <form>. I am surprised,
as I though we implemented this a while ago, well before 3.8. You are
looking at the initial source produced by the server; not the live
HTML DOM, right? If indeed you don't have this in your version, then
you're out of luck ;). You would need to upgrade, but I understand you
can't before we fix that other login issue.

Alex

On Mon, Jul 5, 2010 at 1:03 AM, Leavy, Alan <[hidden email]> wrote:

> Hi again Alex,
>
> To answer your original question: I can see the following in the source:
>
> <form id="xforms-form" class="xforms-form"
> action="/orbeon3.7beta/wetmill-weekly-report-input-2010-RW/" method="POST"
> onsubmit="return false">
>
>   <input type="hidden" name="$static-state"
> value="pers:2A080485-5641-1E8A-A7F9-833E0F4FBFAC">
>
>     <input type="hidden" name="$dynamic-state"
> value="pers:2A463372-9081-976E-CB24-3D9220FCEF3B">
>
>       <input type="hidden" name="$server-events" value="">
>
>         <input type="hidden" name="$client-state" value="">
>
>           <input type="hidden" name="$repeat-tree" value="">
>
>             <input type="hidden" name="$repeat-indexes" value="">
>
>               <span class="xforms-loading-loading">Loading...</span>
>
>               <span class="xforms-loading-none"></span>
>
>               <div class="xforms-error-panel xforms-initially-hidden"
> xml:base="oxf:/config/error-dialog.xml">
>
> Regards,
>
>    Alan.
>
> -----Original Message-----
> From: Alessandro Vernet [mailto:[hidden email]]
> Sent: Saturday, July 03, 2010 5:28 AM
> To: ops-users
> Subject: [ops-users] Re: Re: Disabling a form until it's fully loaded
>
> Alan, Jeremy,
>
> I am surprised this could happen. In the HTML produced by the server, <form>
> has a class xforms-initially-hidden, which is display: none.
>
> That class is removed in JavaScript when all the JavaScript files we need
> are loaded, and everything has been initialized. Do you have this problem
> with 3.8 or a more recent version? If you do a "view source"
>
> on a page served by Orbeon Forms, do you see that xforms-initially-hidden
> class on the <form>?
>
> Alex
>
> On Fri, Jul 2, 2010 at 4:47 AM, Jeremy Nix <[hidden email]> wrote:
>
>> Alan,
>
>>
>
>> Not sure if this is this is exactly what you are looking for, but it
>
>> sounds like it would be close.  Here's what I'm doing:
>
>>
>
>> ..
>
>> <xforms:instance id="odm-instance">
>
>> <ODM/>
>
>> </xforms:instance>
>
>> <xforms:instance id="variables-instance" xxforms:validation="skip">
>
>> <Variables> <Status loading="true"/> </Variables> </xforms:instance>
>
>> <!-- submission that populates my instance data once the
>
>> xforms-model-construct-done event occurs --> <xforms:submission
>
>> id="read-data" method="get"
>
>> action="http://localhost/xforms/xml/test.xml" replace="instance"
>
>> instance="odm-instance">
>
>> <xforms:action ev:event="xforms-submit-done"> <xforms:setvalue
>
>> ref="instance('variables-instance')/Status/@loading"
>
>> value="'false'"/>
>
>> <!-- once the instance data is populated, here my own javascript
>
>> initialization --> <xxforms:script>initJS();</xxforms:script>
>
>> </xforms:action>
>
>> </xforms:submission>
>
>> <!-- displatch new event once xforms-model-construct-done, but after
>
>> delay (read somewhere this was recommended) --> <xforms:dispatch
>
>> ev:event="xforms-model-construct-done" target="odm-model"
>
>> name="load-initial-data" delay="1"/>
>
>> <!-- perform the submission above to load my data --> <xforms:action
>
>> ev:event="load-initial-data"> <xforms:send submission="read-data"/>
>
>> </xforms:action> ..
>
>> <xhtml:body>
>
>> <!-- display this group while the page is loading...Status attribute
>
>> clues me in --> <xforms:group
>
>> ref="instance('variables-instance')/Status[normalize-space(@loading) =
>
>> 'true']" appearance="xxforms:fieldset"> <xhtml:div
>
>> style="text-align:center;vertical-align:middle">
>
>> <xhtml:img src="/images/ajax/ajax_process.gif" alt="loading"/>
>
>>                Please wait while the page loads...
>
>> </xhtml:div>
>
>> </xforms:group>
>
>> <!-- display this group once the page has loaded...again, Status
>
>> attribute clues me in. --> <xforms:group
>
>> style="background-color:#f5f5f5" appearance="xxforms:fieldset"
>
>> ref="instance('variables-instance')/Status[normalize-space(@loading) =
>
>> 'false']"> </xforms:group>
>
>>
>
>>
>
>>
>
>> ----------------------------------------------------------------------
>
>> --
>
>> Jeremy Nix
>
>> Senior Application Developer
>
>> Cincinnati Children's Hospital Medical Center
>
>>
>
>> On 07/02/2010 05:04 AM, Leavy, Alan wrote:
>
>>>
>
>>> Some of my users access our web forms over slow internet connections.
>
>>> Every so often they raise issues that seem to be caused by them
>
>>> interacting with the form before it is fully loaded (the
>
>>> Orbeon-generated javascript behind a control is not available yet, or
>>> whatever).
>
>>>
>
>>> Is there an easy way to disable a form until the xforms-ready event
>
>>> is received? Something like what xxforms:modal does in the context of
>
>>> triggers and submissions.
>
>>>
>
>>> Regards,
>
>>>
>
>>>    Alan.
>
>>>
>
>>
>
>>
>
>> --
>
>> You receive this message as a subscriber of the [hidden email]
>
>> mailing list.
>
>> To unsubscribe: mailto:[hidden email]
>
>> For general help: mailto:[hidden email]?subject=help
>
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>>
>
>>
>
> --
>
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Out of Office AutoReply: Re: Re: Disabling a form until it's fully loaded

pappleby
Out of Office AutoReply: Re: Re: Disabling a form until it's fully loaded

I am out of the office until 26th July

***********************************************************************************************

This email, including any attachment, is confidential and may be legally privileged. If you are not the intended recipient or if you have received this email in error, please inform the sender immediately by reply and delete all copies from your system. Do not retain, copy, disclose, distribute or otherwise use any of its contents.

 

Whilst we have taken reasonable precautions to ensure that this email has been swept for computer viruses, we cannot guarantee that this email does not contain such material and we therefore advise you to carry out your own virus checks. We do not accept liability for any damage or losses sustained as a result of such material.

 

Please note that incoming and outgoing email communications passing through our IT systems may be monitored and/or intercepted by us solely to determine whether the content is business related and compliant with company standards.

***********************************************************************************************

The Stationery Office Limited is registered in England No. 3049649 at 10 Eastbourne Terrace, London, W2 6LG