Fileupload

From Documentation

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

Name
Event Type
None None

Supported Children

*NONE

Use cases

Version Description Example Location
     

Version History

Version Date Content
     



Last Update : 2010/06/29

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.