Dear Douglas,

> Do you mind sharing your JQuery?
no fancy stuff but as we already use jquery ...

You can play around with the fadeIn-fadeOut times, from a visual point of view 
it should not be too short or you will have flickering.

function showModalOverlay() {
        //Set the css and fade in our overlay
        $("#veil").css("opacity", 0.8).fadeIn(100);

}

function hideModalOverlay() {
        // stop running animations and fadeOut
         $("#veil").stop().fadeOut(100);
}

window.wicketGlobalPreCallHandler = function() {
        showModalOverlay();
};

window.wicketGlobalPostCallHandler = function() {
        hideModalOverlay();
};

To show an  message just put something into the veil div:

<div id="veil">
<div><center>wait for ajax call...</center></div> 

or put some images inside, you can create some nice ajax load indicators at

http://www.ajaxload.info/

Best Regards,
        Ilja Pavkovic



Am Montag, 11. Januar 2010 17:21:27 schrieb Douglas Ferguson:
> 
> On Jan 11, 2010, at 8:00 AM, Ilja Pavkovic wrote:
> > Hi,
> >
> > use a veil. You could use this one:
> >
> > http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-li
> >nes- of-code/
> >
> > or (as I personally think it bloats the ajax links)
> >
> > get familiar with some javascript, add
> >
> > <div id="veil"/> to your page with a style like
> >
> > #veil {
> >        position: absolute;
> >        z-index:10000;
> >        top: 0px;
> >        left: 0px;
> >        height:100%;
> >        width:100%;
> >        background: grey;
> >        display: none;
> > }
> >
> > and add some javascript to your page like
> >
> > window.wicketGlobalPreCallHandler = function() {
> > window.getElementById("veil").style.display="block";
> > };
> >
> > window.wicketGlobalPostCallHandler = function() {
> > window.getElementById("veil").style.display="none";
> > };
> >
> > javascript may not work as I personally use jquery here to get some more
> > fance fadeIn fadeOut and I just wrote it down here :)
> >
> >
> > Best Regards,
> >     Ilja Pavkovic
> >
> > Am Montag, 11. Januar 2010 14:43:42 schrieb Giovanni:
> >> In my current project, we have many situations in which we have to load
> >> a page, which is very slow. The slowness is not because of Wicket, but
> >> because there are heavy queries on the DB.
> >>
> >> In some of these situations, we used the AjaxLazyLoadPanel, when we have
> >> to load a "slow" panel.
> >>
> >> In some other situations, when we are not loading a panel, but a page,
> >> how can we do to prevent the user from "crazy clicking" on the
> >> application, because he is impatient with the slow loading?
> >>
> >> More generally, is there a standard way to disable all the links and
> >> click-able components of the application, while a new component is
> >> loading?
> >>
> >> best regards,
> >> giovanni
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to