Re: WebPage for serving binary image data

2008-12-27 Thread Jeremy Thomerson
Although I haven't tested this theory, I used the ThreadLocal because I am fairly sure that the shared resources are shared across threads (multiple simultaneous requests) without synchronization. Therefore, you need to keep the parameters between method invocations, but can't keep it in a normal

Re: WebPage for serving binary image data

2008-12-26 Thread smallufo
Hi , thank you for replying. 2008/12/26 Jeremy Thomerson jer...@wickettraining.com Then, you can include it in your page: JAVA: add(new Image(img, new ResourceReference( WicketApplication.IMAGE_KEY))); HTML: img wicket:id=img / http://localhost:8080/foo

Re: WebPage for serving binary image data

2008-12-26 Thread Jeremy Thomerson
It's not a WebPage because you're not serving a page - it is a mounted resource. Why do you want to force it to be a page? It's a bookmarkable resource - which is what you're serving. The type is set by DynamicImageResource - look in getResourceStream or getResourceState. On Fri, Dec 26, 2008

Re: WebPage for serving binary image data

2008-12-26 Thread smallufo
Thank you, it works ! Though I am not sure why ThreadLocal is needed here ... Anyway , the solution is much pretty than WebPage. BR -- 2008/12/27 Jeremy Thomerson jer...@wickettraining.com It's not a WebPage because you're not serving a page - it is a mounted resource. Why do you want to

WebPage for serving binary image data

2008-12-25 Thread smallufo
Hi I hope I can use wicket to serve image data. I know I can extend org.apache.wicket.markup.html.image.Image and provide a DynamicImageResource but the generated image link is http://localhost/app/?wicket:interface=:0:customImage::IResourceListener:: The image data is stored in the session and

Re: WebPage for serving binary image data

2008-12-25 Thread Nino Martinez
Search the list, use either a resource or a servlet are the conclusion... Like so : package zeuzgroup.web.icons; import org.apache.log4j.Logger; import org.apache.wicket.AttributeModifier; import org.apache.wicket.ResourceReference; import org.apache.wicket.markup.html.image.Image; import

Re: WebPage for serving binary image data

2008-12-25 Thread Jonathan Locke
) at org.apache.wicket.Component.prepareForRender(Component.java:2160) Is this the standard way of outputing binary data ? If not , what is the better way (wicket 1.3.5) ? thanks. -- View this message in context: http://www.nabble.com/WebPage-for-serving-binary-image-data-tp21169289p21169962.html Sent from the Wicket - User

Re: WebPage for serving binary image data

2008-12-25 Thread Jonathan Locke
://www.nabble.com/WebPage-for-serving-binary-image-data-tp21169289p21170251.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail

Re: WebPage for serving binary image data

2008-12-25 Thread jWeekend
://www.nabble.com/WebPage-for-serving-binary-image-data-tp21169289p21171044.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e

Re: WebPage for serving binary image data

2008-12-25 Thread Jeremy Thomerson
) Is this the standard way of outputing binary data ? If not , what is the better way (wicket 1.3.5) ? thanks. -- View this message in context: http://www.nabble.com/WebPage-for-serving-binary-image-data-tp21169289p21171044.html Sent from the Wicket - User mailing list archive at Nabble.com

Re: WebPage for serving binary image data

2008-12-25 Thread smallufo
Well , What I need is parsing URL and generating a corresponding image from BufferedImage , not a bookmarkable link to internal file resource... for example : http://localhost/app/myImage/text/Hello/width/500 This will generate a 500x500 png , containing a Hello String.

Re: WebPage for serving binary image data

2008-12-25 Thread Jeremy Thomerson
I spent a while playing with this, and indeed - it is much more difficult than it should be (or I missed something that one of the core devs can point out. I really hope one of them can review this and point me to an easier way. But in the meantime, this should work for you. First, let's start

Re: WebPage for serving binary image data

2008-12-25 Thread Jeremy Thomerson
Oh, sorry, mean to include that if you add this to a quickstart, you can test with URL: http://localhost:8080/foo http://localhost:8080/foo?text=fffwidth=200 -- Jeremy Thomerson http://www.wickettraining.com On Fri, Dec 26, 2008 at 12:48 AM, Jeremy Thomerson jer...@wickettraining.com wrote: