@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 pl.fhframework.model.forms.FormElement
implements TableComponent<FileUpload>, pl.fhframework.model.forms.IChangeableByClient, pl.fhframework.model.forms.Boundable, pl.fhframework.core.forms.IValidatedComponent, pl.fhframework.io.IFileMaxSized, pl.fhframework.io.IResourced, pl.fhframework.core.forms.IHasBoundableLabel, Styleable
Styleable.Style| Modifier and Type | Field and Description |
|---|---|
static String |
STYLE_ATTR |
protected static String |
VALIDATION_LABEL_ATTR |
PRESENTATION_STYLE_ATTRATTR_STYLE| Constructor and Description |
|---|
FileUpload(pl.fhframework.model.forms.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<pl.fhframework.binding.ActionBinding> |
getAvailablityAffectingActions() |
Optional<pl.fhframework.binding.ActionBinding> |
getEventHandler(pl.fhframework.model.dto.InMessageEventData eventData) |
pl.fhframework.binding.ModelBinding |
getModelBinding() |
org.springframework.core.io.Resource |
getResource() |
List<org.springframework.core.io.Resource> |
getResources() |
void |
init() |
void |
prepareComponentAfterValidation(pl.fhframework.model.dto.ElementChanges elementChanges) |
protected boolean |
processStyleBinding(pl.fhframework.model.dto.ElementChanges elementChanges,
boolean refreshView) |
protected void |
processStylesAndHints(pl.fhframework.model.dto.ElementChanges elementChanges,
List<pl.fhframework.validation.FieldValidationResult> fieldValidationResults) |
void |
setOnUpload(pl.fhframework.binding.ActionBinding onUpload) |
pl.fhframework.binding.IActionCallbackContext |
setOnUpload(pl.fhframework.binding.IActionCallback onUpload) |
void |
updateModel(pl.fhframework.model.dto.ValueChange valueChange) |
protected pl.fhframework.model.dto.ElementChanges |
updateView() |
void |
validate() |
getHeight, getHint, getHintBinding, getHintPlacement, getHintTrigger, getHorizontalAlign, getInlineStyle, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getStyleClasses, getVerticalAlign, getWidth, getWrapperStyle, isPush, refreshElementToForm, refreshView, refreshView, setHeight, setHintBinding, setHintPlacement, setHintTrigger, 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, getGroupingParentComponent, getId, getOnDesignerToolboxDrop, getRawId, getType, hashCode, isArtificial, isGeneratedId, isInitDone, isInvisible, isStopProcessingUpdateView, onProcessingFinish, onProcessingStart, postClone, preConfigureClear, prepareEventDataArgument, refreshAvailability, resetInitDone, setArtificial, setAvailability, setAvailabilityModelBinding, setBindingContext, setGroupingParentComponent, setId, setInvisible, setOnDesignerToolboxDrop, setOnDesignerToolboxDrop, setRawId, setStopProcessingUpdateView, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitdoCopy, getCopy, getCopygetOptionalFormatter, updateBinding, updateBinding, updateBindingForValue, updateBindingForValuegetAllBingings, getId, getLabel, getPresentationStyle, getValidationLabelModelBinding, skipSettingPresentationpublic static final String STYLE_ATTR
protected static final String VALIDATION_LABEL_ATTR
public void init()
init in class pl.fhframework.model.forms.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<pl.fhframework.binding.ActionBinding> getEventHandler(pl.fhframework.model.dto.InMessageEventData eventData)
getEventHandler in interface pl.fhframework.events.IEventSourcegetEventHandler in class pl.fhframework.model.forms.Componentpublic void updateModel(pl.fhframework.model.dto.ValueChange valueChange)
updateModel in interface pl.fhframework.model.forms.IChangeableByClientprotected pl.fhframework.model.dto.ElementChanges updateView()
updateView in class pl.fhframework.model.forms.FormElementprotected boolean processStyleBinding(pl.fhframework.model.dto.ElementChanges elementChanges,
boolean refreshView)
public void validate()
validate in interface pl.fhframework.core.forms.IValidatedComponentpublic void prepareComponentAfterValidation(pl.fhframework.model.dto.ElementChanges elementChanges)
prepareComponentAfterValidation in interface pl.fhframework.core.forms.IValidatedComponentpublic pl.fhframework.binding.ModelBinding getModelBinding()
getModelBinding in interface pl.fhframework.core.forms.IValidatedComponentprotected void processStylesAndHints(pl.fhframework.model.dto.ElementChanges elementChanges,
List<pl.fhframework.validation.FieldValidationResult> fieldValidationResults)
public void setOnUpload(pl.fhframework.binding.ActionBinding onUpload)
public pl.fhframework.binding.IActionCallbackContext setOnUpload(pl.fhframework.binding.IActionCallback onUpload)
public org.springframework.core.io.Resource getResource()
throws FileNotFoundException
getResource in interface pl.fhframework.io.IResourcedFileNotFoundExceptionpublic List<org.springframework.core.io.Resource> getResources() throws FileNotFoundException
getResources in interface pl.fhframework.io.IResourcedFileNotFoundExceptionprotected List<pl.fhframework.binding.ActionBinding> getAvailablityAffectingActions()
getAvailablityAffectingActions in class pl.fhframework.model.forms.ComponentCopyright © 2019. All rights reserved.