THIS
- Self-referential generic THISpublic interface FluentUpload<THIS extends FluentUpload<THIS>> extends FluentAbstractComponent<THIS>, FluentComponent.FluentFocusable<THIS>
Upload
Upload
FluentComponent.FluentFocusable<C extends FluentComponent.FluentFocusable<C>>
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
Modifier and Type | Method and Description |
---|---|
default THIS |
withButtonCaption(String buttonCaption)
In addition to the actual file chooser, upload components have button
that starts actual upload progress.
|
default THIS |
withChangeListener(com.vaadin.ui.Upload.ChangeListener listener)
Adds a filename change event listener
|
default THIS |
withFailedListener(com.vaadin.ui.Upload.FailedListener listener)
Adds the upload interrupted event listener.
|
default THIS |
withFinishedListener(com.vaadin.ui.Upload.FinishedListener listener)
Adds the upload received event listener.
|
default THIS |
withImmediateMode(boolean immediateMode)
Sets the immediate mode of the upload.
|
default THIS |
withProgressListener(com.vaadin.ui.Upload.ProgressListener listener)
Adds the upload progress event listener.
|
default THIS |
withStartedListener(com.vaadin.ui.Upload.StartedListener listener)
Adds the upload started event listener.
|
default THIS |
withSucceededListener(com.vaadin.ui.Upload.SucceededListener listener)
Adds the upload success event listener.
|
withCaption, withCaptionAsHtml, withComponentError, withData, withDescription, withDescription, withLocale, withResponsive, withShortcutListener, withStyleName
withAttachListener, withDetachListener
withContextClickListener
addContextClickListener, removeContextClickListener
withTabIndex
withCaption, withEnabled, withIcon, withId, withParent, withPrimaryStyleName, withStyleName, withStyleName, withVisible
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
withFullHeight, withFullSize, withFullWidth, withHeight, withHeight, withSize, withUndefinedHeight, withUndefinedSize, withUndefinedWidth, withWidth, withWidth
default THIS withChangeListener(com.vaadin.ui.Upload.ChangeListener listener)
listener
- the Listener to add, not nullUpload.addChangeListener(ChangeListener)
default THIS withFailedListener(com.vaadin.ui.Upload.FailedListener listener)
listener
- the Listener to be added, not nullUpload.addFailedListener(FailedListener)
default THIS withFinishedListener(com.vaadin.ui.Upload.FinishedListener listener)
listener
- the Listener to be added, not nullUpload.addFinishedListener(FinishedListener)
default THIS withProgressListener(com.vaadin.ui.Upload.ProgressListener listener)
listener
- the progress listener to be addedUpload.addProgressListener(ProgressListener)
default THIS withStartedListener(com.vaadin.ui.Upload.StartedListener listener)
listener
- the Listener to be added, not nullUpload.addStartedListener(StartedListener)
default THIS withSucceededListener(com.vaadin.ui.Upload.SucceededListener listener)
listener
- the Listener to be added, not nullUpload.addSucceededListener(SucceededListener)
default THIS withButtonCaption(String buttonCaption)
In case the button text is set to null, the button is hidden. In this
case developer must explicitly initiate the upload process with
Upload.submitUpload()
.
In case the Upload is used in immediate mode using
Upload.setImmediateMode(boolean)
, the file choose (html input with type
"file") is hidden and only the button with this text is shown.
Note the string given is set as is to the button. HTML formatting is not stripped. Be sure to properly validate your value according to your needs.
buttonCaption
- text for upload components button.Upload.setButtonCaption(String)
default THIS withImmediateMode(boolean immediateMode)
If the upload is in immediate mode, the file upload is started immediately after the user has selected the file.
If the upload is not in immediate mode, after selecting the file the user must click another button to start the upload.
The default mode of an Upload component is immediate.
immediateMode
- true
for immediate mode, false
for notUpload.setImmediateMode(boolean)
Copyright © 2017 Jean-Christophe Fortier. All rights reserved.