Package io.jmix.ui.widget.grid
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
Modifier and TypeFieldDescriptionFields inherited from class com.vaadin.ui.components.grid.EditorImpl
binder, columnFields, edited, errorGenerator, eventRouter, rpc, saving
-
Constructor Summary
ConstructorDescriptionJmixEditorImpl
(com.vaadin.data.PropertySet<T> propertySet) Constructor for internal implementation of the Editor. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.shared.Registration
addBeforeSaveListener
(JmixEditorBeforeSaveListener<T> listener) protected void
protected void
configureField
(JmixEditorField<?> field) 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
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) getBean()
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
save()
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
-
crossFieldValidationHandler
-
-
Constructor Details
-
JmixEditorImpl
Constructor for internal implementation of the Editor.- Parameters:
propertySet
- the property set to use for configuring the default binder
-
-
Method Details
-
setCrossFieldValidationHandler
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
- Returns:
- cross field validation handler
-
getEnhancedGrid
-
getBean
-
doEdit
- Overrides:
doEdit
in classcom.vaadin.ui.components.grid.EditorImpl<T>
-
configureField
-
onFieldValueChange
protected void onFieldValueChange(com.vaadin.data.HasValue.ValueChangeEvent<?> ignored) -
save
public boolean save() -
doCancel
protected void doCancel(boolean afterBeingSaved) - Overrides:
doCancel
in classcom.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
-
confirmSave
protected void confirmSave(boolean ok) -
generateErrorMessage
-
getValidationErrors
-
commitFields
protected void commitFields() -
addBeforeSaveListener
public com.vaadin.shared.Registration addBeforeSaveListener(JmixEditorBeforeSaveListener<T> listener)
-