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.IncorrectConcurrentAccessHandlerNested 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
FieldsModifier and TypeFieldDescriptionFields inherited from class com.vaadin.ui.components.grid.EditorImpl
binder, columnFields, edited, errorGenerator, eventRouter, rpc, saving -
Constructor Summary
ConstructorsConstructorDescriptionJmixEditorImpl(com.vaadin.data.PropertySet<T> propertySet) Constructor for internal implementation of the Editor. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.shared.RegistrationaddBeforeSaveListener(JmixEditorBeforeSaveListener<T> listener) protected voidprotected voidconfigureField(JmixEditorField<?> field) protected voidconfirmSave(boolean ok) protected voiddoCancel(boolean afterBeingSaved) protected voiddoConfirmBind(com.vaadin.shared.ui.grid.editor.EditorClientRpc rpc, String key) protected voidprotected StringgenerateErrorMessage(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 booleanhandleValidation(Map<com.vaadin.ui.Component, com.vaadin.data.ValidationResult> errors) protected booleanprotected voidonFieldValueChange(com.vaadin.data.HasValue.ValueChangeEvent<?> ignored) booleansave()voidSets 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, setSaveCaptionMethods inherited from class com.vaadin.ui.Grid.AbstractGridExtension
addComponentToGrid, extend, getInternalIdForColumn, getParent, removeComponentFromGridMethods inherited from class com.vaadin.ui.AbstractListing.AbstractListingExtension
getData, refresh, removeMethods inherited from class com.vaadin.server.AbstractExtension
extend, getSupportedParentType, setParentMethods 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, updateDiffstateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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, setErrorHandlerMethods inherited from interface com.vaadin.shared.Connector
getConnectorIdMethods 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:
doEditin 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:
doCancelin 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)
-