Hi Ernesto,

I have it like as following. 


                        @Override
                        public void onSubmit(final AjaxRequestTarget target, 
Form<?> form)
                        {
                                                
                                // The veil and the activity indicator are 
already on when the code gets
here
                                String backupFileNameOnServer = null;
                                
                                try 
                                {
                                        backupFileNameOnServer = 
startBackup(parentPage);
                                } 
                                catch (Exception e) 
                                {
                                        BackupTabPanel.logger.error(e);
                                        
parentPage.getSession().error(e.getMessage());
                                        target.add(parentPage.getFeedback());
                                }
                                        
                                
                                // setup for file download
                                
                                File sourceFile = new 
File(backupFileNameOnServer);
                                String downloadFileName = "backup_config_" + 
getServerName() + "_" +
getTime() + ".tar";
                                
                                
backupFileDownLoadBehaviour.initiate(sourceFile, downloadFileName,
target); 
                                
                                // after this the 
AjaxFileDownloadBehaviour#onResponse is called
                                // then AjaxFileDownloadBehaviour#downloadFile  
 (overridden in the
local instance) is called
                                
                                // The veil and the activity indicator are gone 
by the time code hits
AjaxFileDownloadBehaviour#onResponse.
                        }       


I did not need to use another thread.  Please let me know if you see any
issues with this.  Or a better way of doing this.

Much appreciate your help.

Thanks.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FileDownload-hides-the-activity-indicator-tp4666181p4666259.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to