• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems with fileupload JSF  RSS feed

wladimir bandeira
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


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
Posts: 18662
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!