Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSF and the fly likes Problem with  t:inputFileUpload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with  t:inputFileUpload" Watch "Problem with  t:inputFileUpload" New topic
Author

Problem with t:inputFileUpload

kkk sivam
Greenhorn

Joined: Sep 04, 2008
Posts: 1
My form contains other components that require validation and
several fileUpload components. If there is a validation error after
submitting the form, the file path is lost in all fileUpload components
and I have to browse again to specify the files to upload. Is there a
way to keep this from happening.

Thanks in advance,
kksb
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
No, the HTML specification already prohibits that (prefilling of the input type="file" element). So JSF can't do much for you here.

This is prohibited by the HTML specification to prevent clients from eventual malicious websites which prefills an input type="file" element with for example "c:/user/passwords.txt" and automatically submits the form on load using Javascript.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with t:inputFileUpload