Package com.vaadin.flow.component.crud
Interface CrudEditor<E>
- Type Parameters:
E
- the bean type
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BinderCrudEditor
Interface representing a crud editor.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the editor.getItem()
Returns the item being edited.getView()
Returns the user interface of an editor.default void
Sets an item to be edited.void
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
Writes any pending input update (if any) to the item.
-
Method Details
-
setItem
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
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 editvalidate
- 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
-