Reputation: 11
i have developed an gwt project with java which is something like a web mail.i want to download an attached file in a mail and for this i make a url and use com.google.gwt.user.client.Window.open(url,"_blank", ""); after running this a tab opens and download dialog appears and tab closes but i want to show save download dialog without opening and closing the new tab. i want to have somthing like what gamil or ymail do while downloading attachments. here is my code:
`final String url= "fetchAttachment.service?index="
+ mailData.getId().trim()
+ "&&"
+ "mailboxUid="
+ URL.encodeComponent(mailData
.getMailBoxUid())
+ "&&"
+ "attachmentIndex="
+ mailData.getAttachments().get(i)
.getIndex();
CutLabel tempLabel = new CutLabel(attachemnts
.get(i).getFileName(), 100);
Window.open(url, "_blank", "");`
Upvotes: 1
Views: 960