Hi,

   Choose for FormFileFilter from the Java File Package, Where you may restrict 
them not to open..Or If you want to go with JavaScript You can restrict bymeans 
of the 

fileName.indexOf(".txt")  != -1 

filename.indexOf(".doc") != -1 

are allowed and remaining any another case is not alllowed in the Else Case..

Regards,
Chandru.



  ----- Original Message ----- 
  From: Chen, Wei 
  To: [email protected] 
  Sent: Thursday, January 04, 2007 7:45 PM
  Subject: Question about using t:inputFileUpload and file type


  Hi,

   

  I use the t:inputFileUpload in my programm. One knows there is a "bowser" 
button beside the file name textfiled. If one clicks this button, a "file 
chose" dialog will be opened  and you can chose any file types. 

   

  Now my question: If I want only the file type of ".txt" and ".doc" to be 
chosen, how can I do that?

   

  Regards

   

  Wei

   

   

  <t:inputFileUpload id="myFileId" value="#{fileuploadBean.myFile}"

              storage="file" required="true" />

Reply via email to