Thanks for replying
With
File file = new File("C:/"+getNewAttachment().getFileName());
getNewAttachment().save(file);
I can save image on file, but i dont need it.
With return new
StreamingResolution("image/gif",getNewAttachment().getInputStream()); I can
forward and see the image in browser (only image, without my form) i dont
understand how to keep all form and place new image under stripes:file element
in form
--- El dom, 29/8/10, Grzegorz Krugły <g...@karko.net> escribió:
De: Grzegorz Krugły <g...@karko.net>
Asunto: Re: [Stripes-users] StreamingResolution images
Para: "Stripes Users List" <stripes-users@lists.sourceforge.net>
Fecha: domingo, 29 de agosto, 2010 12:24
The same way you'd put a
String field
in your action bean to service stripes:text element, You'll need to put
FileBean field
for stripes:file one. If you go to Stripes' website, You'll find javadoc
about FileBean, essentially it has two ways of handling uploaded files -
you can save them to disk or get them as a stream (in which case you
have to delete the temp file after processing).
StreamingResolution is also well documented, just give it a stream as
second parameter and it will stream it's contents to the browser. Look
at ByteArrayInputStream and ByteArrayOutputStream in standard Java
libraries - they are useful when manipulating files using a memory
buffer of byte[].
HTH
Grzegorz
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users