This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Creating HtmlInputFileUpload in Java code" Watch "Creating HtmlInputFileUpload in Java code" New topic

Creating HtmlInputFileUpload in Java code

Steve Kirkby

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??

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:

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:
subject: Creating HtmlInputFileUpload in Java code
It's not a secret anymore!