Package com.storedobject.ui
Class DataEditor<T>
java.lang.Object
com.storedobject.vaadin.View
com.storedobject.vaadin.AbstractDataForm<T>
com.storedobject.vaadin.AbstractDataEditor<T>
com.storedobject.vaadin.DataEditor<T>
com.storedobject.ui.DataEditor<T>
- All Implemented Interfaces:
Executable
,Reentrant
,HasLogic
,Transactional
,ClickHandler
,ExecutableView
,HasContainer
,ValueChangeHandler
,com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<? extends com.vaadin.flow.component.Component>>
,com.vaadin.flow.component.HasValue.ValueChangeListener
,Serializable
,Runnable
,EventListener
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.vaadin.AbstractDataEditor
AbstractDataEditor.DForm
Nested classes/interfaces inherited from class com.storedobject.vaadin.AbstractDataForm
AbstractDataForm.FieldError
Nested classes/interfaces inherited from interface com.storedobject.vaadin.ClickHandler
ClickHandler.ModifiedClickEvent<C extends com.vaadin.flow.component.Component>
-
Field Summary
Fields inherited from class com.storedobject.vaadin.DataEditor
buttonPanel, cancel, save
Fields inherited from class com.storedobject.vaadin.AbstractDataForm
form
-
Constructor Summary
ConstructorsConstructorDescriptionDataEditor
(Class<T> objectClass) DataEditor
(Class<T> objectClass, String caption) DataEditor
(Class<T> objectClass, String labelSave, String labelCancel) DataEditor
(Class<T> objectClass, String caption, String labelSave, String labelCancel, Consumer<T> saveAction) DataEditor
(Class<T> objectClass, String caption, String labelSave, String labelCancel, Consumer<T> saveAction, Consumer<T> cancelAction) DataEditor
(Class<T> objectClass, String labelSave, String labelCancel, Consumer<T> saveAction, Consumer<T> cancelAction) DataEditor
(Class<T> objectClass, Consumer<T> saveAction) -
Method Summary
Modifier and TypeMethodDescriptionGet the application that's tied to this View.protected boolean
handleValueSetError
(String fieldName, com.vaadin.flow.component.HasValue<?, ?> field, Object fieldValue, Object objectValue, Throwable error) Handle errors while setting (committing) values.boolean
isFieldEditable
(String fieldName) This method is invoked to determine if a field needs to be made editable or not.Methods inherited from class com.storedobject.vaadin.DataEditor
buildButtons, cancel, clicked, execute, initUI, save, setCancelAction, setSaveAction, skipFirstFocus, validateData
Methods inherited from class com.storedobject.vaadin.AbstractDataEditor
addField, addField, addField, addField, addField, addField, addField, addField, constructField, createField, createObjectInstance, customizeField, getDataClass, getFieldCreator, getFieldGetMethod, getFieldNames, getFieldOrder, getFieldSetMethod, getForm, getObject, getObjectClass, includeField, isFieldIncluded, newObject, setFixedValue, setFixedValue, setFixedValues, setObject, setObject
Methods inherited from class com.storedobject.vaadin.AbstractDataForm
add, addConstructedListener, addField, addField, addIncludeFieldChecker, addValidator, addValidator, attachField, clean, clearAlerts, clearError, clearErrors, clearFields, commit, connect, connect, connect, createButtonLayout, createField, createField, createFieldContainer, createLayout, detachField, fieldAttached, fieldDetached, fireFormConstructed, formConstructed, getColumns, getColumnSpan, getContainer, getContent, getData, getErrorDisplay, getField, getFieldLabel, getFieldLabel, getFieldName, getLabel, isFieldEditable, isFieldVisible, isFieldVisible, isReadOnly, load, markError, newLine, remove, removeAll, removeField, removeField, removeField, setColumns, setColumnSpan, setErrorDisplay, setFieldContainerProvider, setFieldCustomizer, setFieldEditable, setFieldEditable, setFieldHidden, setFieldHidden, setFieldLabel, setFieldLabel, setFieldReadOnly, setFieldReadOnly, setFieldReadOnly, setFieldReadOnly, setFieldVisible, setFieldVisible, setFieldVisible, setFieldVisible, setIncludeFieldChecker, setReadOnly, setRequired, setRequired, setRequired, setRequired, setRequired, setRequired, setRequired, setRequired, streamFieldNamesCreated, streamFieldsCreated
Methods inherited from class com.storedobject.vaadin.View
abort, aborted, addClosedListener, addOpenedListener, close, createCloseableView, createWindow, decorateComponent, execute, execute, executing, focus, focus, focusAny, getCaption, getComponent, getCreatedBy, getEmbeddedView, getMenuItem, getMenuItem, getView, invoke, isFullScreen, isScrollable, isWindowMode, select, setCaption, setComponent, setCreatedBy, setDefaultPadding, setEmbeddedView, setFirstFocus, setFullScreen, setScrollable, setWindowMode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClicked
Methods inherited from interface com.storedobject.common.Executable
act
Methods inherited from interface com.storedobject.vaadin.ExecutableView
abort, clean, clearAlerts, clicked, close, createMenuItem, error, execute, getCaption, getMenuIconName, getMenuItem, getView, getView, invoke, isCloseable, isFullScreen, isHomeView, log, log, message, returnedFrom, run, setCaption, setClickable, speak, trackValueChange, tray, valueChanged, warning
Methods inherited from interface com.storedobject.common.Reentrant
isReentrant
Methods inherited from interface com.storedobject.ui.Transactional
commit, execute, getLogic, getTransactionManager, run, setLogic, transact, transact, transactControl, transactControl
Methods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
DataEditor
-
DataEditor
-
DataEditor
-
DataEditor
-
DataEditor
-
DataEditor
-
DataEditor
-
DataEditor
-
DataEditor
-
DataEditor
-
DataEditor
-
DataEditor
-
-
Method Details
-
isFieldEditable
Description copied from class:AbstractDataForm
This method is invoked to determine if a field needs to be made editable or not.- Overrides:
isFieldEditable
in classAbstractDataForm<T>
- Parameters:
fieldName
- Name of the field- Returns:
- True or false.
-
handleValueSetError
protected boolean handleValueSetError(String fieldName, com.vaadin.flow.component.HasValue<?, ?> field, Object fieldValue, Object objectValue, Throwable error) Description copied from class:AbstractDataEditor
Handle errors while setting (committing) values. Default implementation returnstrue
without doing anything.- Overrides:
handleValueSetError
in classAbstractDataEditor<T>
- Parameters:
fieldName
- Name of the fieldfield
- FieldfieldValue
- Field's value that's being committedobjectValue
- Value currently being in the objecterror
- Error occurred while setting the value- Returns:
- Whether the error situation is handled or not.
-
getApplication
Description copied from class:View
Get the application that's tied to this View.- Specified by:
getApplication
in interfaceExecutableView
- Overrides:
getApplication
in classView
- Returns:
- The Application.
-