or #onComponentTag() there is also AbstractDefaultAjaxBehavior#configureJson() (or something similar. I have no access to the code now) the idea is to mark the component/attributes somehow On Jul 27, 2013 12:04 AM, "Marios Skounakis" <[email protected]> wrote:
> Martin, > > Thanks for your answer. I'm not sure I understand though. What does mean > "mark any component with data-no-veil attribute"? Use an attribute appender > to do something? If yes what? Where is this "feature" documented? > > Thanks > Marios > > > On Fri, Jul 26, 2013 at 10:21 AM, Martin Grigorov <[email protected] > >wrote: > > > Hi, > > > > You may mark any component with data-no-veil attribute. > > Later you can check with: if ($(attrs.c).data("no-veil") !== null) {...} > > > > > > On Fri, Jul 26, 2013 at 1:40 AM, Marios Skounakis <[email protected]> > > wrote: > > > > > Hi all, > > > > > > I am subscribing to the global ajax call listeners to show and hide a > > veil > > > during ajax calls. The veil is displayed during all ajax calls. I want > a > > > way for some components / ajax behaviors to opt our from the veil. > > > > > > What I'm doing now is adding an extra parameter to the ajaxAttributes > > and I > > > am checking for it in the beforeSend listener as shown in the code > below. > > > > > > Is there a better way to handle this? > > > > > > -- setup > > > > > > Wicket.Event.subscribe('/ajax/call/beforeSend', function( attributes, > > > jqXHR, settings ) { > > > showBusysign(jqXHR) > > > }); > > > Wicket.Event.subscribe('/ajax/call/complete', function( attributes, > > > jqXHR, textStatus) { > > > hideBusysign() > > > }); > > > > > > -- showing the veil: > > > function showBusysign(jqXHR) { > > > if(typeof jqXHR.ep != 'undefined') { > > > for (i=0; i<jqXHR.ep.length; i++) {if (jqXHR.ep[i].name = > > > 'noveil') {return;}}; > > > } > > > // go ahead and show the veil > > > > > > -- java code: > > > @Override > > > protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { > > > super.updateAjaxAttributes(attributes); > > > attributes.getExtraParameters().put("noveil", "1"); > > > } > > > > > > > > > Thanks in advance, > > > Marios > > > > > >
