AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

View: New views
5 Messages — Rating Filter:   Alert me  

AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

by Artur W. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

I have a RefreshingView.

To each item I add AjaxSelfUpdatingTimerBehavior

    item.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(10)) {
        @Override
        protected void onPostProcessTarget(AjaxRequestTarget target) {
                             System.out.println("called");
        }

In the RefreshingView I have 6 items.

What is strange the method onPostProcessTarget is called only for 1-4 of them. Is is completely random. But it is never called for all of the items. I cannot figure out why?

Is is some limitation in Browser or in AjaxSelfUpdatingTimerBehavior?

I use Wicket 1.4M3, and FF3.03 and IE7.

Thanks,
Artur

Re: AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

by Nino.Martinez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hmm why not put it on the refreshingview or even the page.. Instead of
the cells? Unless it's extremly important the cells are processed at
different times I cant see any reason why to have it on individual
cells. And it will only clutter your js calls putting extra stress on
server and client.

The wicket reflex game uses the one AjaxSelfUpdatingTimerBehavior pr
page approach and it works just fine..

Artur W. wrote:

> Hi!
>
> I have a RefreshingView.
>
> To each item I add AjaxSelfUpdatingTimerBehavior
>
>     item.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(10)) {
>         @Override
>         protected void onPostProcessTarget(AjaxRequestTarget target) {
>                              System.out.println("called");
>         }
>
> In the RefreshingView I have 6 items.
>
> What is strange the method onPostProcessTarget is called only for 1-4 of
> them. Is is completely random. But it is never called for all of the items.
> I cannot figure out why?
>
> Is is some limitation in Browser or in AjaxSelfUpdatingTimerBehavior?
>
> I use Wicket 1.4M3, and FF3.03 and IE7.
>
> Thanks,
> Artur
>  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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


Re: AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

by Artur W. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

Nino.Martinez wrote:
Hmm why not put it on the refreshingview or even the page.. Instead of
the cells? Unless it's extremly important the cells are processed at
different times I cant see any reason why to have it on individual
cells. And it will only clutter your js calls putting extra stress on
server and client.
Every cell has a different refresh time. The cells show the pictures from different internet's cameras.

Do you know about any limitation when using AjaxSelfUpdatingTimerBehavior?


Thanks in advance,
Artur



Re: AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

by Nino.Martinez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Artur

Im not aware of any limitations. But just add a single general timer,
and add only the pieces that needs to be updated. this should work too.
What are your Duration?

Artur W. wrote:

> Hi!
>
>
> Nino.Martinez wrote:
>  
>> Hmm why not put it on the refreshingview or even the page.. Instead of
>> the cells? Unless it's extremly important the cells are processed at
>> different times I cant see any reason why to have it on individual
>> cells. And it will only clutter your js calls putting extra stress on
>> server and client.
>>
>>    
>
> Every cell has a different refresh time. The cells show the pictures from
> different internet's cameras.
>
> Do you know about any limitation when using AjaxSelfUpdatingTimerBehavior?
>
>
> Thanks in advance,
> Artur
>
>
>
>  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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


Re: AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

by Jeremy Thomerson-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Artur,
  While this is not directly related to your question, you might consider
not using the AjaxSelfUpdatingTimerBehavior at all.  If all you are
refreshing is an IMG tag within a list view, you might consider just adding
your own javascript that reloads that image every N seconds.  Otherwise, you
will incur two hits to the server - one just to repaint the image tag, which
presumably doesn't change because it's pointing to the same URL, and the
second to request the new image, at the same URL.

  Of course, as a side note, anytime you are refreshing an image, you may
want to append a non-used query parameter to the image URL to avoid browser
caching.  Something like:
http://myserver.com/camera1.jpg?timestamp=121212121 (commonly the current
time in milliseconds is used for this).  This can also be done from raw JS
with no Ajax behavior.

Hope this helps,
--
Jeremy Thomerson
http://www.wickettraining.com

On Wed, Oct 1, 2008 at 6:40 AM, Artur W. <a_wronski@...> wrote:

>
> Hi!
>
>
> Nino.Martinez wrote:
> >
> > Hmm why not put it on the refreshingview or even the page.. Instead of
> > the cells? Unless it's extremly important the cells are processed at
> > different times I cant see any reason why to have it on individual
> > cells. And it will only clutter your js calls putting extra stress on
> > server and client.
> >
>
> Every cell has a different refresh time. The cells show the pictures from
> different internet's cameras.
>
> Do you know about any limitation when using AjaxSelfUpdatingTimerBehavior?
>
>
> Thanks in advance,
> Artur
>
>
>
> --
> View this message in context:
> http://www.nabble.com/AjaxSelfUpdatingTimerBehavior---how-many-of-them-I-can-add-to-one-page--tp19757365p19758676.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
LightInTheBox - Buy quality products at wholesale price!