Package io.jmix.ui.component
Interface FileMultiUploadField
- All Superinterfaces:
Component,Component.BelongToFrame,Component.Focusable,Component.HasCaption,Component.HasDescription,Component.HasIcon,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,UploadField
- All Known Implementing Classes:
FileMultiUploadFieldImpl
@StudioComponent(xmlElement="fileMultiUpload",
category="Components",
icon="io/jmix/ui/icon/component/fileMultiUpload.svg",
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/file-multi-upload-field.html",
canvasBehaviour=BUTTON,
canvasText="Upload",
canvasTextProperty="caption")
public interface FileMultiUploadField
extends UploadField
Component for uploading files from client to server that supports multiple file selection.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDescribes queue upload complete event.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.UploadField
UploadField.DropZone, UploadField.FileUploadErrorEvent, UploadField.FileUploadEvent, UploadField.FileUploadFinishEvent, UploadField.FileUploadStartEvent -
Field Summary
FieldsFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptionAdds queue upload complete listener.voidClear uploads listGet uploads mapbooleanvoidsetTotalProgressEnabled(boolean totalProgressEnabled) Sets whether total progress should be displayed during files loadingvoidsetTotalProgressFormat(String totalProgressFormat) Sets caption format that will be used in total progress display section.Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndexMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.UploadField
addFileUploadErrorListener, addFileUploadFinishListener, addFileUploadStartListener, getAccept, getDropZone, getDropZonePrompt, getFileSizeLimit, getPasteZone, getPermittedExtensions, setAccept, setDropZone, setDropZonePrompt, setFileSizeLimit, setPasteZone, setPermittedExtensions
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
getUploadsMap
Get uploads map- Returns:
- Map ( UUID - Id of file in Temporary storage, String - FileName )
-
clearUploads
void clearUploads()Clear uploads list -
addQueueUploadCompleteListener
Subscription addQueueUploadCompleteListener(Consumer<FileMultiUploadField.QueueUploadCompleteEvent> listener) Adds queue upload complete listener. It is invoked when all selected files are uploaded to the temporary storage.- Parameters:
listener- a listener to add- Returns:
- a registration object for removing an event listener
-
setTotalProgressEnabled
@StudioProperty(type=BOOLEAN, defaultValue="true") void setTotalProgressEnabled(boolean totalProgressEnabled) Sets whether total progress should be displayed during files loading- Parameters:
totalProgressEnabled- flag indicating whether total progress should be displayed
-
isTotalProgressEnabled
boolean isTotalProgressEnabled()- Returns:
- true if total progress should be displayed, false otherwise
-
setTotalProgressFormat
@StudioProperty(type=LOCALIZED_STRING, defaultValue="msg:///multiupload.totalProgressFormat") void setTotalProgressFormat(String totalProgressFormat) Sets caption format that will be used in total progress display section. Two '%s' placeholders are supported in the format - the first is for current file number, the second is for total file number.
Examples: "File %s of %s", "%s of %s" etc.- Parameters:
totalProgressFormat- caption format which will be used in total progress display section
-
getTotalProgressFormat
String getTotalProgressFormat()- Returns:
- caption format which is used in total progress display section.
- See Also:
-