Enum AjaxDownloadBehavior.Location
- java.lang.Object
-
- java.lang.Enum<AjaxDownloadBehavior.Location>
-
- org.apache.wicket.extensions.ajax.AjaxDownloadBehavior.Location
-
- All Implemented Interfaces:
Serializable
,Comparable<AjaxDownloadBehavior.Location>
- Enclosing class:
- AjaxDownloadBehavior
public static enum AjaxDownloadBehavior.Location extends Enum<AjaxDownloadBehavior.Location>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description Blob
The resource will be downloaded into ablob
.IFrame
The resource will be downloaded via a temporary created iframe, the resource has to be aContentDisposition.ATTACHMENT
.NewWindow
The resource will be downloaded in a new browser window by using JavaScriptwindow.open()
API, the resource has to be aContentDisposition.INLINE
.SameWindow
The resource will be downloaded by changing the location of the current DOM document, the resource has to be aContentDisposition.ATTACHMENT
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Enum Constant Detail
-
Blob
public static final AjaxDownloadBehavior.Location Blob
The resource will be downloaded into ablob
.This is recommended for modern browsers.
-
IFrame
public static final AjaxDownloadBehavior.Location IFrame
The resource will be downloaded via a temporary created iframe, the resource has to be aContentDisposition.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!
-
SameWindow
public static final AjaxDownloadBehavior.Location SameWindow
The resource will be downloaded by changing the location of the current DOM document, the resource has to be aContentDisposition.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!
-
NewWindow
public static final AjaxDownloadBehavior.Location NewWindow
The resource will be downloaded in a new browser window by using JavaScriptwindow.open()
API, the resource has to be aContentDisposition.INLINE
.
-
-
Method Detail
-
values
public static AjaxDownloadBehavior.Location[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AjaxDownloadBehavior.Location c : AjaxDownloadBehavior.Location.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AjaxDownloadBehavior.Location valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-