Class Crud.SaveEvent<E>

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<Crud<E>>
com.vaadin.flow.component.crud.Crud.SaveEvent<E>
Type Parameters:
E - the bean type
All Implemented Interfaces:
Serializable
Enclosing class:
Crud<E>

@DomEvent("save") public static class Crud.SaveEvent<E> extends com.vaadin.flow.component.ComponentEvent<Crud<E>>
Event fired when the user tries to save a new item or modifications to an existing item.
See Also:
  • Field Summary

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    SaveEvent(Crud<E> source, boolean fromClient, Object ignored)
    Creates a new event using the given source and indicator whether the event originated from the client side or the server side.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the item being currently edited.

    Methods inherited from class com.vaadin.flow.component.ComponentEvent

    getSource, isFromClient, unregisterListener

    Methods inherited from class java.util.EventObject

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SaveEvent

      public SaveEvent(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 Details

    • getItem

      public E getItem()
      Gets the item being currently edited.
      Returns:
      the item being currently edited