Class JmixEditorImpl<T>

java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractExtension
com.vaadin.ui.AbstractListing.AbstractListingExtension<T>
com.vaadin.ui.Grid.AbstractGridExtension<T>
com.vaadin.ui.components.grid.EditorImpl<T>
io.jmix.ui.widget.grid.JmixEditorImpl<T>
All Implemented Interfaces:
com.vaadin.data.provider.DataGenerator<T>, com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Extension, com.vaadin.shared.Connector, com.vaadin.ui.components.grid.Editor<T>, Serializable

public class JmixEditorImpl<T> extends com.vaadin.ui.components.grid.EditorImpl<T>
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.server.AbstractClientConnector

    com.vaadin.server.AbstractClientConnector.IncorrectConcurrentAccessHandler

    Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector

    com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from class com.vaadin.ui.components.grid.EditorImpl

    binder, columnFields, edited, errorGenerator, eventRouter, rpc, saving
  • Constructor Summary

    Constructors
    Constructor
    Description
    JmixEditorImpl(com.vaadin.data.PropertySet<T> propertySet)
    Constructor for internal implementation of the Editor.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.shared.Registration
     
    protected void
     
    protected void
     
    protected void
    confirmSave(boolean ok)
     
    protected void
    doCancel(boolean afterBeingSaved)
     
    protected void
    doConfirmBind(com.vaadin.shared.ui.grid.editor.EditorClientRpc rpc, String key)
     
    protected void
    doEdit(T bean)
     
    protected String
    generateErrorMessage(Map<com.vaadin.ui.Component,com.vaadin.ui.Grid.Column<T,?>> fieldToColumn, Map<com.vaadin.ui.Component,com.vaadin.data.ValidationResult> errors)
     
    protected Map<String,Object>
     
     
     
    protected JmixEnhancedGrid<T>
     
    protected Map<com.vaadin.ui.Component,com.vaadin.data.ValidationResult>
     
    protected boolean
    handleValidation(Map<com.vaadin.ui.Component,com.vaadin.data.ValidationResult> errors)
     
    protected boolean
     
    protected void
    onFieldValueChange(com.vaadin.data.HasValue.ValueChangeEvent<?> ignored)
     
    boolean
     
    void
    Sets cross field validation handler.

    Methods inherited from class com.vaadin.ui.components.grid.EditorImpl

    addCancelListener, addOpenListener, addSaveListener, cancel, doClose, editRow, generateData, getBinder, getCancelCaption, getErrorGenerator, getGrid, getSaveCaption, getState, getState, isBuffered, isEnabled, isOpen, setBinder, setBuffered, setCancelCaption, setEnabled, setErrorGenerator, setSaveCaption

    Methods inherited from class com.vaadin.ui.Grid.AbstractGridExtension

    addComponentToGrid, extend, getInternalIdForColumn, getParent, removeComponentFromGrid

    Methods inherited from class com.vaadin.ui.AbstractListing.AbstractListingExtension

    getData, refresh, remove

    Methods inherited from class com.vaadin.server.AbstractExtension

    extend, getSupportedParentType, setParent

    Methods inherited from class com.vaadin.server.AbstractClientConnector

    addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getIncorrectConcurrentAccessHandler, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setConnectorResource, setErrorHandler, setIncorrectConcurrentAccessHandler, setResource, updateDiffstate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.server.ClientConnector

    addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler

    Methods inherited from interface com.vaadin.shared.Connector

    getConnectorId

    Methods inherited from interface com.vaadin.data.provider.DataGenerator

    destroyAllData, destroyData, refreshData
  • Field Details

  • Constructor Details

    • JmixEditorImpl

      public JmixEditorImpl(com.vaadin.data.PropertySet<T> propertySet)
      Constructor for internal implementation of the Editor.
      Parameters:
      propertySet - the property set to use for configuring the default binder
  • Method Details

    • setCrossFieldValidationHandler

      public void setCrossFieldValidationHandler(@Nullable Function<Map<String,Object>,String> handler)
      Sets cross field validation handler. The first parameter in Function contains changed values from the editor's fields: property - value, the second parameter is String which must contain error message or null if validation was successful.
      Parameters:
      handler - handler function
    • getCrossFieldValidationHandler

      @Nullable public Function<Map<String,Object>,String> getCrossFieldValidationHandler()
      Returns:
      cross field validation handler
    • getEnhancedGrid

      protected JmixEnhancedGrid<T> getEnhancedGrid()
    • getBean

      public T getBean()
    • doConfirmBind

      protected void doConfirmBind(com.vaadin.shared.ui.grid.editor.EditorClientRpc rpc, String key)
      Overrides:
      doConfirmBind in class com.vaadin.ui.components.grid.EditorImpl<T>
    • doEdit

      protected void doEdit(T bean)
      Overrides:
      doEdit in class com.vaadin.ui.components.grid.EditorImpl<T>
    • configureField

      protected void configureField(JmixEditorField<?> field)
    • onFieldValueChange

      protected void onFieldValueChange(com.vaadin.data.HasValue.ValueChangeEvent<?> ignored)
    • save

      public boolean save()
      Specified by:
      save in interface com.vaadin.ui.components.grid.Editor<T>
      Overrides:
      save in class com.vaadin.ui.components.grid.EditorImpl<T>
    • doCancel

      protected void doCancel(boolean afterBeingSaved)
      Overrides:
      doCancel in class com.vaadin.ui.components.grid.EditorImpl<T>
    • isEditorFieldsValid

      protected boolean isEditorFieldsValid()
    • handleValidation

      protected boolean handleValidation(Map<com.vaadin.ui.Component,com.vaadin.data.ValidationResult> errors)
    • generatePropertiesMap

      protected Map<String,Object> generatePropertiesMap()
    • confirmSave

      protected void confirmSave(boolean ok)
    • generateErrorMessage

      protected String generateErrorMessage(Map<com.vaadin.ui.Component,com.vaadin.ui.Grid.Column<T,?>> fieldToColumn, Map<com.vaadin.ui.Component,com.vaadin.data.ValidationResult> errors)
    • getValidationErrors

      protected Map<com.vaadin.ui.Component,com.vaadin.data.ValidationResult> getValidationErrors()
    • commitFields

      protected void commitFields()
    • addBeforeSaveListener

      public com.vaadin.shared.Registration addBeforeSaveListener(JmixEditorBeforeSaveListener<T> listener)