You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.crud.

Class BinderCrudEditor<E>

    • Constructor Detail

      • BinderCrudEditor

        public BinderCrudEditor​(Binder<E> binder)

        Initializes a BinderCrudEditor with the given binder and no form view

        Parameters:

        binder - the editor binder

      • BinderCrudEditor

        public BinderCrudEditor​(Binder<E> binder,
                                Component view)

        Initializes a BinderCrudEditor with the given binder and form view

        Parameters:

        binder - the editor binder

        view - the form view

    • 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 interface CrudEditor<E>

        Parameters:

        item - the item to edit

        validate - 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 interface CrudEditor<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 interface CrudEditor<E>

      • clear

        public void clear()

        Clears the editor. Frees the item, and lazily clears all input fields.

        Specified by:

        clear in interface CrudEditor<E>

      • validate

        public boolean validate()

        Description copied from interface: CrudEditor

        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.

        Specified by:

        validate in interface CrudEditor<E>

        Returns:

        true if valid or false if otherwise

      • getView

        @Deprecated
        public Component getView()
        Deprecated.
        This method should not be used outside.

        Description copied from interface: CrudEditor

        Returns the user interface of an editor.

        Specified by:

        getView in interface CrudEditor<E>

        Returns:

        the user interface