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.DFormNested classes/interfaces inherited from class com.storedobject.vaadin.AbstractDataForm
AbstractDataForm.FieldErrorNested 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, saveFields 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 booleanhandleValueSetError(String fieldName, com.vaadin.flow.component.HasValue<?, ?> field, Object fieldValue, Object objectValue, Throwable error) Handle errors while setting (committing) values.booleanisFieldEditable(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, validateDataMethods 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, setObjectMethods 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, streamFieldsCreatedMethods 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, setWindowModeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClickedMethods inherited from interface com.storedobject.common.Executable
actMethods 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, warningMethods inherited from interface com.storedobject.common.Reentrant
isReentrantMethods inherited from interface com.storedobject.ui.Transactional
commit, execute, getLogic, getTransactionManager, run, setLogic, transact, transact, transactControl, transactControl, transactControl, transactControlMethods 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:AbstractDataFormThis method is invoked to determine if a field needs to be made editable or not.- Overrides:
isFieldEditablein 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:AbstractDataEditorHandle errors while setting (committing) values. Default implementation returnstruewithout doing anything.- Overrides:
handleValueSetErrorin 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:ViewGet the application that's tied to this View.- Specified by:
getApplicationin interfaceExecutableView- Overrides:
getApplicationin classView- Returns:
- The Application.
-