Class ClientFileSelectEvent


public class ClientFileSelectEvent extends ClientFileEvent
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 Details

    • ClientFileSelectEvent

      public ClientFileSelectEvent(String[] fileNames)
      Creates a ClientFileSelectEvent with the specified file names.
      Parameters:
      fileNames - an array of selected file names, or null
    • ClientFileSelectEvent

      public ClientFileSelectEvent(List<String> fileNames)
      Creates a ClientFileSelectEvent with the specified file names.
      Parameters:
      fileNames - a list of selected file names
  • Method Details

    • getFileNames

      public List<String> getFileNames()
      Returns the list of selected file names.
      Returns:
      an unmodifiable list of file names
    • dispatchTo

      public void dispatchTo(ClientFileListener listener)
      Dispatches this event to the specified listener.

      Subclasses implement this method to call the appropriate handler method on the listener interface.

      Specified by:
      dispatchTo in class Event<ClientFileListener>
      Parameters:
      listener - the listener to dispatch this event to