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: 17250
Location: Cybertron

Not supported at the moment.

andyba User avatar
Expert Member

Posts: 2475
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 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

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: 17250
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.

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?

<p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}" 

achieve that?

Posts: 17250
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.

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


Return to General