@DesignerControl(defaultWidth=2) @DocumentedComponent(category=INPUTS_AND_VALIDATION, value="Component responsible for file upload", icon="fa fa-upload") @Control(parents={PanelGroup.class,Column.class,ColumnOptimized.class,Tab.class,Row.class,pl.fhframework.model.forms.Form.class,Repeater.class,Group.class}, invalidParents=Table.class, canBeDesigned=true) public class FileUpload extends FormElement implements TableComponent<FileUpload>, IChangeableByClient, Boundable, IValidatedComponent, IFileMaxSized, IResourced, IHasBoundableLabel, Styleable
Component.ComponentAttr, Component.IGenerationUtilsStyleable.Style| Modifier and Type | Field and Description |
|---|---|
static String |
STYLE_ATTR |
protected static String |
VALIDATION_LABEL_ATTR |
ACCESSIBILITY, RESOLUTION_SIZEPRESENTATION_STYLE_ATTRATTR_STYLEON_DROP_COMPONENT, ON_RESIZE_COMPONENT| Constructor and Description |
|---|
FileUpload(Form form) |
| Modifier and Type | Method and Description |
|---|---|
FileUpload |
createNewSameComponent()
Create a new component of the same type.
|
void |
doCopy(Table table,
Map<String,String> iteratorReplacements,
FileUpload clone)
Copies values of attributes with replaced iterators in bindings and actions to a new component of the same type.
|
protected List<ActionBinding> |
getAvailablityAffectingActions() |
Optional<ActionBinding> |
getEventHandler(InMessageEventData eventData) |
ModelBinding |
getModelBinding() |
org.springframework.core.io.Resource |
getResource() |
List<org.springframework.core.io.Resource> |
getResources() |
void |
init() |
void |
prepareComponentAfterValidation(ElementChanges elementChanges) |
protected boolean |
processStyleBinding(ElementChanges elementChanges,
boolean refreshView) |
protected void |
processStylesAndHints(ElementChanges elementChanges,
List<FieldValidationResult> fieldValidationResults) |
void |
setOnUpload(ActionBinding onUpload) |
IActionCallbackContext |
setOnUpload(IActionCallback onUpload) |
void |
updateModel(ValueChange valueChange) |
protected ElementChanges |
updateView() |
void |
validate() |
getHeight, getHint, getHintBinding, getHintPlacement, getHintTrigger, getHintType, getHorizontalAlign, getInlineStyle, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getStyleClasses, getVerticalAlign, getWidth, getWrapperStyle, isPush, refreshElementToForm, refreshView, refreshView, setHeight, setHintBinding, setHintPlacement, setHintTrigger, setHintType, setHorizontalAlign, setInlineStyle, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPush, setStyleClasses, setVerticalAlign, setWidth, setWrapperStyle, tryParseAttributeInPixelOrPercentageUnit, tryParseAttributeInPixelUnit, tryParseAttributeInPixelUnitareModelValuesTheSame, areValuesTheSame, calculateAvailability, clone, convertBindingValueToString, convertBindingValueToString, convertValue, convertValueToString, convertValueToString, createAdHocModelBinding, equals, finalizeReading, generateId, getAccessibilityRules, getAvailability, getAvailabilityModelBinding, getBindingContext, getEventProcessingForm, getForm, getGeneratedIdPrefix, getGenerationUtils, getGroupingParentComponent, getId, getOnDesignerToolboxDrop, getRawId, getType, hashCode, isArtificial, isGeneratedId, isInitDone, isInvisible, isStopProcessingUpdateView, onProcessingFinish, onProcessingStart, postClone, preConfigureClear, prepareEventDataArgument, refreshAvailability, resetInitDone, setArtificial, setAvailability, setAvailabilityModelBinding, setBindingContext, setGenerationUtils, setGroupingParentComponent, setId, setInvisible, setOnDesignerToolboxDrop, setOnDesignerToolboxDrop, setRawId, setStopProcessingUpdateView, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitdoCopy, getCopy, getCopygetOptionalFormatter, updateBinding, updateBinding, updateBindingForValue, updateBindingForValuegetAllBingings, getGroupingParentComponent, getId, getLabel, getPresentationStyle, getValidationLabelModelBinding, skipSettingPresentationgetExtensions, getMaxSizegetLabelModelBindingisDesignActionAllowed, isDesignDeletableisModificationEventpublic static final String STYLE_ATTR
protected static final String VALIDATION_LABEL_ATTR
public FileUpload(Form form)
public void init()
init in class FormElementpublic FileUpload createNewSameComponent()
TableComponentcreateNewSameComponent in interface TableComponent<FileUpload>public void doCopy(Table table, Map<String,String> iteratorReplacements, FileUpload clone)
TableComponentdoCopy in interface TableComponent<FileUpload>table - tableiteratorReplacements - iterator replacementsclone - a new component of the same typepublic Optional<ActionBinding> getEventHandler(InMessageEventData eventData)
getEventHandler in interface IEventSourcegetEventHandler in class Componentpublic void updateModel(ValueChange valueChange)
updateModel in interface IChangeableByClientprotected ElementChanges updateView()
updateView in class FormElementprotected boolean processStyleBinding(ElementChanges elementChanges, boolean refreshView)
public void validate()
validate in interface IValidatedComponentpublic void prepareComponentAfterValidation(ElementChanges elementChanges)
prepareComponentAfterValidation in interface IValidatedComponentpublic ModelBinding getModelBinding()
getModelBinding in interface IValidatedComponentprotected void processStylesAndHints(ElementChanges elementChanges, List<FieldValidationResult> fieldValidationResults)
public void setOnUpload(ActionBinding onUpload)
public IActionCallbackContext setOnUpload(IActionCallback onUpload)
public org.springframework.core.io.Resource getResource()
throws FileNotFoundException
getResource in interface IResourcedFileNotFoundExceptionpublic List<org.springframework.core.io.Resource> getResources() throws FileNotFoundException
getResources in interface IResourcedFileNotFoundExceptionprotected List<ActionBinding> getAvailablityAffectingActions()
getAvailablityAffectingActions in class ComponentCopyright © 2020. All rights reserved.