Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jsf primefaces fileupload on submit

Does anyone know how I can upload multiple files with primefaces (http://www.primefaces.org/showcase/ui/fileUploadMultiple.jsf) when I click my own submit button? The upload-button there should not be visible, because I want to chose the upload-time on my own.

I have multiple pm-fileupload components in my document, so I want to upload them all together.

is there a way? Or must I use the old browser-upload?

like image 807
Niko Avatar asked Jan 01 '26 04:01

Niko


1 Answers

Use multiple <p:fileUpload mode="simple"> generated by a <ui:repeat> or <h:dataTable>.

The <p:fileUpload mode="advanced"> indeed isn't suitable for this requirement, or you must turn on automatic immediate upload on select by adding auto="true".

like image 160
BalusC Avatar answered Jan 02 '26 21:01

BalusC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!