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
Modifier and TypeInterfaceDescriptionstatic class
Describes 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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.UploadField
UploadField.DropZone, UploadField.FileUploadErrorEvent, UploadField.FileUploadEvent, UploadField.FileUploadFinishEvent, UploadField.FileUploadStartEvent
-
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionAdds queue upload complete listener.void
Clear uploads listGet uploads mapboolean
void
setTotalProgressEnabled
(boolean totalProgressEnabled) Sets whether total progress should be displayed during files loadingvoid
setTotalProgressFormat
(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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods 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:
-