Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

fileupload - filter out files

 
m yasmin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the inputFileUpload tag. I want to filter out displayed files.

Any help will be appreciated.

Thanks,
Yasmin
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
m yasmin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bauke,
Thank you for your response and sorry for posting a question that I thought was related to JSF.

Please allow me to rephrase my question. "Is there a way to filter out displayed files in JSF during file-upload?" I think your answer was no. Am I correct?

Thanks,
Yasmin
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a way, but not using JSF nor plain HTML.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And sorry about my comment about the forum. I was under the impression that this topic was posted at the JSP forum. Either a moderator moved it without notification or I need new glasses.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic