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 TypeMethodDescriptionboolean
Determines whether the handler can process the provided field name.boolean
Determines whether the specified field can be set to a value.Retrieves the value associated with the specified field.boolean
isBasic()
Determines whether the field value handler is considered basic.boolean
isEditable
(com.vaadin.flow.component.HasValue<?, ?> field) Checks if the given field is editable.boolean
isEditable
(String fieldName) Checks whether the specified field is editable.boolean
isVisible
(com.vaadin.flow.component.HasValue<?, ?> field) Determines if the specified field is currently visible.boolean
Checks whether the specified field is visible.void
Sets the value of the specified field.
-
Constructor Details
-
ValueHandler
protected ValueHandler()
-
-
Method Details
-
isBasic
public boolean isBasic()Description copied from interface:FieldValueHandler
Determines whether the field value handler is considered basic.- Specified by:
isBasic
in interfaceFieldValueHandler
- Returns:
- true if the handler is basic, false otherwise
-
canHandle
Description copied from interface:FieldValueHandler
Determines whether the handler can process the provided field name.- Specified by:
canHandle
in 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:FieldValueHandler
Determines whether the specified field can be set to a value.- Specified by:
canSet
in 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:FieldValueHandler
Retrieves the value associated with the specified field.- Specified by:
getValue
in 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:FieldValueHandler
Sets the value of the specified field.- Specified by:
setValue
in 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:FieldValueHandler
Checks whether the specified field is visible.- Specified by:
isVisible
in 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:FieldValueHandler
Determines if the specified field is currently visible.- Specified by:
isVisible
in 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:FieldValueHandler
Checks whether the specified field is editable.- Specified by:
isEditable
in 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:FieldValueHandler
Checks if the given field is editable.- Specified by:
isEditable
in interfaceFieldValueHandler
- Parameters:
field
- the field to be checked- Returns:
- true if the field is editable, false otherwise
-