diff options
Diffstat (limited to 'server/src/com/vaadin')
-rw-r--r-- | server/src/com/vaadin/server/Page.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/Page.java b/server/src/com/vaadin/server/Page.java index 19b84381d5..3b96ec2ee1 100644 --- a/server/src/com/vaadin/server/Page.java +++ b/server/src/com/vaadin/server/Page.java @@ -868,18 +868,33 @@ public class Page implements Serializable { /** * Navigates this page to the given URI. The contents of this page in the * browser is replaced with whatever is returned for the given URI. + * <p> + * This method should not be used to start downloads, as the client side + * will assume the browser will navigate away when opening the URI. Use one + * of the {@code Page.open} methods or {@code FileDownloader} instead. + * + * @see #open(String, String) + * @see FileDownloader * * @param uri * the URI to show */ public void setLocation(String uri) { - openList.add(new OpenResource(uri, null, -1, -1, BORDER_DEFAULT, false)); + openList.add(new OpenResource(uri, "_self", -1, -1, BORDER_DEFAULT, + false)); uI.markAsDirty(); } /** * Navigates this page to the given URI. The contents of this page in the * browser is replaced with whatever is returned for the given URI. + * <p> + * This method should not be used to start downloads, as the client side + * will assume the browser will navigate away when opening the URI. Use one + * of the {@code Page.open} methods or {@code FileDownloader} instead. + * + * @see #open(String, String) + * @see FileDownloader * * @param uri * the URI to show |