Hi guys,
thanks for answers. The solution to disable links until the ajax is finished
don't seems right to me. The links can be spread through different
components so I don't want to create unnecessary dependencies between these
unless there is one general method that disables all links everywhere at
once and I don't know about it.

I tried the veil, but it doesn't work. Maybe I made something wrong but I
proceeded exactly as in this article:
http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/#more-302

The method getAjaxIndicatorMarkupId was at lest called to get the ID,
however no positive result. Afterwards I tried to implement the
IAjaxIndicatorAware in Panel and after that even in Behaviors themselves. On
behaviors the getAjaxIndicatorMarkupId wasn't even called. My example
implementation looked like this.

private class AutoLoginBehavior extends AbstractDefaultAjaxBehavior
implements IAjaxIndicatorAware{
        @Override
        public String getAjaxIndicatorMarkupId() {
                return "fb-autologin-veil";
        }

        @Override
        protected void respond(AjaxRequestTarget target) {
                Map<String, String[]> map = ((WebRequestCycle)
RequestCycle.get()).getRequest().getParameterMap();
                
                String uid = map.get("fbid")[0];
                String sessionId = map.get("fbsessid")[0];
                String accessToken = map.get("fbaccesstoken")[0];
                autologin(target, Long.parseLong(uid), sessionId, accessToken);
        }
}

and in markup for Panel I included following:

<div id="fb-autologin-veil"
style="display:none;position:absolute;top:0;left:0;z-index=99999;background-color:black;width:100%;height:100%;color:white">
<h1>Can't touch this</h1>
</div>

The whole block of markup with veils and javascript that calls behaviors is
hidden using css (is part of generated markup, it is just not visible to
user), but I guess that should not be a problem, right?

Any suggestions why the "veil" doesn't work?

Thanks in advance.
Martin
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Automatic-Ajax-after-page-load-and-redirect-to-PageExpiredErrorPage-tp3220405p3220933.html
Sent from the Users forum mailing list archive at Nabble.com.

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

Reply via email to