Class ClientFileSelectEvent
java.lang.Object
com.oorian.messaging.events.Event<ClientFileListener>
com.oorian.messaging.events.client.ClientEvent<ClientFileListener>
com.oorian.messaging.events.client.ClientFileEvent
com.oorian.messaging.events.client.ClientFileSelectEvent
Event fired when the user selects one or more files in a file input element.
This event is dispatched before any upload occurs and provides the names of the selected files. It can be used to validate file selections or update the UI to show which files were chosen.
-
Constructor Summary
ConstructorsConstructorDescriptionClientFileSelectEvent(String[] fileNames) Creates a ClientFileSelectEvent with the specified file names.ClientFileSelectEvent(List<String> fileNames) Creates a ClientFileSelectEvent with the specified file names. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchTo(ClientFileListener listener) Dispatches this event to the specified listener.Returns the list of selected file names.Methods inherited from class com.oorian.messaging.events.client.ClientEvent
getSource, getTarget, setSource, setTarget
-
Constructor Details
-
ClientFileSelectEvent
Creates a ClientFileSelectEvent with the specified file names.- Parameters:
fileNames- an array of selected file names, ornull
-
ClientFileSelectEvent
Creates a ClientFileSelectEvent with the specified file names.- Parameters:
fileNames- a list of selected file names
-
-
Method Details
-
getFileNames
Returns the list of selected file names.- Returns:
- an unmodifiable list of file names
-
dispatchTo
Dispatches this event to the specified listener.Subclasses implement this method to call the appropriate handler method on the listener interface.
- Specified by:
dispatchToin classEvent<ClientFileListener>- Parameters:
listener- the listener to dispatch this event to
-