Package org.zkoss.zk.ui.event
Class UploadEvent
java.lang.Object
org.zkoss.zk.ui.event.Event
org.zkoss.zk.ui.event.UploadEvent
- All Implemented Interfaces:
Serializable
Represents that user has uploaded one or several files from
the client to the server.
- Author:
- tomyeh
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUploadEvent(String name, Component target, org.zkoss.util.media.Media[] meds) Constructs the upload event. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.zkoss.util.media.MediagetMedia()Returns the first media being uploaded, or null if no file is uploaded.final org.zkoss.util.media.Media[]Returns the array of media being uploaded, or null if the user uploaded no file at all.static UploadEventgetUploadEvent(String name, Component component, AuRequest request) Creates an instance ofUploadEventbased on the event name and component, theUploadEventcontains the upload media(s) from user.Methods inherited from class org.zkoss.zk.ui.event.Event
getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
-
Constructor Details
-
UploadEvent
Constructs the upload event.- Parameters:
meds- the media being uploaded, or null if no file is uploaded. If a zero-length array is passed, null is assumed.
-
-
Method Details
-
getMedia
public final org.zkoss.util.media.Media getMedia()Returns the first media being uploaded, or null if no file is uploaded. -
getMedias
public final org.zkoss.util.media.Media[] getMedias()Returns the array of media being uploaded, or null if the user uploaded no file at all. If non-null is returned, the array length must be at least one. -
getUploadEvent
Creates an instance ofUploadEventbased on the event name and component, theUploadEventcontains the upload media(s) from user. Internal Use Only.- Parameters:
name- event namecomponent- component that triggers the upload eventrequest- An AuRequest object- Returns:
- upload event
- Since:
- 8.6.0
-