wicket.markup.html.form.upload
Class FileUploadField
java.lang.Object
wicket.Component
wicket.MarkupContainer
wicket.markup.html.WebMarkupContainer
wicket.markup.html.form.FormComponent
wicket.markup.html.form.upload.FileUploadField
- All Implemented Interfaces:
- java.io.Serializable
public class FileUploadField
- extends FormComponent
Form component that corresponds to a <input type="file">.
When a FileInput component is nested in a
Form, that has multipart == true, its model
is updated with the FileItemfor this
component.
- Author:
- Eelco Hillenius
- See Also:
- Serialized Form
| Fields inherited from class wicket.Component |
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
| Methods inherited from class wicket.markup.html.form.FormComponent |
add, checkRequired, clearInput, convert, convertValue, error, getConvertedInput, getForm, getInput, getInputName, getLabel, getModelValue, getRawInput, getType, getValidatorKeyPrefix, getValidators, getValue, hasRawInput, inputAsInt, inputAsInt, inputAsIntArray, inputAsStringArray, inputChanged, internalOnModelChanged, invalid, isInputNullable, isPersistent, isRequired, isValid, isValidated, onDetach, onDisabled, onInvalid, onValid, processInput, setLabel, setModelValue, setModelValue, setPersistent, setRequired, setType, valid, validate, validateRequired, validateValidators |
| Methods inherited from class wicket.MarkupContainer |
add, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, internalAdd, internalAttach, internalDetach, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, size, toString, toString, visitChildren, visitChildren |
| Methods inherited from class wicket.Component |
add, addStateChange, checkComponentTag, checkComponentTagAttribute, continueToOriginalDestination, debug, detachBehaviors, detachModel, detachModels, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getApplicationPages, getApplicationSettings, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMetaData, getModel, getModelComparator, getModelObject, getModelObjectAsString, getOutputMarkupId, getPage, getPageFactory, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnAttach, isActionAuthorized, isAncestorOf, isBehaviorAccepted, isEnableAllowed, isEnabled, isHeadRendered, isIgnoreAttributeModifier, isRenderAllowed, isVersioned, isVisible, isVisibleInHierarchy, modelChanged, modelChanging, newPage, newPage, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onEndRequest, onModelChanged, onModelChanging, onRender, redirectToInterceptPage, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderedBehaviors, renderHead, replaceComponentTagBody, replaceWith, resetHeadRendered, sameRootModel, sameRootModel, setAuto, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMetaData, setModelObject, setOutputMarkupId, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FileUploadField
public FileUploadField(java.lang.String id)
- See Also:
Component.Component(String)
FileUploadField
public FileUploadField(java.lang.String id,
IModel model)
- Parameters:
id - See Componentmodel - See Component
getFileUpload
public FileUpload getFileUpload()
- Returns:
- The uploaded file
setModel
public Component setModel(IModel model)
- Description copied from class:
Component
- Sets the given model.
WARNING: DO NOT OVERRIDE THIS METHOD UNLESS YOU HAVE A VERY GOOD REASON
FOR IT. OVERRIDING THIS MIGHT OPEN UP SECURITY LEAKS AND BREAK
BACK-BUTTON SUPPORT.
- Overrides:
setModel in class MarkupContainer
- Parameters:
model - The model
- Returns:
- This
- See Also:
Component.setModel(wicket.model.IModel)
updateModel
public void updateModel()
- Description copied from class:
FormComponent
- Updates this components' model from the request, it expect that the
object is already converted through the convert() call. By default it
just does this:
setModelObject(getConvertedInput());
DO NOT CALL THIS METHOD DIRECTLY UNLESS YOU ARE SURE WHAT YOU ARE DOING.
USUALLY UPDATING YOUR MODEL IS HANDLED BY THE FORM, NOT DIRECTLY BY YOU.
- Overrides:
updateModel in class FormComponent
- See Also:
FormComponent.updateModel()
getInputAsArray
public java.lang.String[] getInputAsArray()
- Description copied from class:
FormComponent
- Gets the request parameters for this component as strings.
- Overrides:
getInputAsArray in class FormComponent
- Returns:
- The values in the request for this component
- See Also:
FormComponent.getInputAsArray()
isMultiPart
public boolean isMultiPart()
- Overrides:
isMultiPart in class FormComponent
- Returns:
- True if this component encodes data in a multipart form submit
- See Also:
FormComponent.isMultiPart()
onComponentTag
protected void onComponentTag(ComponentTag tag)
- Description copied from class:
FormComponent
- Processes the component tag.
- Overrides:
onComponentTag in class FormComponent
- Parameters:
tag - Tag to modify- See Also:
Component.onComponentTag(wicket.markup.ComponentTag)
supportsPersistence
protected boolean supportsPersistence()
- FileInputs cannot be persisted; returns false.
- Overrides:
supportsPersistence in class FormComponent
- Returns:
- True if this type of FormComponent can be persisted.
- See Also:
FormComponent.supportsPersistence()
internalOnDetach
protected void internalOnDetach()
- THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL OR
OVERRIDE.
Clean up at the end of the request. This means closing all inputstreams
which might have been opened from the fileUpload.
- Overrides:
internalOnDetach in class Component
- See Also:
Component.internalOnDetach()
Copyright © 2004-2007 Wicket developers. All Rights Reserved.