Class Upload
-
- org.apache.tapestry5.corelib.base.AbstractField
-
- org.apache.tapestry5.upload.components.Upload
-
- All Implemented Interfaces:
ClientElement
,Field
@Events("validate") public class Upload extends AbstractField
A component to upload a file.
-
-
Field Summary
Fields Modifier and Type Field Description static
MULTIPART_ENCTYPE
-
Fields inherited from class org.apache.tapestry5.corelib.base.AbstractField
cssClass, decorator, defaultProvider, disabled, environment, fieldValidationSupport, formSupport, javaScriptSupport, label, request, resources, validationTracker
-
-
Constructor Summary
Constructors Constructor Description Upload()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterRender(MarkupWriter writer)
protected void
beginRender(MarkupWriter writer)
Render the upload tags.UploadedFile
getValue()
boolean
isRequired()
Returns false; most components do not support declarative validation.protected void
controlName)
Method implemented by subclasses to actually do the work of processing the submission of the form.-
Methods inherited from class org.apache.tapestry5.corelib.base.AbstractField
decorateInsideField, getClientId, getControlName, getLabel, isDisabled, putPropertyNameIntoBeanValidationContext, removePropertyNameFromBeanValidationContext, setDecorator, setFormSupport
-
-
-
-
Field Detail
-
MULTIPART_ENCTYPE
public static final MULTIPART_ENCTYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Upload
public Upload()
-
-
Method Detail
-
processSubmission
protected void controlName)
Description copied from class:AbstractField
Method implemented by subclasses to actually do the work of processing the submission of the form. The element's controlName property will already have been set. This method is only invoked if the field is notdisabled
.- Specified by:
processSubmission
in classAbstractField
- Parameters:
controlName
- the control name of the rendered element (used to find the correct parameter in the request)
-
beginRender
protected void beginRender(MarkupWriter writer)
Render the upload tags.- Parameters:
writer
- Writer to output markup
-
isRequired
public boolean isRequired()
Description copied from class:AbstractField
Returns false; most components do not support declarative validation.- Specified by:
isRequired
in interfaceField
- Overrides:
isRequired
in classAbstractField
- Returns:
- true if a non-blank value is required for the field
- Since:
- 5.4
-
afterRender
public void afterRender(MarkupWriter writer)
-
getValue
public UploadedFile getValue()
-
-