Thank you much for the explanation and the tip. I'll try it out.

-a

On 12 July 2010 18:32, Levi Hoogenberg <levihoogenb...@gmail.com> wrote:

> This doesn't work, since the value of the src attribute should be a URL
> that points to image data, not the data itself. Fortunately, there's an easy
> way to create this mapping. In your action bean, you need an event handler
> that streams the image data:
>
> @HandlesEvent("image")
> public Resolution provideImageData() {
>    return new StreamingResolution("image/png") {
>        public void forgotHowThisMethodIsCalled(HttpServletRequest request,
> HttpServletResponse response) throws IoException {
>            response.getWriter().write(imageData, 0, imageData.length);
>        }
>    }
> }
>
> (There are probably all kinds of things wrong with this snippet, but I hope
> that it gives an idea.)
>
> With this method in place, it's a matter of putting a stripes:url in your
> JSP that points to the new event handler. You might want to add a dummy
> parameter (&name=image.png) to convince older browsers that the resource
> really is an image.
>
> Regards,
>  Levi
>
> Op 12 jul. 2010 om 23:32 heeft Aaron Stromas <passog...@gmail.com> het
> volgende geschreven:
>
> > Greetings,
> >
> > May I have a binary valued property in ActionBean? I'de like to render
> <img src="${actionBean.captcha}"/> tag, where the captcha is defined as byte
> array and the getter is provided:
> >
> > private byte[] captcha;
> > public byte getCaptcha() {
> > ...
> > }
> >
> > Stripes fails due to "Unable to find a value for "captcha" in object of
> class... using using operator "."
> >
> > Any suggestions? TIA,
> >
> > -a
> >
> > --
> > Aaron Stromas
> > Mobile: +1 703 203 9169
> >
> >
> ------------------------------------------------------------------------------
> > This SF.net email is sponsored by Sprint
> > What will you do first with EVO, the first 4G phone?
> > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> > _______________________________________________
> > Stripes-users mailing list
> > Stripes-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>



-- 
Aaron Stromas
Mobile: +1 703 203 9169
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to