Class Crud.NewEvent<E>

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

@DomEvent("new") public static class Crud.NewEvent<E> extends ComponentEvent<Crud<E>>
Event fired when the user starts to create a new item.
See Also:
  • Constructor Details

    • NewEvent

      public NewEvent(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 new item being created
      Returns:
      a new instance of bean type