com.vaadin.server.

Interface EventTrigger

  • All Superinterfaces:

    Serializable

    All Known Implementing Classes:

    MenuBar.MenuItem

    public interface EventTrigger
    extends Serializable

    Provides support for triggering an event from a given parts of a component or using various events.

    Used by features such as FileDownloader and BrowserWindowOpener to listen to a given event on a given element on the client side. The component is the one responsible for deciding the element and the event to listen to and can communicate this to the client using getPartInformation().

    This is the server side interface.

    If a Component implements this interface, then the corresponding connector on the client side must implement com.vaadin.client.extensions.EventTrigger.

    Since:

    8.4

    • Method Detail

      • getConnector

        AbstractClientConnector getConnector()

        Gets the connector who will be used to offer the file download. Typically a component containing a certain DOM element, which in turn triggers the download.

        Returns:

        the connector for the file download

      • getPartInformation

        String getPartInformation()

        Gets a free form string which identifies which part of the connector that should trigger the download. The string is passed to the connector (FileDownloaderHandler implementor) on the client side.

        For example, MenuBar passes the id of a menu item through this method so that the client side can listen to events for that particular item only.

        Returns:

        a free form string which makes sense to the client side connector