You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.crud.

Class Crud.CancelEvent<E>

  • Type Parameters:

    E - the bean type

    All Implemented Interfaces:

    Serializable

    Enclosing class:

    Crud<E>

    @DomEvent("cancel")
    public static class Crud.CancelEvent<E>
    extends ComponentEvent<Crud<E>>

    Event fired when the user cancels the creation of a new item or modifications to an existing item.

    See Also:

    Serialized Form

    • Constructor Detail

      • CancelEvent

        public CancelEvent​(Crud<E> source,
                           boolean fromClient,
                           @EventData("event.preventDefault()")
                           Object ignored)

        Creates a new event using the given source and indicator whether the event originated from the client side or the server side.

        Parameters:

        source - the source component

        fromClient - true if the event originated from the client

        ignored - an ignored parameter for a side effect

    • Method Detail

      • getItem

        public E getItem()

        Gets the item being currently edited.

        Returns:

        the item being currently edited