Re: Bookmarkable images from db

2009-12-08 Thread Peter Dotchev
Hi, Actually there is a clean and easy Wicket way to do this. No servlets, no URL hand writing. It is achieved by using a shared resource with parameters as mentioned above. I have described it http://dotev.blogspot.com/2009/11/serving-images-and-other-resources-with.html here . Best regards,

Re: Bookmarkable images from db

2009-12-07 Thread Juan Pablo Picasso
Hi, I've implemented this by mounting a bookmarkable page and writing into the response. I've imagine this bypasses some useful wicket features, but was the only way I use bookmarkable urls like /image/someImageName for mapping user uploaded images: #Application this.mount(new

Re: Bookmarkable images from db

2009-11-02 Thread Peter Dotchev
Hi Alex, I check SharedResources, but as I understand it I would have to add there a Resource object for each image. After checking again the javadoc there might be another way. Display each image with Image constructor that takes ValueMap and provide there some image identification. Add a

Re: Bookmarkable images from db

2009-11-02 Thread James Carman
Just write a servlet (or Spring Web MVC handler). On Mon, Nov 2, 2009 at 10:52 AM, Peter Dotchev dotc...@gmail.com wrote: Hi Alex, I check SharedResources, but as I understand it I would have to add there a Resource object for each image. After checking again the javadoc there might be

Re: Bookmarkable images from db

2009-11-02 Thread Alex Objelean
Exactly. You can see the example posted by Vytautas Racelis earlier at this link: http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-repository/src/main/java/org/xaloon/wicket/component/resource/ImageLink.java I prefer to do it this way: http://pastebin.com/m328e21ff The first example allow

Re: Bookmarkable images from db

2009-11-01 Thread Igor Vaynberg
i would write a servlet. -igor On Sun, Nov 1, 2009 at 1:41 PM, Peter Dotchev dotc...@gmail.com wrote: Hi, My app allows users to upload images and I store them in JCR http://en.wikipedia.org/wiki/Content_repository_API_for_Java. I can get InputStream for each one of them. I want to display

Re: Bookmarkable images from db

2009-11-01 Thread Alex Objelean
Besides the servlet, there is also a wicket way of do it: - Use shared resource, which is stateless and bookmarkable If you need more informations about this approach, search on forum or just ask... and I'll provide you with some examples of how I do it.. Alex Objelean Peter Dotchev wrote:

Re: Bookmarkable images from db

2009-11-01 Thread Vytautas Racelis
Hi, you may find this class useful for your requirements: http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-repository/src/main/java/org/xaloon/wicket/component/resource/ImageLink.java This class takes image from JCR and shows as image. Peter Dotchev wrote: Hi, My app allows users to