panel.setBody("<center><img src=\"images/ajax-loader.gif\"/></center>")

This seems to create an <img> HTML element with JavaScript with src that is
relative to the current url in the address bar, i.e. the page url.

Wicket behaves properly.
Probably you need to mount the page at a specific url to make it working.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Oct 21, 2016 at 12:47 AM, sorinev <sori...@gmail.com> wrote:

> 1. We extend AjaxButton.
> 2. In renderHead(), we do a JavaScriptReferenceHeaderItem with a
> JavaScriptResourceReference that has a javascript file that is local to our
> class.
> 3. Inside the javascript file there is a yahoo widget panel that does this:
> panel.setBody("<center> <\"images/ajax-loader.gif\"> </center>").
>
> So it appears to be resolved relative to the page. I've tried many
> different
> ways to load an image, but they mostly seem to rely on manually adding a
> html tag in the file and giving it a wicket:id, but this image is not
> loaded
> in the standard wicket component way.
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/7-3-javascript-attached-to-extended-
> AjaxButton-tp4675692p4675858.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to