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
    Constructor
    Description
     
    AJAXDownload(boolean addAntiCache)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Override this method for a file name which will let the browser prompt with a save/open dialog.
    protected abstract org.apache.wicket.util.resource.IResourceStream
    Hook method providing the actual resource stream.
    void
    initiate(org.apache.wicket.ajax.AjaxRequestTarget target)
    Call this method to initiate the download.
    void
     

    Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior

    afterRender, bind, getCallbackUrl, getComponent, onBind, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind

    Methods inherited from class org.apache.wicket.behavior.Behavior

    beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag, renderHead

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      protected String 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.