Class AjaxFileUploadBehavior

    • Constructor Detail

      • AjaxFileUploadBehavior

        public AjaxFileUploadBehavior​(org.apache.wicket.markup.html.WebMarkupContainer container)
    • Method Detail

      • onRequest

        public void onRequest()
      • onBeforeUpload

        protected void onBeforeUpload​(FileUploadInfo fileUploadInfo)
        Event is fired before processing the uploaded file.
      • onUploadError

        protected void onUploadError​(FileUploadInfo fileUploadInfo)
      • preProcess

        protected org.apache.wicket.markup.html.form.upload.FileUpload preProcess​(org.apache.commons.fileupload.FileItem fileItem,
                                                                                  org.apache.wicket.markup.html.form.upload.FileUpload originalFileUpload)
                                                                           throws Exception
        Throws:
        Exception
      • setResponse

        protected void setResponse​(org.apache.wicket.protocol.http.servlet.ServletWebRequest request,
                                   Map<String,​FileUploadInfo> uploadedFiles)
      • wantsHtml

        protected boolean wantsHtml​(org.apache.wicket.protocol.http.servlet.ServletWebRequest request)
        Decides what should be the response's content type depending on the 'Accept' request header. HTML5 browsers work with "application/json", older ones use IFrame to make the upload and the response should be HTML. Read http://blueimp.github.com/jQuery-File-Upload/ docs for more info.
        Parameters:
        request -
      • onAfterUpload

        protected void onAfterUpload​(org.apache.commons.fileupload.FileItem file,
                                     FileUploadInfo fileUploadInfo)
      • onResponse

        protected void onResponse​(org.apache.wicket.protocol.http.servlet.ServletWebRequest request,
                                  Map<String,​FileUploadInfo> uploadedFiles)