Fileupload"
From Documentation
Line 66: | Line 66: | ||
| 5.0.2 | | 5.0.2 | ||
| May 2010 | | May 2010 | ||
− | | Able to specify a target for the onUpload event. | + | | Able to specify a target for the onUpload event sent by <javadoc method="get()">org.zkoss.zul.Fileupload</javadoc>. Used if the event thread is disabled. |
|} | |} | ||
{{ZKComponentReferencePageFooter}} | {{ZKComponentReferencePageFooter}} |
Revision as of 10:53, 2 September 2010
Fileupload
- Demonstration: FileUpload
- Java API: Fileupload
- JavaScript API: Fileupload
Employment/Purpose
A fileupload dialog used to let user upload a file.The fileupload component is not a modal dialog. Rather, it is a component, so it is placed inline with other components.
Specify the target component
Since 5.0.2, if the event thread is disabled, an onUpload event is posted to all root components when the upload dialog is closed.
If you want the event being sent to a particular component, specify the component in the desktop's attribute called
org.zkoss.zul.Fileupload.target
.
For example,
desktop.setAttribute("org.zkoss.zul.Fileupload.target", mainWindow);
Fileupload.get(); //then mainWindow will receive the onUpload event
Example
<image id="img" />
Upload your hot shot:
<fileupload onUpload="img.setContent(event.media)" />
Supported events
None | None |
Supported Children
*NONE
Use cases
Version | Description | Example Location |
---|---|---|
Version History
Version | Date | Content |
---|---|---|
5.0.2 | May 2010 | Able to specify a target for the onUpload event sent by Fileupload.get(). Used if the event thread is disabled. |