I am using the inputFileUpload tag. I want to filter out displayed files.
Any help will be appreciated.
Joined: Oct 08, 2006
Use the 'accept' attribute. You're dependent on the web browser used though. Unfortunately almost all modern web browsers ignore it. Only Opera, which usually very strictly follows the w3 specs, uses it.
To get it to work in all web browsers, you can't go around embedding a Java Applet or Java Web Start Application (JNLP) in your JSF page. It runs entirely at the client side. This way you can just use for example the java.io.FileNameFilter to filter files.
That said, in the future please post JSF related questions at the JSF forum. You're talking about Tomahawk's t:inputFileUpload tag, which is a 3rd party JSF component which renders a HTML input type="file" element. It essentially has nothing to do with JSP as it is just a view technology. [ December 23, 2008: Message edited by: Bauke Scholtz ]