Class DragAndDropFileUploadEditor
- java.lang.Object
-
- com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer<T>
-
- com.hybris.cockpitng.editor.dndfileupload.AbstractDragAndDropFileUploadEditor<FileUploadResult>
-
- com.hybris.cockpitng.editor.dndfileupload.DragAndDropFileUploadEditor
-
- All Implemented Interfaces:
CockpitEditorRenderer<FileUploadResult>
public class DragAndDropFileUploadEditor extends AbstractDragAndDropFileUploadEditor<FileUploadResult>
Single file upload editor. Accepted params:- accept - specifies the MIME types of files that the server accepts e.g "audio/|video/|image/*"
- maxsize - defines max file size, if not defined then default system value will be used (property fileUpload.maxSize)
- singleLineMode - when set to true upload content and preview will be displayed in single line
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringEDITOR_PREFIX-
Fields inherited from class com.hybris.cockpitng.editor.dndfileupload.AbstractDragAndDropFileUploadEditor
ALLOWED_SIZE_DECIMAL_FORMAT, BYTES_IN_KILOBYTE, DEFAULT_MAX_FILE_SIZE, FILE_UPLOAD_MAX_SIZE, LABEL_DROPCONTENT, LABEL_DROPCONTENT_TOOLTIP, LABEL_UNSUPPORTED_FILETYPE, LABEL_UPLOAD, ON_MAX_FILE_COUNT_EXCEED, PARAM_ACCEPT, PARAM_MAX_SIZE, PARAM_SINGLE_LINE_MODE, UNLIMITED_FILE_SIZE
-
Fields inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
HEADER_LABEL_TOOLTIP, ON_ADD_EVENT, ON_DELETE_EVENT, YW_EDITOR_AREA_LABEL_CONTAINER
-
Fields inherited from interface com.hybris.cockpitng.editors.CockpitEditorRenderer
INITIAL_EDIT_STRING
-
-
Constructor Summary
Constructors Constructor Description DragAndDropFileUploadEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetEditorSclass()protected voidonFileUpload(org.zkoss.zk.ui.Component parent, EditorContext<FileUploadResult> context, EditorListener<FileUploadResult> listener, org.zkoss.zk.ui.event.UploadEvent event)voidrender(org.zkoss.zk.ui.Component parent, EditorContext<FileUploadResult> context, EditorListener<FileUploadResult> listener)Creates a new editor component and attaches it to the specifiedComponentcomponent.protected voidrenderPreview(org.zkoss.zk.ui.Component parent, FileUploadResult uploadResult, EditorContext<FileUploadResult> context, EditorListener<FileUploadResult> listener)protected voidrenderUploadView(org.zkoss.zk.ui.Component parent, EditorContext<FileUploadResult> context, EditorListener<FileUploadResult> listener)-
Methods inherited from class com.hybris.cockpitng.editor.dndfileupload.AbstractDragAndDropFileUploadEditor
addImageZoomPopup, createDropUpload, createFileUpload, createUploadContainer, createUploadContainer, extractUploadedData, getCockpitProperties, getContentImage, getContentTypeImage, getDropAreaConstraintInfo, getMaxFileSize, getObjectPreviewService, getUpload, isCorrectFileSize, isSingleLineModeEnabled, isUploadedMediaAcceptable, matchContentType, readableFileSize, showUnsupportedMediaMessage, toFileUploadResult
-
Methods inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
extractEmbeddedEditor, extractEmbeddedType, findAncestorEditor, findEmbeddedEditors, getInitialEditString, getL10nDecorator
-
-
-
-
Field Detail
-
EDITOR_PREFIX
protected static final java.lang.String EDITOR_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEditorSclass
protected java.lang.String getEditorSclass()
- Specified by:
getEditorSclassin classAbstractDragAndDropFileUploadEditor<FileUploadResult>
-
render
public void render(org.zkoss.zk.ui.Component parent, EditorContext<FileUploadResult> context, EditorListener<FileUploadResult> listener)Description copied from interface:CockpitEditorRendererCreates a new editor component and attaches it to the specifiedComponentcomponent.- Parameters:
parent- parent component the editor should be attached tocontext- the context for the editor creationlistener- the listener to notify the rest of the world about value changes and other events
-
renderUploadView
protected void renderUploadView(org.zkoss.zk.ui.Component parent, EditorContext<FileUploadResult> context, EditorListener<FileUploadResult> listener)
-
onFileUpload
protected void onFileUpload(org.zkoss.zk.ui.Component parent, EditorContext<FileUploadResult> context, EditorListener<FileUploadResult> listener, org.zkoss.zk.ui.event.UploadEvent event)
-
renderPreview
protected void renderPreview(org.zkoss.zk.ui.Component parent, FileUploadResult uploadResult, EditorContext<FileUploadResult> context, EditorListener<FileUploadResult> listener)
-
-