public class Dropupload
extends org.zkoss.zul.impl.XulElement
Default HtmlBasedComponent.getZclass(): z-dropupload.
known supported browser :
known unsupported browser :
| Constructor and Description |
|---|
Dropupload() |
| Modifier and Type | Method and Description |
|---|---|
org.zkoss.zk.ui.Component |
getAnchor()
Return the anchor of dropupload.
|
String |
getContent() |
String |
getDetection()
Return the detection area setting.
|
int |
getMaxFileCount()
Get the maximum number of files user can upload at once,
when number of upload files exceed the maxFileCount,
nothing will be uploaded and onMaxFileCountExceed event will be triggered,
developer can listen to onMaxFileCountExceed and get the number of upload files by calling
Event.getData()
Default: -1 |
int |
getMaxsize()
Get the max size setting of upload file, unit is "KB".
|
String |
getSuppressedErrors()
Return the suppressed errors setting.
|
String |
getViewerClass() |
boolean |
isNative()
Return the setting that treat the upload file as binary or not.
|
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
service(org.zkoss.zk.au.AuRequest request,
boolean everError)
Process an AU request.
|
void |
setAnchor(org.zkoss.zk.ui.Component anchor)
Set the anchor of dropupload, it allows the dropupload component to anchor to another component
and overlay that component when the user drag & drops files to the browser.
|
void |
setContent(String value)
Set the content of component, it will be shown depend on detection setting.
|
void |
setDetection(String value)
Set drag detection area.
|
void |
setMaxFileCount(int maxFileCount)
Set the maximum number of files user can upload at once,
when number of upload files exceed the maxFileCount,
nothing will be uploaded and onMaxFileCountExceed event will be triggered,
developer can listen to onMaxFileCountExceed and get the number of upload files by calling
Event.getData() |
void |
setMaxsize(int value)
Set the max size of upload file, unit is "KB".
|
void |
setNative(boolean value)
Set the setting that treat the upload file as binary or not.
|
void |
setSuppressedErrors(Collection<org.zkoss.zk.ui.ext.Uploadable.Error> suppressedErrors)
Set the suppressed errors setting.
|
void |
setSuppressedErrors(String suppressedErrors)
Set the suppressed errors setting.
|
void |
setViewerClass(String value)
Set the custom upload viewer class name, if was not specified, will use ZK default upload viewer.
|
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesaddSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyaddAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerializepublic void setMaxsize(int value)
value - negative value is unlimited, 0 will use Configuration.getMaxUploadSize()public int getMaxsize()
setMaxsize(int) for more details.public void setDetection(String value)
value - public String getDetection()
setDetection(String) for more details.public void setViewerClass(String value)
value - custom upload viewer class name.public String getViewerClass()
public void setContent(String value)
value - HTML string.setDetection(String)public String getContent()
public void setNative(boolean value)
public boolean isNative()
public void setAnchor(org.zkoss.zk.ui.Component anchor)
anchor - of dropuploadpublic org.zkoss.zk.ui.Component getAnchor()
public void setMaxFileCount(int maxFileCount)
Event.getData()maxFileCount - the maximum number of files user can upload at once, -1 means no limitationpublic int getMaxFileCount()
Event.getData()
Default: -1public String getSuppressedErrors()
Default: null
public void setSuppressedErrors(String suppressedErrors)
| (e.g. missing-required-component|illegal-upload).suppressedErrors - the suppressed errors settingUploadable.Errorpublic void setSuppressedErrors(Collection<org.zkoss.zk.ui.ext.Uploadable.Error> suppressedErrors)
suppressedErrors - the suppressed errors settingUploadable.Errorprotected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws IOException
renderProperties in class org.zkoss.zul.impl.XulElementIOExceptionpublic void service(org.zkoss.zk.au.AuRequest request,
boolean everError)
Events.ON_UPLOAD and post UploadEvent.service in interface org.zkoss.zk.ui.sys.ComponentCtrlservice in class org.zkoss.zk.ui.HtmlBasedComponentHtmlBasedComponent.service(org.zkoss.zk.au.AuRequest, boolean)Copyright © 2026. All rights reserved.