-
1. Re: rich:fileUpload - user can only select one file - allowFlash
runner1 Aug 23, 2010 11:36 AM (in response to runner1)Hi,
I think I know where this is controlled. It is actually controlled by the attribute - allowFlash.
Header 1 Header 2 allowFlash Attribute which allow the component to use the flash module that provides file upload functionality [false, true, auto]. Default value is "false"Code:
Before: (with allowFlash="true"). If you have it defined as true, then the user can select more than one file at a time, and the title of the window shows "Select file(s) to upload by localhost<servername>".
<rich:fileUpload
fileUploadListener="#{fileUploadBean.listener}"
addControlLabel="Select File"
maxFilesQuantity="1"
autoclear="true"
allowFlash="true"
immediateUpload="true">
<a4j:support event="onuploadcomplete" reRender="fileUpload" />
</rich:fileUpload>
After: (allowFlash is removed). If you don't have it defined in the code (its default value is 'false', then the user can only select one file at a time to upload, see the image below. And the title of the window shows "Open". I still hope that we can define the "Open" to something different, such as "Select a file to upload" because it is really to select a file to upload not to open a file to upload. Any ideas how to do it? Thanks.
<rich:fileUploadfileUploadListener="#{fileUploadBean.listener}"addControlLabel="Select File"maxFilesQuantity="1"autoclear="true"immediateUpload="true"><a4j:support event="onuploadcomplete" reRender="fileUpload" /></rich:fileUpload>Thanks.
-
2. Re: rich:fileUpload - user can only select one file - allowFlash
ilya_shaikovsky Aug 23, 2010 11:35 AM (in response to runner1)allowFlash actually not controling the number of files to be selected. It's jsut a flash feature - it's allow multiple selection. And in standard input HTML browser dialog - only one file could be choosen.
But b.t.w. even if you could select more than one in flash mode - only one will be added to list.
P.S. second questions in separate thread. http://community.jboss.org/message/558499#558499
-
3. Re: rich:fileUpload - user can only select one file - allowFlash
runner1 Aug 23, 2010 11:41 AM (in response to ilya_shaikovsky)Thank you for your reply. The following messages are very helpful.
"allowFlash actually not controling the number of files to be selected. It's jsut a flash feature - it's allow multiple selection. And in standard input HTML browser dialog - only one file could be choosen.
But b.t.w. even if you could select more than one in flash mode - only one will be added to list."
Thank you again.
P.S. I am going to another thread for my second question. Thanks.