You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marieke Vandamme <ma...@tvh.be> on 2013/12/05 08:30:05 UTC

Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

Dear wicket users, 

We are using the Generic busy indicator found on the wiki to have a busy
indicator for every ajax event. 
https://cwiki.apache.org/confluence/display/WICKET/Generic+Busy+Indicator+%28for+both+Ajax+and+non-Ajax+submits%29#

In that article on the wiki, it's also described how to override that
functionality for a specific ajax event. 
/var clickedElement = (window.event) ? event.srcElement : eventData.target;/
Afterwards the clickedElement can be checked to see if the indicator needs
to be shown or not. 
This is all working fine, but now we have a case where we want to use
AjaxSelfUpdatingTimerBehavior. Then we have no clickedElement.
Would somebody have an idea on how it's possible to retrieve the element
that needs to be updated in the javascript functions for busy indicator? 

Thanks !! Kind regards, Marieke



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
remove the "don't"


On Thu, Dec 5, 2013 at 3:30 PM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> Why just don't pass an attribute that means "do not show progress"... and
> use the same for all AJAX action that do not need to show progress....
>
>
> On Thu, Dec 5, 2013 at 2:58 PM, Marieke Vandamme <ma...@tvh.be>wrote:
>
>> Hi,
>>
>> Okay, I'll do my best to explain more in detail.
>>
>> When doing an ajax call, we want to show a busy indicator on the page, so
>> that the user knows that something is happening and that he must wait for
>> the ajax response. This can be done by adding the Generic busy indicator
>> (as
>> described on the wiki page I linked above). This binds the event before an
>> ajax call with following code:
>> / Wicket.Event.subscribe('/ajax/call/beforeSend', function( attributes,
>> jqXHR, settings ) { showBusysign() });/
>>
>> For some ajax events, it's not needed to show the busy indators. Now we
>> have
>> such a case, with a timer, and we don't want to disturb the customer when
>> doing the ajax call. On the wiki page with the example, it's explained
>> that
>> for specific ajax calls, you can check things, so that the indicator is
>> not
>> showing. But the example is for AjaxLinks, where you have an element that
>> was clicked, and that element can be retrieved with "event.srcElement" in
>> javascript. We use the AjaxSelfUpdatingTimerBehavior, so we don't have an
>> element that is clicked.
>> Is there a way that we can retrieve the element that the timer is put on?
>> Something like "event.srcElement"?
>>
>> I wanted to comment on the wiki article with this question too, but found
>> no
>> way to add comment..
>>
>> Thanks again! Kind Regards, Marieke
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800p4662803.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Why just don't pass an attribute that means "do not show progress"... and
use the same for all AJAX action that do not need to show progress....


On Thu, Dec 5, 2013 at 2:58 PM, Marieke Vandamme <ma...@tvh.be>wrote:

> Hi,
>
> Okay, I'll do my best to explain more in detail.
>
> When doing an ajax call, we want to show a busy indicator on the page, so
> that the user knows that something is happening and that he must wait for
> the ajax response. This can be done by adding the Generic busy indicator
> (as
> described on the wiki page I linked above). This binds the event before an
> ajax call with following code:
> / Wicket.Event.subscribe('/ajax/call/beforeSend', function( attributes,
> jqXHR, settings ) { showBusysign() });/
>
> For some ajax events, it's not needed to show the busy indators. Now we
> have
> such a case, with a timer, and we don't want to disturb the customer when
> doing the ajax call. On the wiki page with the example, it's explained that
> for specific ajax calls, you can check things, so that the indicator is not
> showing. But the example is for AjaxLinks, where you have an element that
> was clicked, and that element can be retrieved with "event.srcElement" in
> javascript. We use the AjaxSelfUpdatingTimerBehavior, so we don't have an
> element that is clicked.
> Is there a way that we can retrieve the element that the timer is put on?
> Something like "event.srcElement"?
>
> I wanted to comment on the wiki article with this question too, but found
> no
> way to add comment..
>
> Thanks again! Kind Regards, Marieke
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800p4662803.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro

