I’ve been pouring over the
documentation last few days trying to figure out how to use dynamically created
images in my application, with no luck. Here’s a little background: The
image is created by supplying a directory path, getWicketServlet().getServletContext().getRealPath(“/tmp”)
in this case, to the image creation method. The method then returns base
file name of the newly created image (example: foo123.png). I have
verified that the images are being created in the supplied directory, but
I’m not sure how or the preferred way of getting them in the application I’ve tried adding the folder
location to the getResourceSettings().addResourceFolder(path)
and then passing the base name to the Image component. This
seems like the ideal solution, but by looking at the error page it seems that
the addResourceFolder() goes unnoticed and as the page only shows current class
package directory (/com/something/foo123.png) as been searched for the image.
I’ve also tried using a ResourceReference new Image(“img”, new
ResourceReference(path+name)), but it never seems to find the
right location of the image. I am able to use the images by sub
classing DynamicImageResource and reading a File object of the image to a byte[]
in the getImageData() method, but that seems like overkill and clunky. There has
to be a way to just specify a url or path in the Image component, doesn’t
there? I’m clearly missing something. Thank you very much for your help, Brian -- |
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user