You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Julien Martin <ba...@gmail.com> on 2007/03/30 16:04:14 UTC

Making sure no user input is allowed whilst server is processing...[ajax for jsf]

Hello all,
I am wondering if it is possible to make sure that no user input is
possible/allowed whilst the server is processing in other words when the
"startText" of the a4j:status is displayed. Do I need some sort of a modal
component? Any best practice one of you could advise? How can I disable all
of the screen whilst the ajax request is processing??
Thanks in advance,
Julien.

Re: Making sure no user input is allowed whilst server is processing...[ajax for jsf]

Posted by Gerald Müllan <bi...@gmail.com>.
Hi,

i take the following approach in order to get a freeze-screen during a
(native, non-ajax) request-response-cycle:

add the attribute onclick="waitDuringRequestDialogVar.show();" to your
command component which raises the submit.

<s:modalDialog dialogId="waitDuringRequestDialog"
dialogVar="waitDuringRequestDialogVar"
               dialogAttr="bgColor='white' bgOpacity='0.5'
toggle='fade' toggleDuration='250'"
               hiderIds="" styleClass="modalDialog">
    <h:panelGrid styleClass="modalDialogProgressBox centerAlign">
        <h:outputText value="#{text.modalDialogText_requestPending}"
styleClass="modalDialogText"/>
    </h:panelGrid>
</s:modalDialog>

which in turn makes the whole screen freezing as long as the new page
is rendered.

I didn`t try it out on my own, but in case of an ajax-request i think
you need to call the "waitDuringRequestDialogVar.show();" just before
the xmlhttprequest-call.

cheers,

Gerald

On 3/30/07, Julien Martin <ba...@gmail.com> wrote:
> Hello all,
> I am wondering if it is possible to make sure that no user input is
> possible/allowed whilst the server is processing in other words when the
> "startText" of the a4j:status is displayed. Do I need some sort of a modal
> component? Any best practice one of you could advise? How can I disable all
> of the screen whilst the ajax request is processing??
> Thanks in advance,
> Julien.


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Making sure no user input is allowed whilst server is processing...[ajax for jsf]

Posted by Julien Martin <ba...@gmail.com>.
thanks for your input I am going to have a look at all this.
J.

2007/3/30, Stefan Frank <s....@vierundsechzig.de>:
>
> A fancy way for doing modal windows and disabling other userinput are
> either thickbox (http://jquery.com/demo/thickbox/) or greybox
> (http://orangoo.com/labs/GreyBox/) - they both allow you to show
> arbitrary content while users are waiting for background processing.
>
> Just make sure you don't forget to add onUnload-Handler to your page,
> to warn your users when they try the backbutton: Users on the web tend
> to get impatient, use the backbutton and loose the whole page... (that
> was at least our experience when we started using greybox)...
>
>
>
> 2007/3/30, CD <dc...@gmail.com>:
> > One thought...
> >
> > You can use divs with z-index layering to accomplish this task.  This
> will
> > allow you to use a transparent div on top of page (essentially
> functioning
> > as the glass pane in a Swing application).
> >
> >
> >
> > On 3/30/07, Julien Martin <ba...@gmail.com> wrote:
> > > Hello all,
> > > I am wondering if it is possible to make sure that no user input is
> > possible/allowed whilst the server is processing in other words when the
> > "startText" of the a4j:status is displayed. Do I need some sort of a
> modal
> > component? Any best practice one of you could advise? How can I disable
> all
> > of the screen whilst the ajax request is processing??
> > > Thanks in advance,
> > > Julien.
> >
> >
>

Re: Making sure no user input is allowed whilst server is processing...[ajax for jsf]

Posted by Stefan Frank <s....@vierundsechzig.de>.
A fancy way for doing modal windows and disabling other userinput are
either thickbox (http://jquery.com/demo/thickbox/) or greybox
(http://orangoo.com/labs/GreyBox/) - they both allow you to show
arbitrary content while users are waiting for background processing.

Just make sure you don't forget to add onUnload-Handler to your page,
to warn your users when they try the backbutton: Users on the web tend
to get impatient, use the backbutton and loose the whole page... (that
was at least our experience when we started using greybox)...



2007/3/30, CD <dc...@gmail.com>:
> One thought...
>
> You can use divs with z-index layering to accomplish this task.  This will
> allow you to use a transparent div on top of page (essentially functioning
> as the glass pane in a Swing application).
>
>
>
> On 3/30/07, Julien Martin <ba...@gmail.com> wrote:
> > Hello all,
> > I am wondering if it is possible to make sure that no user input is
> possible/allowed whilst the server is processing in other words when the
> "startText" of the a4j:status is displayed. Do I need some sort of a modal
> component? Any best practice one of you could advise? How can I disable all
> of the screen whilst the ajax request is processing??
> > Thanks in advance,
> > Julien.
>
>

Re: Making sure no user input is allowed whilst server is processing...[ajax for jsf]

Posted by CD <dc...@gmail.com>.
One thought...

You can use divs with z-index layering to accomplish this task.  This will
allow you to use a transparent div on top of page (essentially functioning
as the glass pane in a Swing application).


On 3/30/07, Julien Martin <ba...@gmail.com> wrote:
>
> Hello all,
> I am wondering if it is possible to make sure that no user input is
> possible/allowed whilst the server is processing in other words when the
> "startText" of the a4j:status is displayed. Do I need some sort of a modal
> component? Any best practice one of you could advise? How can I disable all
> of the screen whilst the ajax request is processing??
> Thanks in advance,
> Julien.