title: GWT How to ensure the function has completely executed before reloading the page
body: <p>I have a page which is implemented by GWT,now I want to refresh the page after user click "Submit" button and before finishing executing a service function "SubmitTargets"which is for calling process to execute Linux command like below code showed:</p>
  
  <pre><code>public void onClick(ClickEvent event) {
  
          Object source = event.getSource();
          if (source instanceof Button) {
  
              Button button = (Button) source;
                   if (button == submit){
  
                      iscsiInfo.process = IscsiInfo.Process.SubmitTargets;
  
                      Window.Location.refresh();
  
  }
  </code></pre>
  
  <p>But the refresh method always execute before finishing executing the previous "SubmitTargets", have any idea how to refresh the page after completely executing the service function? Thanks!</p>