I am using a File Upload Component to allow users to browse to the file, and choose one. I do not want to upload the file but just get the File Path. I am able to do this without any problem. However, there are value change events that cause form submit and if the user selected/chose the file before these events then the value is lost. I want to retain the chosen file path in the Upload component even after form submits caused by value change events.Is there any way to handle this?
Seems Like I will have to invest the time in a creating a custom File Chooser Component (Similar to one in Swing) ! [ November 14, 2008: Message edited by: Kavita Tipnis ]
Joined: Sep 21, 2008
After pondering on how to implement a file chooser component, I came up with a work around and I feel like sharing it with all the ranchers! Problem - Choosing a file path,saving only the path and no file upload, any other form submit (such as value change) would cause the upload component(Tomahawk,Richfaces woodstock...)to lose it's value causing user annoyance! Solution/Work Around - I created the file upload component in another jsf page and on submitting that page I take the value of the Uploaded File and put it on the required page.
Here is the code