title: How to update the Vaadin UI from another view
body: <p>In my vaadin application, I am having trouble updating the UI from another view.</p>
  <p>This is the other view:</p>
  <pre><code>public class AbbyWindow extends Window{
  
  private UI ui;
  
  @Autowired
  private Presenter presenter;
  
  @Override
      public void attach() {
          super.attach();
          ui = getUI();
      }
  
  private void saveData(){
      ui.setPollInterval(1000);
      mainUI.showSpinner();
      Presenter.saveData(param,param);
      UI.setCurrent(ui);
      close();
  }
  
  public void notifyUsers(){
      try{
          ui.access(() -&gt; {
             mainUI.hideSpinner();
             Notification.show(&quot;Task completed&quot;));
          });
      }catch(Exception e){
          e.printStackTrace();
      }   
  }   
  
  }
  </code></pre>
  <p>And this is my presenter:</p>
  <pre><code>public class Presenter(){
  
  @Async
  public void saveData(args...){
      
      abbyWindow.notifyUsers();
  
  }
  </code></pre>
  <p>It works If I am in the current view, but if I go to another view I am don't get the notification.</p>
  <p>Do you know what the problem is? Thank you so much in advance.</p>