Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8899367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:50:15+00:00 2026-06-15T00:50:15+00:00

I have the following code: Button export = new Button(CSV); export.addListener(new ClickListener() { public

  • 0

I have the following code:

Button export = new Button("CSV");
export.addListener(new ClickListener() 
{
    public void buttonClick(ClickEvent event) 
    {
        CsvExport csvExport;
        csvExport = new CsvExport(_table);
        csvExport.setDisplayTotals(false);
        csvExport.setDoubleDataFormat("0");
        csvExport.excludeCollapsedColumns();
        csvExport.setReportTitle("Document title");
        csvExport.setExportFileName("Nome_file_example.csv");
        csvExport.export();

        getWindow().showNotification("Document saved", "The document has been exported.");
    }
}

I would like the notification to appear only after the file has been exported and downloaded, but actually the notification is not working, maybe because it does not “wait” for the statement

csvExport.export();

to finish. If I comment it, the notification works.

Does anybody have any suggestions?

Thanks very much,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:50:17+00:00Added an answer on June 15, 2026 at 12:50 am

    You’ll need to split the work into a separate thread, then provide a way to notify the user ‘later’.

    So, first, create a thread… if you’re on Java EE, use the built-in thread pooling, otherwise use something else (we’re on tomcat, we rolled our own, to allow us better control).

    Then, when you’re done, synchronize your thread, work your way back into your UI class (We use closures from Groovy, but you can make your own listener), and call the method to notify your user. window.showNotification('All Done')

    So here’s the tricky part, you’ve notified your user, but Vaadin has already sent the ‘click’ response back… so the Server part thinks it’s notified the user, but it isn’t able to show the user yet… You’ll need a progress indicator on your page, as it asks the server every 5 seconds if anything has changed.

    There are also some ‘push’ plugins, but I’ve found that most of the places that we we’re spinning up threads, we want to show a ‘loading’ animation, so the progress indicator works well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code snippet: addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) {
I have the following code behind a button in Visual Studio 2010 private void
I have the following code bound to the click event of a button: function
let's suppose to have following code: <body style=overflow: hidden> <div class=wall> <button>New</button> <div class=prova>
I have the following code Button orderButton = new Button(); orderButton.setStyleName(OrderButton); orderButton.getElement().getStyle().setProperty(marginTop, 35px); The
I have the following code: JButton button = new JButton("Clear"); button.addActionListener(this); As far as
I have the following code which creates a new Button with a ContextMenu with
I have the following code that responds to a button click, changes the view
I have the following code which takes a touch on one button and draws
I have the following css code. button.png is image where 3 button states are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.