com.vaadin.flow.component.crud.
Class BinderCrudEditor<E>
- java.lang.Object
-
- com.vaadin.flow.component.crud.BinderCrudEditor<E>
-
Type Parameters:
E
- the bean typeAll Implemented Interfaces:
public class BinderCrudEditor<E> extends Object implements CrudEditor<E>
A CRUD editor that binds editor fields to bean properties using a
Binder
.See Also:
-
-
Constructor Summary
Constructors Constructor and Description BinderCrudEditor(Binder<E> binder)
Initializes a BinderCrudEditor with the given binder and no form view
BinderCrudEditor(Binder<E> binder, Component view)
Initializes a BinderCrudEditor with the given binder and form view
-
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.
boolean
isValid()
Checks whether the data entered into an editor is valid.
void
setItem(E item, boolean validate)
Sets an item to be edited.
void
writeItemChanges()
Writes any pending input update (if any) to the item.
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.crud.CrudEditor
setItem
-
-
-
-
Constructor Detail
-
BinderCrudEditor
public BinderCrudEditor(Binder<E> binder)
Initializes a BinderCrudEditor with the given binder and no form view
Parameters:
binder
- the editor binder
-
-
Method Detail
-
setItem
public void setItem(E item, boolean validate)
Description copied from interface:
CrudEditor
Sets an item to be edited. This could be a newly instantiated item or an existing item from the grid.
Specified by:
setItem
in interfaceCrudEditor<E>
Parameters:
item
- the item to editvalidate
- if true the item will be validated immediately
-
getItem
public E getItem()
Description copied from interface:
CrudEditor
Returns the item being edited.
Specified by:
getItem
in interfaceCrudEditor<E>
Returns:
the item being edited
-
writeItemChanges
public void writeItemChanges()
Description copied from interface:
CrudEditor
Writes any pending input update (if any) to the item.
Specified by:
writeItemChanges
in interfaceCrudEditor<E>
-
clear
public void clear()
Clears the editor. Frees the item, and lazily clears all input fields.
Specified by:
clear
in interfaceCrudEditor<E>
-
isValid
public boolean isValid()
Description copied from interface:
CrudEditor
Checks whether the data entered into an editor is valid.
Specified by:
isValid
in interfaceCrudEditor<E>
Returns:
true if valid or false if otherwise
-
getView
public Component getView()
Description copied from interface:
CrudEditor
Returns the user interface of an editor.
Specified by:
getView
in interfaceCrudEditor<E>
Returns:
the user interface
-
-