I take it delete.png is in the same package as SabcActionsPanel.class and they both are in a jar that's placed on your classpath and end up in your deployed folder under WEB-INF\lib.
Have you checked the HTML source code of your page after wicket rendered it on your page and that your <img src="#" wicket:id="deleteImg"/> changed to something like <img src="../some.class.path/delete.png"... >? Try loading that relative SRC in your browser's URL. Can you get to that image? ~ Thank you, Paul Bors On Wed, Mar 27, 2013 at 3:49 AM, Marco Springer <[email protected]> wrote: > The Markup is missing somehow but I'd say the following HTML should do the > trick: > <a wicket:id="delete"> > <img src="#" wicket:id="deleteImg"/> > </a> > > Check the log if it isn't complaining that it can't find the "delete.png" > file.. > > On Tuesday 26 March 2013 16:39:26 grazia wrote: > > The image in the AjaxLink does not display, anyone could help me figure > this > > one out ? > > > > private static final ResourceReference DELETE = new > > PackageResourceReference(SabcActionsPanel.class, "delete.png"); > > > > final AjaxLink deleteLink = new AjaxLink("delete") { > > > > private static final long serialVersionUID = 1L; > > > > public void onClick(AjaxRequestTarget target) { > > target.appendJavaScript("alert('Going to delete!')"); > > } > > }; > > deleteLink.add(new Image("deleteImg", DELETE)); > > deleteLink.setOutputMarkupId(true); > > > > add(deleteLink); > > > > in Html, I have tried: > > > > > > or > > > > <wicket:link> > > > > </wicket:link> > > > > > > > > > > > > > > -- > > View this message in context: > > > http://apache-wicket.1842946.n4.nabble.com/AjaxLink-with-image-tp4657544.ht > > ml Sent from the Users forum mailing list archive at Nabble.com. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] >
