This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems with fileupload JSF  RSS feed

 
wladimir bandeira
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I will start this post telling you what's going on.

The getFile () method this returning null


I'm managing to save the disk image that JSF project





But when I test it on another page I can not succeed, in fact this page is linked to some attributes of an entity.

The pieces I am having difficulty in this page are these;





it's that




And that's the full page






This is my class Bean







this is the error that occurs when I press the save button.





he gives this message because getFile() is NULL


On the page that has successfully getFile () results in this value




So how to fix this problem?


I made some changes before, because before he was giving this error




So with much research I found this post

http://stackoverflow.com/questions/19262356/file-upload-doesnt-work-with-ajax-in-primefaces-4-0-jsf-2-2-x-javax-servlet-s/19381134#19381134

And include this class




After that started to generate current errors

is it because of this class that is doing getFile stay Null?
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's way more code than I have the time to dig around in when I'm not being paid to do it. See if you cannot reduce it to something that all fits on the screen without need for scrolling.

The one thing that I did notice is that you're using an awful lot of JSF and JEE internal services and that brings to mind my #1 rule for JSF:

The more JSF-specific code that's in your JSF app, the more likely it is that you did it wrong.


I think you need to go back and look carefully at the PrimeFaces File Upload documentation - and sample code.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!