I am using the Primefaces Fileupload component (Primefaces V.6.2.17) to upload files like this:
upload.xhtml:
<p:fileUpload fileUploadListener="#{uploadView.handleFileUpload}" id="fUpload"
mode="advanced" dragDropSupport="true" multiple="true"
widgetVar="fUploadWid" auto="true" sequential="true" />
uploadView.java:
public void handleFileUpload(FileUploadEvent event) {
//handle fileupload
}
Now I would like to change it so that when the user tries to upload a file, instead of directly calling the handleFileUpload() method, I want it to display a dialog where the user can pick between two upload-modes. Ideally, this would result in either a method handleFileUploadModeA() or a method handleFileUploadModeB() being called.
How can I do that / is this possible with my Primefaces version?