I have an import function which will parse the XML file which contains the version information of the document and save it in database. If user try to upload the already exi
It's not possible to get confirmation from the client during processing on server.
You have two options:
Get overwrite permission before calling your action method e.g. with a checkbox "Overwrite file if exists?" or
You have to stop processing, set a flag and return null to reload current page in browser.
Then you could display the p:dialog
depending on flag status.