public class Dropupload extends XulElement
Default HtmlBasedComponent.getZclass()
: z-dropupload.
known supported browser :
known unsupported browser :
HtmlBasedComponent.ExtraCtrl
AbstractComponent.Children
_zclass
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
Constructor and Description |
---|
Dropupload() |
Modifier and Type | Method and Description |
---|---|
Component |
getAnchor()
Return the anchor of dropupload.
|
java.lang.String |
getContent() |
java.lang.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".
|
java.lang.String |
getSuppressedErrors()
Return the suppressed errors setting.
|
java.lang.String |
getViewerClass() |
boolean |
isNative()
Return the setting that treat the upload file as binary or not.
|
protected void |
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing
tags and children.
|
void |
service(AuRequest request,
boolean everError)
Process an AU request.
|
void |
setAnchor(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(java.lang.String value)
Set the content of component, it will be shown depend on detection setting.
|
void |
setDetection(java.lang.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(java.util.Collection<Uploadable.Error> suppressedErrors)
Set the suppressed errors setting.
|
void |
setSuppressedErrors(java.lang.String suppressedErrors)
Set the suppressed errors setting.
|
void |
setViewerClass(java.lang.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, setTooltipAttributes
addSclass, 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, setZIndexDirectly
addAnnotation, 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, willSerialize
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
invalidatePartial
public 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(java.lang.String value)
value
- public java.lang.String getDetection()
setDetection(String)
for more details.public void setViewerClass(java.lang.String value)
value
- custom upload viewer class name.public java.lang.String getViewerClass()
public void setContent(java.lang.String value)
value
- HTML string.setDetection(String)
public java.lang.String getContent()
public void setNative(boolean value)
public boolean isNative()
public void setAnchor(Component anchor)
anchor
- of dropuploadpublic 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 java.lang.String getSuppressedErrors()
Default: null
public void setSuppressedErrors(java.lang.String suppressedErrors)
|
(e.g. missing-required-component|illegal-upload).suppressedErrors
- the suppressed errors settingUploadable.Error
public void setSuppressedErrors(java.util.Collection<Uploadable.Error> suppressedErrors)
suppressedErrors
- the suppressed errors settingUploadable.Error
protected void renderProperties(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponent
renderProperties
in class XulElement
java.io.IOException
public void service(AuRequest request, boolean everError)
Events.ON_UPLOAD
and post UploadEvent
.service
in interface ComponentCtrl
service
in class HtmlBasedComponent
everError
- whether any error ever occurred before
processing this request.HtmlBasedComponent.service(org.zkoss.zk.au.AuRequest, boolean)
Copyright © 2005-2023 Potix Corporation. All Rights Reserved.