I'm working with Oracle JDeveloper 12.2.1.4.0 Studio Edition and have created a popup where users can select different export formats (XLS, XLSX, PDF, CSV). Based on the user's selection, I trigger the corresponding export functionality (Buttons) using <af:fileDownloadActionListener>
.
My challenge is that I need to display a progress indicator while the file is being generated and downloaded, and also prevent users from clicking on other elements during this process.
I've tried implementing this using the userStateEnforcement
approach, but it seems to interfere with the fileDownloadActionListener
functionality, causing the download to fail or not start properly.
What is the recommended way to show a progress indicator during file downloads in ADF while ensuring users can't interact with the page until the download completes?
<af:button text="pdf" id="b9" visible="false"
binding="#{pageFlowScope.bamdashboardBean.hiddenPDFButton}">
<af:fileDownloadActionListener method="#{pageFlowScope.bamdashboardBean.onGeneratePDF}"
contentType="#{pageFlowScope.bamdashboardBean.exportFileContentType}"
filename="#{pageFlowScope.bamdashboardBean.excelName}"/>
</af:button>
<af:button text="csvhtml" id="b10" visible="false"
binding="#{pageFlowScope.bamdashboardBean.hiddenCsvHtmlBind}">
<af:fileDownloadActionListener contentType="#{pageFlowScope.bamdashboardBean.exportFileContentType}"
filename="#{pageFlowScope.bamdashboardBean.excelName}"
method="#{pageFlowScope.bamdashboardBean.onCSVHTMLDownloadListener}"/>
</af:button>
<af:button text="xlsx" id="b2" visible="false"
actionListener="#{pageFlowScope.bamdashboardBean.exportExcel}"
binding="#{pageFlowScope.bamdashboardBean.hiddenExportButtonBind}">
<af:fileDownloadActionListener contentType="#{pageFlowScope.bamdashboardBean.exportFileContentType}"
filename="#{pageFlowScope.bamdashboardBean.excelName}"
method="#{pageFlowScope.bamdashboardBean.onDownloadExcelReport}"/>
</af:button>
<af:button text="xls" id="b11" visible="false"
binding="#{pageFlowScope.bamdashboardBean.hiddenXlsBind}">
<af:fileDownloadActionListener contentType="#{pageFlowScope.bamdashboardBean.exportFileContentType}"
filename="#{pageFlowScope.bamdashboardBean.excelName}"
method="#{pageFlowScope.bamdashboardBean.onDownloadXlsListener}"/>
</af:button>