com.vaadin.flow.component.crud.

Interface CrudEditor<E>

  • Type Parameters:

    E - the bean type

    All Superinterfaces:

    Serializable

    All Known Implementing Classes:

    BinderCrudEditor


    public interface CrudEditor<E>
    extends Serializable

    Interface representing a crud editor.

    • Method Summary

      All Methods
      Modifier and Type Method and Description
      void clear()

      Clears the editor.

      E getItem()

      Returns the item being edited.

      Component getView()

      Returns the user interface of an editor.

      default void setItem(E item)

      Sets an item to be edited.

      void setItem(E item, boolean validate)

      Sets an item to be edited.

      boolean validate()

      Runs validations on the data entered into an editor and returns their validity but could also have side-effects such as showing visual indicators for invalid fields.

      void writeItemChanges()

      Writes any pending input update (if any) to the item.

    • Method Detail

      • setItem

        default void setItem(E item)

        Sets an item to be edited. This could be a newly instantiated item or an existing item from the grid. Initial validation will be skipped.

        Parameters:

        item - the item to edit

        See Also:

        setItem(Object, boolean)

      • setItem

        void setItem(E item,
                     boolean validate)

        Sets an item to be edited. This could be a newly instantiated item or an existing item from the grid.

        Parameters:

        item - the item to edit

        validate - if true the item will be validated immediately

      • getItem

        E getItem()

        Returns the item being edited.

        Returns:

        the item being edited

      • clear

        void clear()

        Clears the editor.

      • validate

        boolean validate()

        Runs validations on the data entered into an editor and returns their validity but could also have side-effects such as showing visual indicators for invalid fields.

        Returns:

        true if valid or false if otherwise

      • writeItemChanges

        void writeItemChanges()

        Writes any pending input update (if any) to the item.

      • getView

        Component getView()

        Returns the user interface of an editor.

        Returns:

        the user interface