Package com.storedobject.vaadin
Class AbstractForm.ValueHandler
java.lang.Object
com.storedobject.vaadin.AbstractForm.ValueHandler
- All Implemented Interfaces:
FieldValueHandler
- Enclosing class:
AbstractForm<D>
Basic value-handler implementation.
- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether the handler can process the provided field name.booleanDetermines whether the specified field can be set to a value.Retrieves the value associated with the specified field.booleanisBasic()Determines whether the field value handler is considered basic.booleanisEditable(com.vaadin.flow.component.HasValue<?, ?> field) Checks if the given field is editable.booleanisEditable(String fieldName) Checks whether the specified field is editable.booleanisVisible(com.vaadin.flow.component.HasValue<?, ?> field) Determines if the specified field is currently visible.booleanChecks whether the specified field is visible.voidSets the value of the specified field.
-
Constructor Details
-
ValueHandler
protected ValueHandler()
-
-
Method Details
-
isBasic
public boolean isBasic()Description copied from interface:FieldValueHandlerDetermines whether the field value handler is considered basic.- Specified by:
isBasicin interfaceFieldValueHandler- Returns:
- true if the handler is basic, false otherwise
-
canHandle
Description copied from interface:FieldValueHandlerDetermines whether the handler can process the provided field name.- Specified by:
canHandlein interfaceFieldValueHandler- Parameters:
fieldName- the name of the field to check- Returns:
- true if the handler can handle the field, false otherwise
-
canSet
Description copied from interface:FieldValueHandlerDetermines whether the specified field can be set to a value.- Specified by:
canSetin interfaceFieldValueHandler- Parameters:
fieldName- the name of the field to check- Returns:
- true if the field can be set, false otherwise
-
getValue
Description copied from interface:FieldValueHandlerRetrieves the value associated with the specified field.- Specified by:
getValuein interfaceFieldValueHandler- Parameters:
fieldName- the name of the field whose value is to be retrieved- Returns:
- the value of the specified field, or null if the field does not exist or is inaccessible
-
setValue
Description copied from interface:FieldValueHandlerSets the value of the specified field.- Specified by:
setValuein interfaceFieldValueHandler- Parameters:
fieldName- the name of the field to set the value forvalue- the value to be set for the specified field
-
isVisible
Description copied from interface:FieldValueHandlerChecks whether the specified field is visible.- Specified by:
isVisiblein interfaceFieldValueHandler- Parameters:
fieldName- the name of the field to check visibility for- Returns:
- true if the field is visible, false otherwise
-
isVisible
public boolean isVisible(com.vaadin.flow.component.HasValue<?, ?> field) Description copied from interface:FieldValueHandlerDetermines if the specified field is currently visible.- Specified by:
isVisiblein interfaceFieldValueHandler- Parameters:
field- the field to check for visibility, provided as an instance implementing HasValue- Returns:
- true if the field is visible, false otherwise
-
isEditable
Description copied from interface:FieldValueHandlerChecks whether the specified field is editable.- Specified by:
isEditablein interfaceFieldValueHandler- Parameters:
fieldName- the name of the field to check- Returns:
- true if the field is editable, false otherwise
-
isEditable
public boolean isEditable(com.vaadin.flow.component.HasValue<?, ?> field) Description copied from interface:FieldValueHandlerChecks if the given field is editable.- Specified by:
isEditablein interfaceFieldValueHandler- Parameters:
field- the field to be checked- Returns:
- true if the field is editable, false otherwise
-