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 Creating HtmlInputFileUpload in Java code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Creating HtmlInputFileUpload in Java code" Watch "Creating HtmlInputFileUpload in Java code" New topic
Author

Creating HtmlInputFileUpload in Java code

Steve Kirkby
Greenhorn

Joined: Nov 06, 2011
Posts: 1
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

Joined: Dec 06, 2009
Posts: 62

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!


DJ aspirant, Engineering undergraduate, Tokusatsus addicted, fond of English language and Asia's, Buddhist, blogger, etc. I'll need to insert all these attributes in a Java class and manage to create methods for handling my overwhelming life
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating HtmlInputFileUpload in Java code