FileUploadWidget
@Deprecated public class FileUploadWidget extends org.apache.wicket.markup.html.panel.Panel
FileUploadWidgetSettings
.Constructor and Description |
---|
FileUploadWidget(String id,
FileUploadWidgetSettings settings)
Deprecated.
|
FileUploadWidget(String id,
FileUploadWidgetSettings settings,
FileUploadValidationService validator)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getAjaxIndicatorId()
Deprecated.
Traverse up the component tree in search for an IAjaxIndicatorAware component is used to indicate a busy state
while uploading.
|
String |
getAjaxIndicatorStopScript()
Deprecated.
|
String |
getStartAjaxUploadScript()
Deprecated.
Components that embed a FileUploadWidget might have their own actions for triggering the upload, this method
returns the javascript call to initiate it.
|
String |
hasFileSelectedScript()
Deprecated.
|
boolean |
isFlashUpload()
Deprecated.
Detect if flash is installed and if the correct version of the flash plugin is found.
|
protected void |
onBeforeRender()
Deprecated.
Check if the client supports flash by looking up the WebAppBehavior in the page which test the client for flash
on the first load and saves the version.
|
protected void |
onFileUpload(org.apache.wicket.markup.html.form.upload.FileUpload fileUpload)
Deprecated.
Hook method for subclasses to handle an upload once it has passed validation.
|
protected void |
onFinishAjaxUpload(org.apache.wicket.ajax.AjaxRequestTarget target)
Deprecated.
|
void |
onFinishHtmlUpload()
Deprecated.
The HTML4 upload collects the new files after the form has been fully posted to the server.
|
protected void |
onFinishUpload()
Deprecated.
|
protected void |
renderFlashUpload()
Deprecated.
|
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
Deprecated.
|
protected void |
renderJavascriptUpload()
Deprecated.
|
getWebPage, getWebRequest, getWebResponse, getWebSession
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onComponentTag, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public FileUploadWidget(String id, FileUploadWidgetSettings settings)
public FileUploadWidget(String id, FileUploadWidgetSettings settings, FileUploadValidationService validator)
public void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead
in interface org.apache.wicket.markup.html.IHeaderContributor
renderHead
in class org.apache.wicket.Component
protected void onBeforeRender()
onBeforeRender
in class org.apache.wicket.Component
protected String getAjaxIndicatorId()
protected void renderFlashUpload()
public boolean isFlashUpload()
true
if flash and the correct version is detected, false
otherwisepublic String getStartAjaxUploadScript()
protected void renderJavascriptUpload()
protected void onFinishAjaxUpload(org.apache.wicket.ajax.AjaxRequestTarget target)
public void onFinishHtmlUpload()
Page
. But even though the request is marked as ajax, no
AjaxRequestTarget
is found in the RequestCycle
. This leads to a redirect in the
response which in turn is handled by the hidden Iframe and renders the application in a locked state.
To fix this we simply ensure that a request marked as ajax has a corresponding AjaxRequestTarget
.protected final void onFinishUpload()
protected void onFileUpload(org.apache.wicket.markup.html.form.upload.FileUpload fileUpload)
fileUpload
- The uploaded filepublic String getAjaxIndicatorStopScript()
public String hasFileSelectedScript()
Copyright © 2007–2015 Hippo B.V. (http://www.onehippo.com). All rights reserved.