|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Fileupload
A fileupload dialog used to let user upload a file.
There are two ways to use Fileupload
:
You don't create Fileupload
directly. Rather, use
Fileupload.get()
or
Fileupload.get(String, String)
.
You can create it as a component and then listen to the onUpload event (
UploadEvent
). If the cancel button is pressed or file(s) is uploaded,
A non-XUL extension.
Filedownload
Field Summary |
---|
Fields inherited from interface org.zkoss.zk.ui.Component |
---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
Method Summary | |
---|---|
int |
getNumber()
Returns the maximal allowed number of files to upload. |
boolean |
isNative()
Returns whether to treat the uploaded file(s) as binary, i.e., not to convert it to image, audio or text files. |
void |
setNative(boolean alwaysNative)
Sets whether to treat the uploaded file(s) as binary, i.e., not to convert it to image, audio or text files. |
void |
setNumber(int maxnum)
Sets the maximal allowed number of files to upload. |
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent |
---|
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
Methods inherited from interface org.zkoss.zk.ui.ext.Scope |
---|
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute |
Method Detail |
---|
int getNumber()
void setNumber(int maxnum) throws WrongValueException
Default: 1.
maxnum
- the maximal allowed number (positive or negative). The value can be negative, which means no limitation at
all and the end user can upload any numbers he wants
WrongValueException
- if non-positive, or it exceeds 1000boolean isNative()
Default: false.
Configuration.getUploadCharset()
,
Configuration.getUploadCharsetFinder()
void setNative(boolean alwaysNative)
alwaysNative
- whether to treat the uploaded file as binary stream,
regardless its content type. If false (the default), it will
convert to Image
,
Audio
, binary stream, or text files
depending on the content type.Configuration.setUploadCharset(java.lang.String)
,
Configuration.setUploadCharsetFinder(org.zkoss.zk.ui.util.CharsetFinder)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |