wood burning stoves*
The moose likes JSF and the fly likes File browser button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "File browser button" Watch "File browser button" New topic
Author

File browser button

J Ferraro
Greenhorn

Joined: Feb 17, 2011
Posts: 1
I am trying to design a form which takes as input a file name. I am not upload this file just storing the file name within a database. I would like to allow the user
to browse to the file to ensure the filename is correct. If I were using plain HTML I could use <input type="file"> . However, this is embedded in a a4j:form which is
doing other things. Is there a JSF component similiar to input type="file"? or is there another way to do this? below is an example of the current working code. It is
using the <h:inputText> tag top capture the file name. I've highlighted the code below with ****** on the line in question.

Joe


Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Hi Joe, welcome to the Ranch!

Just one thing about posting... when you post code, it's nice for it to be formatted. That's why we have the "Code" button above the posting box. If you click it, you'll see a pair of tags appear. If you paste your code between those tags then it comes out nicely formatted. I've edited your post to do that.
roby george
Ranch Hand

Joined: Sep 08, 2010
Posts: 31
hello

<webuijsf:upload binding="#{ThemeAdmin.rightImageFile}" id="rightImageFile" /> (work like input type="file")

need to add xmlns:webuijsf="http://www.sun.com/webui/webuijsf"

thnks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File browser button
 
Similar Threads
Take input from <h:inputText> in rich <modalPanel>
rich modal window submission
Problem using valueChangeListener and onchange
sequence of invoking modal windows in jsf
richfaces modal panel perfromance