|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.form.LabeledWebMarkupContainer
org.apache.wicket.markup.html.form.FormComponent
org.apache.wicket.markup.html.form.upload.FileUploadField
public class FileUploadField
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 FileUpload
for this component.
FILE UPLOADS ARE NOT SUPPORTED BY AJAX. USE GOOGLE TO LEARN MORE ABOUT THIS.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.wicket.markup.html.form.FormComponent |
|---|
FormComponent.AbstractVisitor, FormComponent.IVisitor |
| Nested classes/interfaces inherited from class org.apache.wicket.Component |
|---|
Component.ComponentModelChange, Component.EnabledChange, Component.VisibilityChange |
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.markup.html.form.FormComponent |
|---|
FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL, VALUE_SEPARATOR |
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
| Constructor Summary | |
|---|---|
FileUploadField(java.lang.String id)
|
|
FileUploadField(java.lang.String id,
IModel model)
|
|
| Method Summary | |
|---|---|
protected boolean |
forceCloseStreamsOnDetach()
The FileUploadField will close any input streams you have opened in its FileUpload by default. |
FileUpload |
getFileUpload()
|
java.lang.String[] |
getInputAsArray()
Gets the request parameters for this component as strings. |
boolean |
isMultiPart()
|
protected void |
onComponentTag(ComponentTag tag)
Processes the component tag. |
protected void |
onDetach()
Clean up at the end of the request. |
Component |
setModel(IModel model)
Sets the given model. |
protected boolean |
supportsPersistence()
FileInputs cannot be persisted; returns false. |
void |
updateModel()
Updates this components model from the request, it expects that the object is already converted through the convertInput() call that is called by the validate() method when a form is being processed. |
| Methods inherited from class org.apache.wicket.markup.html.form.FormComponent |
|---|
add, checkRequired, clearInput, convertInput, convertValue, error, getBehaviors, getConvertedInput, getForm, getInput, getInputName, getModelValue, getRawInput, getType, getValidatorKeyPrefix, getValidators, getValue, hasRawInput, inputAsInt, inputAsInt, inputAsIntArray, inputChanged, internalOnModelChanged, invalid, isInputNullable, isPersistent, isRequired, isValid, onDisabled, onInvalid, onValid, processChildren, processInput, setConvertedInput, setLabel, setModelValue, setModelValue, setPersistent, setRequired, setType, shouldTrimInput, trim, valid, validate, validateRequired, validateValidators, visitFormComponentsPostOrder |
| Methods inherited from class org.apache.wicket.markup.html.form.LabeledWebMarkupContainer |
|---|
getLabel, setLabelInternal |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getMarkupType, getWebPage |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, size, toString, toString, visitChildren, visitChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileUploadField(java.lang.String id)
Component.Component(String)
public FileUploadField(java.lang.String id,
IModel model)
id - See Componentmodel - See Component| Method Detail |
|---|
public FileUpload getFileUpload()
public Component setModel(IModel model)
ComponentWARNING: 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.
setModel in class MarkupContainermodel - The model
Component.setModel(org.apache.wicket.model.IModel)public void updateModel()
FormComponentsetModelObject(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.
updateModel in class FormComponentFormComponent.updateModel()public java.lang.String[] getInputAsArray()
FormComponent
getInputAsArray in class FormComponentFormComponent.getInputAsArray()public boolean isMultiPart()
isMultiPart in class FormComponentFormComponent.isMultiPart()protected void onComponentTag(ComponentTag tag)
FormComponent
onComponentTag in class FormComponenttag - Tag to modifyComponent.onComponentTag(org.apache.wicket.markup.ComponentTag)protected boolean supportsPersistence()
supportsPersistence in class FormComponentFormComponent.supportsPersistence()protected void onDetach()
onDetach in class FormComponentComponent.onDetach()protected boolean forceCloseStreamsOnDetach()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||