Package org.opencms.ade.upload.client.ui
Class CmsDialogUploadButtonHandler
java.lang.Object
org.opencms.ade.upload.client.ui.CmsDialogUploadButtonHandler
- All Implemented Interfaces:
I_CmsUploadButtonHandler
Default upload button handler which is used for the upload dialog.
-
Constructor Summary
ConstructorsConstructorDescriptionCmsDialogUploadButtonHandler(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory) Creates a new upload button handler.CmsDialogUploadButtonHandler(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory, String targetFolder, boolean isRootPath) Creates a new upload button handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidinitializeFileInput(CmsFileInput fileInput) Custom setup method for newly created file inputs.voidonChange(CmsFileInput fileInput) Notifies the button handler that the file input field's value has changed.voidopenDialogWithFiles(List<CmsFileInfo> files) Opens the upload dialog for the given file references.voidsetButton(I_CmsUploadButton button) This method should be called when the handler is set on a button.voidsetCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> closeHandler) Sets the close handler for the dialog.voidsetIsTargetRootPath(boolean isTargetRootPath) Chooses whether the target folder should be interpreted as a root path.voidsetPostCreateHandler(String postCreateHandler) Sets the post-create handler.voidsetTargetFolder(String targetFolder) Sets the upload target folder.voidsetUploadDialog(A_CmsUploadDialog uploadDialog) Sets the upload dialog instance.protected voidUpdates the dialog with the current close handler and target folder.
-
Constructor Details
-
CmsDialogUploadButtonHandler
public CmsDialogUploadButtonHandler(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory) Creates a new upload button handler.- Parameters:
contextFactory- the context factory to use for upload contexts
-
CmsDialogUploadButtonHandler
public CmsDialogUploadButtonHandler(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory, String targetFolder, boolean isRootPath) Creates a new upload button handler.- Parameters:
contextFactory- the context factory to use for upload contextstargetFolder- the target folderisRootPath- true fi the target folder is a root path
-
-
Method Details
-
initializeFileInput
Description copied from interface:I_CmsUploadButtonHandlerCustom setup method for newly created file inputs.- Specified by:
initializeFileInputin interfaceI_CmsUploadButtonHandler- Parameters:
fileInput- the new file input- See Also:
-
onChange
Description copied from interface:I_CmsUploadButtonHandlerNotifies the button handler that the file input field's value has changed.- Specified by:
onChangein interfaceI_CmsUploadButtonHandler- Parameters:
fileInput- the file input- See Also:
-
openDialogWithFiles
Opens the upload dialog for the given file references.- Parameters:
files- the file references
-
setButton
Description copied from interface:I_CmsUploadButtonHandlerThis method should be called when the handler is set on a button.- Specified by:
setButtonin interfaceI_CmsUploadButtonHandler- Parameters:
button- the button for which the handler instance has been set- See Also:
-
setIsTargetRootPath
Chooses whether the target folder should be interpreted as a root path.- Parameters:
isTargetRootPath- true if the target folder should be treated as a root path
-
setPostCreateHandler
Sets the post-create handler.- Parameters:
postCreateHandler- the post-create handler
-
setTargetFolder
Sets the upload target folder.- Parameters:
targetFolder- the upload target folder
-
setUploadDialog
Sets the upload dialog instance.- Parameters:
uploadDialog- the upload dialog instance
-
updateDialog
Updates the dialog with the current close handler and target folder.
-