Hello, Andreas.

I've got sometime such behaviour with gif no animated, but it seems to be IE bug - never I see that bug in Opera or FF, only IE (IE8 to be exact).

On 19.03.2012 16:01, Reiche, Andreas wrote:
Yep,
The gif is shown, but not animated.

For clarification (think i have to explain a little bit more):
My gif is added as a normal Image.
I have an AjaxDownloadBehaviour which is subclassed from AbstractAjaxBehaviour.
Basicly it's the one shown here
https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html
This behaviour is added to the page.

Then the AjaxLink is added to the page. In the onClick() i set the image 
visibility to true and add the component to the
Target. Additionally i call the javaScript function whith the callBackUrl of an 
AbstractDefaultAjaxBehavior which is added
To the Link.

So the flow is as follows:
AjaxLink is clicked:
indicatorImage is set to visible. JavaScript function is called with callBack 
url of behaviour.
JavsScript function put some parameters to URL and calls wicketAjaxGet.
In respond method of AbstractDefaultAjaxBehavior:
PDF is generated as byteArray.
indicatorImage visibility is set to false.
Download#initiate() is called with requestTarget and there window.location.href 
is set like in provided link.

All this works very well despite the fact that after the first attempt the gif 
is not animated anymore.

Btw, i used the Ajax download in another page of my app, where i don't have to 
call a javaScript function,
as all parameters are known on server side, and there the problem does not 
exist.
This leads me to the assumption that it has something to do with the 
wicketAjaxGet call.

Greets
Andreas



-----Ursprüngliche Nachricht-----
Von: Martin Grigorov [mailto:mgrigo...@apache.org]
Gesendet: Montag, 19. März 2012 09:39
An: users@wicket.apache.org
Betreff: Re: Problem with gif Indicator after call of wicketAjaxGet

Hi,

On Mon, Mar 19, 2012 at 10:17 AM, Reiche, Andreas
<andreas.rei...@lgln.niedersachsen.de>  wrote:
Hi,
I have a problem with the rendering of animated gifs after a call to
wicketAjaxGet.
I have the following situation.
In a webPage i have an AjaxLink which basicly returns an on-the-fly
created pdf Document for download.
As the generation needs some time i show an animated gif to the user to
inform him that the server is still busy.

The AjaxLink calls a javascript function with the callback URL of an
AbstractDefaultAjaxBehavior.
The javascript function puts some parameters to the callback URL and
calls wicketAjaxGet.
In the AbstractDefaultAjaxBehavior's respond method i take the URL
Parameters and create the pdf.(Taken fro WIKI)

This works fine for the first time. The gif Animation works and i get
the PDF for download.

But after that if i click the AjaxLink again the gif Animation is not
animated anymore.
It just shows the first frame of the animation.
What do you mean by "first frame" ? It shows the gif but it doesn't animate ?

Wicket just uses CSS display property to show/hide the gif. It doesn't
do anything related to the animation itself.
There was a bug in Wicket which is fixed in 1.5.5 and 6.0 but it was
that the gif didn't disappear in some conditions. So it doesn't sound
like your problem.

The same for another animated gif in another component in the page (it's
a OpenLayersMap added through WicketOpenLayers integration).

It will only work after a complete reload of the page (which is not an
option, because of the state of the openLayersMap).

As i'm not a javaScript guru, can anybody advise were to look for that
the gif is not animated anymore?

Thanks
Andreas Reiche


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




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

Reply via email to