Window.open(FileResource) does not work...

Hi,

i want to download a FileResource using Window.open(fr, “_blank”) when clicking on a button. Well, only when using FireFox a new windows is opened, using IE8 and Safari 5 (windows version), nothing happens.

here is a small example:


 @Override
  public void init() {

    final Window mainWindow = new Window("TA-Console");    
    this.mainLayout = new VerticalLayout();
    this.mainLayout.setSizeFull();
    mainWindow.setContent(this.mainLayout);
    this.setMainWindow(mainWindow);
    this.setTheme("taconsole");
    
    final Button downloadResultButton = new Button();
    downloadResultButton.setStyleName(BaseTheme.BUTTON_LINK);
    downloadResultButton.setIcon(Images.getThemeResource(Images.BUTTON_DOWNLOAD));
    downloadResultButton.addListener(new ClickListener() {

      @Override
      public void buttonClick(ClickEvent event) {
        final Application app = TAConsole.this;
        final String path = app.getContext().getBaseDirectory().getAbsolutePath() + File.separator + "results" + File.separator;

        final File resultXML = new File("p:/TestSet.xml");

        if (resultXML != null) {
          final FileResource fr = new FileResource(resultXML, app);
          TAConsole.this.getMainWindow().open(fr, "Test Result");
        }
      }
    });

    this.mainLayout.addComponent(downloadResultButton);
  }

VAADIN is 6.4.8… could anyone try if this example works using IE8 or Safari5?

Furthermore, a download dialog would be nice. I searched the forum and found “solutions” overriding the FileResource class, but that did not change anything (now download window, only FireFox opens a new window)… Is there a reliable solution available? The files i want to download were created at runtime…