Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating HtmlInputFileUpload in Java code

 
Steve Kirkby
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to create a JSF <t:inputFileUpload> component, but in a Java class, not in jsp page.
The code I'm trying is:



I can't get the inputFileUpload to bind to the attribute uploadedFile in the backing bean.
None of the 'setValue' or 'setValueBinding' methods I've tried have worked.

Any suggestions??

Thanks
 
Marcos Silvestri
Ranch Hand
Posts: 62
Chrome Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if you are aware of the RichFaces component <rich:fileUpload> and trying to reinvent the wheel, so I think it's worth sharing this just in case:

http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf

http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_fileUpload.html

If you didn't know about it, and if you are allowed to use RichFaces, this component may fit like a glove. Now, if you do need to proceed as you're doing it, you'd better wait for some more feedback...

Good luck!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic