myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Wessendorf <mat...@apache.org>
Subject Re: Trinidad input file
Date Wed, 06 Jan 2010 11:34:46 GMT
Hello,

2010/1/6 Ângelo Dias <agdias@live.it>:
>
> Hi folks,
>
>
>
> First of all, I would like to say sorry either  if my question is too basic or if it
was made in the wrong list.

nope. the users@ list is correct

>
>
>
> I´m trying the input file component and I´m confused about how to code the file upload.
Since I have already the file input stream, is it enough to read the stream and write
>
> in the local disk?
>
> Should I use Apache Commons File Upload or should I only use the streams to read and
write the file?
>
>
>
> Do you have a piece of code to do this?


Dont use Commons Upload; Trinidad has integrated support for doing uploads.

some documentation:
http://myfaces.apache.org/trinidad/devguide/fileUpload.html

Here is short extract from our demo application, for your requested code sample:

JSPX page:
http://svn.apache.org/repos/asf/myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx

backing bean, that is behind the page:
http://svn.apache.org/repos/asf/myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/UIBean.java

You can download the demo from here:
http://myfaces.apache.org/trinidad/download.html

HTH,
Matthias


>
>
>
> Thanks in advance.
>
>
>
> Ângelo
>
> _________________________________________________________________
> Non sei a casa? Prova il nuovo Web Messenger
> http://www.messenger.it/web/default.aspx



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Mime
View raw message