public class CmsDialogUploadButtonHandler extends java.lang.Object implements I_CmsUploadButtonHandler
构造器和说明 |
---|
CmsDialogUploadButtonHandler(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory)
Creates a new upload button handler.
|
CmsDialogUploadButtonHandler(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory,
java.lang.String targetFolder,
boolean isRootPath)
Creates a new upload button handler.
|
限定符和类型 | 方法和说明 |
---|---|
void |
initializeFileInput(CmsFileInput fileInput)
Custom setup method for newly created file inputs.
|
void |
onChange(CmsFileInput fileInput)
Notifies the button handler that the file input field's value has changed.
|
void |
openDialogWithFiles(java.util.List<CmsFileInfo> files)
Opens the upload dialog for the given file references.
|
void |
setButton(CmsUploadButton button)
This method should be called when the handler is set on a button.
|
void |
setCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> closeHandler)
Sets the close handler for the dialog.
|
void |
setIsTargetRootPath(boolean isTargetRootPath)
Chooses whether the target folder should be interpreted as a root path.
|
void |
setTargetFolder(java.lang.String targetFolder)
Sets the upload target folder.
|
void |
setUploadDialog(A_CmsUploadDialog uploadDialog)
Sets the upload dialog instance.
|
protected void |
updateDialog()
Updates the dialog with the current close handler and target folder.
|
public CmsDialogUploadButtonHandler(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory)
contextFactory
- the context factory to use for upload contextspublic CmsDialogUploadButtonHandler(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory, java.lang.String targetFolder, boolean isRootPath)
contextFactory
- the context factory to use for upload contextstargetFolder
- the target folderisRootPath
- true fi the target folder is a root pathpublic void initializeFileInput(CmsFileInput fileInput)
I_CmsUploadButtonHandler
initializeFileInput
在接口中 I_CmsUploadButtonHandler
fileInput
- the new file inputI_CmsUploadButtonHandler.initializeFileInput(org.opencms.gwt.client.ui.input.upload.CmsFileInput)
public void onChange(CmsFileInput fileInput)
I_CmsUploadButtonHandler
onChange
在接口中 I_CmsUploadButtonHandler
fileInput
- the file inputI_CmsUploadButtonHandler.onChange(org.opencms.gwt.client.ui.input.upload.CmsFileInput)
public void openDialogWithFiles(java.util.List<CmsFileInfo> files)
files
- the file referencespublic void setButton(CmsUploadButton button)
I_CmsUploadButtonHandler
setButton
在接口中 I_CmsUploadButtonHandler
button
- the button for which the handler instance has been setI_CmsUploadButtonHandler.setButton(org.opencms.gwt.client.ui.input.upload.CmsUploadButton)
public void setCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> closeHandler)
closeHandler
- the close handlerpublic void setIsTargetRootPath(boolean isTargetRootPath)
isTargetRootPath
- true if the target folder should be treated as a root pathpublic void setTargetFolder(java.lang.String targetFolder)
targetFolder
- the upload target folderpublic void setUploadDialog(A_CmsUploadDialog uploadDialog)
uploadDialog
- the upload dialog instanceprotected void updateDialog()