File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes <p:graphic image> in conjuction with <p:fileupload> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "<p:graphic image> in conjuction with <p:fileupload>" Watch "<p:graphic image> in conjuction with <p:fileupload>" New topic
Author

<p:graphic image> in conjuction with <p:fileupload>

Vladislav Simovic
Ranch Hand

Joined: Feb 03, 2011
Posts: 37
I ve been trying out fileupload and its working quite alright. However i ve written piece of code in fileuploadlistener thats not working quite alright. This is how my listenet looks like:



this is xhtml


However when i enter the new image via fileuploader nothing happens. Method enterImage is called, and all action are done, but image is not displayed on panel. What am I missing?
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218
Have you added the listener to web.xml? also include your enclosing <h:form ...> tag.
What versions are you using of everything etc.... put more thought into asking the
question.
Claudionor Junior
Greenhorn

Joined: Jun 07, 2011
Posts: 1
Hi. Have you solved your problem? I´m facing the same issue and can´t get a single solution.

I´m using a fileUpload and wanna show the image uploaded in a dataTable just after the upload event but the image doesn´t appear.


Thanks.
Oscar Barrofet
Greenhorn

Joined: Sep 16, 2011
Posts: 1
just as it is mentioned in this forum.

http://stackoverflow.com/questions/4388441/primefaces-fileupload-event-not-firing-jsf-2-0


1) you have to edit the web.xml to add the filter mapping for upload (as mentioned by brendan):



2) you need two dependencies added in the classpath of the project:

http://commons.apache.org/fileupload/download_fileupload.cgi
http://commons.apache.org/io/download_io.cgi

3) Also check you have server as STATE_SAVING_METHOD in web.xml


4) ! it's worth having a look to the prime faces user guide (the dependencies stuff is explained in page 12.

http://primefaces.googlecode.com/files/primefaces_users_guide_2_2.pdf,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: <p:graphic image> in conjuction with <p:fileupload>
 
Similar Threads
calling back bean
Primefaces fileupload inside a menu button -Two Progress bars issue
upload file jsf
primefaces fileupload doesn't work
Problem using a list with piechart