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

    Modifier and Type
    Method
    Description
    void
    Clears the editor.
    Returns the item being edited.
    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
    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
    Writes any pending input update (if any) to the item.
  • Method Details

    • 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

      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