Board index JavaServer Faces General Multiple fileUpload components on one page do not work

Multiple fileUpload components on one page do not work

Components, Ajax Framework, Utilities and More.


Posts: 15076
Location: Cybertron

Not supported at the moment.
PrimeFaces Lead

andyba User avatar
Expert Member

Posts: 2217
Location: Steinfeld, near Bremen/Osnabrück, DE

A simple workaround for this is to have each fileupload in its own page and bind those into the main page using an iframe for each one.
It is a bit clunky but it worked for me.
PF 3.4.2, PF 3.5.10, PF 4.x (Elite versions)
Glassfish 3.1.2.2, Mojarra 2.x, under both Java 6 and Java 7.
If you haven't read the forum rules read them now
My blog: http://onthefaceofthings.blogspot.de/
PrimeFaces Project


Posts: 71
will this issue be fixed soon? using t:inputFileUpload because I need more than one fileupload file per form (using inside tabs...)


Posts: 15076
Location: Cybertron

You can use multiple simple uploaders, limitation applies to advanced uploader. t:inputFileUpload is same as p:fileUpload mode="simple".

Multi advanced file upload is not in immediate roadmap.
PrimeFaces Lead


Posts: 23
Sorry to jump in here but I'm a little bit confused.

I understand that the original requirement appears to be to have multiple fileUpload components. Is this the real requirement or is it to be able to upload multiple files from one form?

Won't
<p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}" 
            mode="advanced" 
            update="messages"   
            multiple="true" 
            sizeLimit="100000"   
            allowTypes="/(\.|\/)(gif|jpe?g|png)$/"/> 


achieve that?


Posts: 15076
Location: Cybertron

Case is having multiple advanced fileupload components in same form, sure you can upload multiple files in one form if you have one advanced uploader.
PrimeFaces Lead


Posts: 23
OK Sorry, I'll keep my nose out then :)

Just thought I'd ask the question just in case the original poster was unaware of the "multiple" functionality.

can we use the two p:fileupload tags for mode =simple in a same page

Previous

Return to General