Package org.jppf.admin.web.utils
Class AJAXDownload
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.behavior.AbstractAjaxBehavior
org.jppf.admin.web.utils.AJAXDownload
- All Implemented Interfaces:
Serializable,org.apache.wicket.IComponentAwareEventSink,org.apache.wicket.IRequestListener,org.apache.wicket.markup.html.IComponentAwareHeaderContributor,org.apache.wicket.util.io.IClusterable
public abstract class AJAXDownload
extends org.apache.wicket.behavior.AbstractAjaxBehavior
- Author:
- Laurent Cohen
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringOverride this method for a file name which will let the browser prompt with a save/open dialog.protected abstract org.apache.wicket.util.resource.IResourceStreamHook method providing the actual resource stream.voidinitiate(org.apache.wicket.ajax.AjaxRequestTarget target) Call this method to initiate the download.voidMethods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, onBind, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbindMethods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag, renderHeadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.wicket.IRequestListener
rendersPage
-
Constructor Details
-
AJAXDownload
public AJAXDownload() -
AJAXDownload
public AJAXDownload(boolean addAntiCache) - Parameters:
addAntiCache- whether to disable the cache.
-
-
Method Details
-
initiate
public void initiate(org.apache.wicket.ajax.AjaxRequestTarget target) Call this method to initiate the download.- Parameters:
target- .
-
onRequest
public void onRequest() -
getFileName
Override this method for a file name which will let the browser prompt with a save/open dialog.- Returns:
- a file name.
- See Also:
-
ResourceStreamRequestTarget#getFileName()
-
getResourceStream
protected abstract org.apache.wicket.util.resource.IResourceStream getResourceStream()Hook method providing the actual resource stream.- Returns:
- the resource stream.
-