Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to implement a progress indicator during file download with FileDownloadActionListener in ADF?

vijay dasariMay 19 2025

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>
Comments
Post Details
Added on May 19 2025
2 comments
94 views