Re: Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

Posted by Martin Grigorov <mg...@apache.org>.
Hi,


On Thu, Dec 5, 2013 at 2:58 PM, Marieke Vandamme <ma...@tvh.be>wrote:

> Hi,
>
> Okay, I'll do my best to explain more in detail.
>
> When doing an ajax call, we want to show a busy indicator on the page, so
> that the user knows that something is happening and that he must wait for
> the ajax response. This can be done by adding the Generic busy indicator
> (as
> described on the wiki page I linked above). This binds the event before an
> ajax call with following code:
> / Wicket.Event.subscribe('/ajax/call/beforeSend', function( attributes,
> jqXHR, settings ) { showBusysign() });/
>
> For some ajax events, it's not needed to show the busy indators. Now we
> have
> such a case, with a timer, and we don't want to disturb the customer when
> doing the ajax call. On the wiki page with the example, it's explained that
> for specific ajax calls, you can check things, so that the indicator is not
> showing. But the example is for AjaxLinks, where you have an element that
> was clicked, and that element can be retrieved with "event.srcElement" in
> javascript. We use the AjaxSelfUpdatingTimerBehavior, so we don't have an
> element that is clicked.
> Is there a way that we can retrieve the element that the timer is put on?
> Something like "event.srcElement"?
>

Yes, there is: document.getElementById(attributes.c)


>
> I wanted to comment on the wiki article with this question too, but found
> no
> way to add comment..
>
> Thanks again! Kind Regards, Marieke
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800p4662803.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

Posted by Marieke Vandamme <ma...@tvh.be>.
Hi, 

Okay, I'll do my best to explain more in detail. 

When doing an ajax call, we want to show a busy indicator on the page, so
that the user knows that something is happening and that he must wait for
the ajax response. This can be done by adding the Generic busy indicator (as
described on the wiki page I linked above). This binds the event before an
ajax call with following code:
/ Wicket.Event.subscribe('/ajax/call/beforeSend', function( attributes,
jqXHR, settings ) { showBusysign() });/

For some ajax events, it's not needed to show the busy indators. Now we have
such a case, with a timer, and we don't want to disturb the customer when
doing the ajax call. On the wiki page with the example, it's explained that
for specific ajax calls, you can check things, so that the indicator is not
showing. But the example is for AjaxLinks, where you have an element that
was clicked, and that element can be retrieved with "event.srcElement" in
javascript. We use the AjaxSelfUpdatingTimerBehavior, so we don't have an
element that is clicked. 
Is there a way that we can retrieve the element that the timer is put on?
Something like "event.srcElement"?

I wanted to comment on the wiki article with this question too, but found no
way to add comment.. 

Thanks again! Kind Regards, Marieke



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800p4662803.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Please give more details what exactly is the problem.


On Thu, Dec 5, 2013 at 8:30 AM, Marieke Vandamme <ma...@tvh.be>wrote:

> Dear wicket users,
>
> We are using the Generic busy indicator found on the wiki to have a busy
> indicator for every ajax event.
>
> https://cwiki.apache.org/confluence/display/WICKET/Generic+Busy+Indicator+%28for+both+Ajax+and+non-Ajax+submits%29#
>
> In that article on the wiki, it's also described how to override that
> functionality for a specific ajax event.
> /var clickedElement = (window.event) ? event.srcElement :
> eventData.target;/
> Afterwards the clickedElement can be checked to see if the indicator needs
> to be shown or not.
> This is all working fine, but now we have a case where we want to use
> AjaxSelfUpdatingTimerBehavior. Then we have no clickedElement.
> Would somebody have an idea on how it's possible to retrieve the element
> that needs to be updated in the javascript functions for busy indicator?
>
> Thanks !! Kind regards, Marieke
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>