Package com.vaadin.flow.component.crud
Class BinderCrudEditor<E>
- java.lang.Object
-
- com.vaadin.flow.component.crud.BinderCrudEditor<E>
-
- Type Parameters:
E- the bean type
- All Implemented Interfaces:
CrudEditor<E>,Serializable
public class BinderCrudEditor<E> extends Object implements CrudEditor<E>
A CRUD editor that binds editor fields to bean properties using aBinder.- See Also:
Binder, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BinderCrudEditor(com.vaadin.flow.data.binder.Binder<E> binder)Initializes a BinderCrudEditor with the given binder and no form viewBinderCrudEditor(com.vaadin.flow.data.binder.Binder<E> binder, com.vaadin.flow.component.Component view)Initializes a BinderCrudEditor with the given binder and form view
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear()Clears the editor.EgetItem()Returns the item being edited.com.vaadin.flow.component.ComponentgetView()Deprecated.This method should not be used outside.voidsetItem(E item, boolean validate)Sets an item to be edited.booleanvalidate()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.voidwriteItemChanges()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(com.vaadin.flow.data.binder.Binder<E> binder)
Initializes a BinderCrudEditor with the given binder and no form view- Parameters:
binder- the editor binder
-
BinderCrudEditor
public BinderCrudEditor(com.vaadin.flow.data.binder.Binder<E> binder, com.vaadin.flow.component.Component view)
Initializes a BinderCrudEditor with the given binder and form view- Parameters:
binder- the editor binderview- the form view
-
-
Method Detail
-
setItem
public void setItem(E item, boolean validate)
Description copied from interface:CrudEditorSets an item to be edited. This could be a newly instantiated item or an existing item from the grid.- Specified by:
setItemin interfaceCrudEditor<E>- Parameters:
item- the item to editvalidate- if true the item will be validated immediately
-
getItem
public E getItem()
Description copied from interface:CrudEditorReturns the item being edited.- Specified by:
getItemin interfaceCrudEditor<E>- Returns:
- the item being edited
-
writeItemChanges
public void writeItemChanges()
Description copied from interface:CrudEditorWrites any pending input update (if any) to the item.- Specified by:
writeItemChangesin interfaceCrudEditor<E>
-
clear
public void clear()
Clears the editor. Frees the item, and lazily clears all input fields.- Specified by:
clearin interfaceCrudEditor<E>
-
validate
public boolean validate()
Description copied from interface:CrudEditorRuns 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.- Specified by:
validatein interfaceCrudEditor<E>- Returns:
- true if valid or false if otherwise
-
getView
@Deprecated public com.vaadin.flow.component.Component getView()
Deprecated.This method should not be used outside.Description copied from interface:CrudEditorReturns the user interface of an editor.- Specified by:
getViewin interfaceCrudEditor<E>- Returns:
- the user interface
-
-