Problem with display uploaded image files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Problem with display uploaded image files

Hi all,

I was searching (google, books and examples), but i could not find an example that were suitable for me.
i am just writing some small webapp with wicket 1.5-RC5.1 using maven and eclipse.
My Application is able to let users upload Images to:

Folder uploadFolder = new Folder(((File)servletContext.getAttribute("javax.servlet.context.tempdir")).getPath(), "wicket-uploads");

After upload i can see all the images in the folder /projectroot/target/tmp/wicket-uploads.

I save the path to the database and can easyli create File with it. It works so far.
Now i Want to display these images in my Application ? But i dont know how ? In "Wicket Cookbook" and "Wicket in Action" there is no example for this Kind of images.

how can i add such Image to Page ? and how can I add it to a Panel used in :

I want the image and some description to be shown in the Panel on top.

The simple label will be shown using:
 add(new Label("selectedLabel", new PropertyModel<String>(this, "selectedRowLabel")));

the Method 4 it is:
public String getSelectedRowLabel()
        if (selected == null)
            return "No Row selected";
            return selected.getInfo();

Selected is a simple POJO with name desc and imageUrl

I am Thankfull for any Help !!