Hi all,

I built our storefront almost two years ago now, in Wicket 1.2.x.  I'm now
upgrading from 1.2.4 to 1.3 and am just about finished but I'm stuck on one
seemingly simple thing.

My "init()" looks like this:

  public void init()
  {
    //create external images resource
    getSharedResources().add("imageResource", new ImageResource());
  }

I've had this method in my own "hepler" class since this project started:

        public static WebMarkupContainer getImageContainer(String name, String
image)
        {
                //get reference to Application's ResourceReference
                ResourceReference imageResource = new 
ResourceReference("imageResource");
                
                //build URL of image from file
                String imgUrl = RequestCycle.get().urlFor(imageResource) + 
"?file=" +
image;
                
                return getContainer(name, "src", imgUrl);
        }

It just encapsulates my ability to use external images in my app (outside of
the deployed .ear).

I would use it like so, in a Wicket page:

                String thumb = 
"C:\\MYApp\\assets\\images\\category\\Bundles.jpg";
                add(WicketHelper.getImageContainer("bundleThumbImg", thumb));

This always worked fine until the upgrade to 1.3 and change the filter in
web.xml to look at "/*" instead of "home/*" - which I'm guessing had
something to do with it?

Anyhow, the images are all broken even though my path on disk is correct. 
Am I missing something obvious?

Thanks!

-- 
View this message in context: 
http://www.nabble.com/WebMarkupContainer---images-cannot-be-found-after-move-to-1.3--tp16627879p16627879.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to