public static enum AjaxDownloadBehavior.Location extends Enum<AjaxDownloadBehavior.Location>
Enum Constant and Description |
---|
Blob
The resource will be downloaded into a
blob . |
IFrame
The resource will be downloaded via a temporary created iframe, the resource has to be a
ContentDisposition.ATTACHMENT . |
NewWindow
The resource will be downloaded in a new browser window by using JavaScript
window.open() API,
the resource has to be a ContentDisposition.INLINE . |
SameWindow
The resource will be downloaded by changing the location of the current DOM document,
the resource has to be a
ContentDisposition.ATTACHMENT . |
Modifier and Type | Method and Description |
---|---|
static AjaxDownloadBehavior.Location |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AjaxDownloadBehavior.Location[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AjaxDownloadBehavior.Location Blob
blob
.
This is recommended for modern browsers.
public static final AjaxDownloadBehavior.Location IFrame
ContentDisposition.ATTACHMENT
.
This is recommended when there are resources in the DOM which will be closed automatically on JavaScript unload event, like WebSockets. Supports both success and failure callbacks!
public static final AjaxDownloadBehavior.Location SameWindow
ContentDisposition.ATTACHMENT
.
Note: This will trigger JavaScript unload event on the page!
Does not support AjaxDownloadBehavior.onDownloadFailed(AjaxRequestTarget)
callback,
i.e. it is not possible to detect when the download has failed!
public static final AjaxDownloadBehavior.Location NewWindow
window.open()
API,
the resource has to be a ContentDisposition.INLINE
.public static AjaxDownloadBehavior.Location[] values()
for (AjaxDownloadBehavior.Location c : AjaxDownloadBehavior.Location.values()) System.out.println(c);
public static AjaxDownloadBehavior.Location valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2006–2018 Apache Software Foundation. All rights reserved.