public interface FieldGroup extends Component, Component.BelongToFrame, Component.HasCaption, Component.HasIcon, HasBorder, HasContextHelp, Component.Editable, Validatable, EditableChangeNotifier, ChildEditableController, ComponentContainer, HasSubParts
Modifier and Type | Interface and Description |
---|---|
static interface |
FieldGroup.CustomFieldGenerator
Deprecated.
Set component implementation directly to
FieldGroup.FieldConfig using FieldGroup.FieldConfig.setComponent(Component) method. |
static class |
FieldGroup.FieldAttachMode
Whether apply declarative defaults for custom field or not.
|
static class |
FieldGroup.FieldCaptionAlignment
Field caption alignment.
|
static interface |
FieldGroup.FieldConfig
Configuration of a field.
|
static class |
FieldGroup.FieldsValidationException
Exception that is thrown from
validate() . |
HasContextHelp.ContextHelpIconClickEvent
EditableChangeNotifier.EditableChangeEvent
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider, Component.Wrapper
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
void |
addCustomField(FieldGroup.FieldConfig field,
FieldGroup.CustomFieldGenerator fieldGenerator)
Deprecated.
Set Component implementation directly to
FieldGroup.FieldConfig using FieldGroup.FieldConfig.setComponent(Component) method. |
void |
addCustomField(java.lang.String fieldId,
FieldGroup.CustomFieldGenerator fieldGenerator)
Deprecated.
Set Component implementation directly to
FieldGroup.FieldConfig using FieldGroup.FieldConfig.setComponent(Component) method. |
void |
addField(FieldGroup.FieldConfig field)
Append field to 1 column.
|
void |
addField(FieldGroup.FieldConfig fieldConfig,
int colIndex)
Append field to
colIndex column. |
void |
addField(FieldGroup.FieldConfig fieldConfig,
int colIndex,
int rowIndex)
Insert field to
colIndex column to rowIndex position. |
default void |
addValidator(FieldGroup.FieldConfig field,
Field.Validator validator)
Deprecated.
Use
FieldConfig.addValidator(validator) instead. |
default void |
addValidator(java.lang.String fieldId,
Field.Validator validator)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).addValidator(validator) instead. |
void |
bind()
Create and bind components for all declarative fields.
|
FieldGroup.FieldConfig |
createField(java.lang.String id)
Create new field config.
|
void |
focusField(java.lang.String fieldId)
Request focus on field.
|
void |
focusFirstField()
Focus the first enabled, visible and editable field.
|
FieldGroup.FieldCaptionAlignment |
getCaptionAlignment() |
float |
getColumnExpandRatio(int colIndex) |
int |
getColumns() |
Datasource |
getDatasource() |
FieldGroup.FieldConfig |
getField(int column,
int row) |
FieldGroup.FieldConfig |
getField(java.lang.String fieldId)
Get field config by id.
|
default java.lang.String |
getFieldCaption(java.lang.String fieldId)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).getCaption() instead. |
int |
getFieldCaptionWidth() |
int |
getFieldCaptionWidth(int colIndex) |
default Component |
getFieldComponent(FieldGroup.FieldConfig fieldConfig)
Deprecated.
|
default Component |
getFieldComponent(java.lang.String id)
Deprecated.
|
FieldGroupFieldFactory |
getFieldFactory() |
FieldGroup.FieldConfig |
getFieldNN(java.lang.String fieldId)
Get field config by id.
|
java.util.List<FieldGroup.FieldConfig> |
getFields() |
java.util.List<FieldGroup.FieldConfig> |
getFields(int column) |
default java.lang.Object |
getFieldValue(FieldGroup.FieldConfig fc)
Deprecated.
Inject field instance and use typed component instead of this method.
|
default java.lang.Object |
getFieldValue(java.lang.String fieldId)
Deprecated.
Inject field instance and use typed component instead of this method.
|
java.util.List<Component> |
getOwnComponents()
Get all components directly owned by this container
|
default java.lang.String |
getRequiredMessage(FieldGroup.FieldConfig field)
Deprecated.
Use
FieldConfig.getRequiredMessage() instead. |
default java.lang.String |
getRequiredMessage(java.lang.String fieldId)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).getRequiredMessage() instead. |
default java.lang.Object |
getSubPart(java.lang.String name) |
default boolean |
isEditable(FieldGroup.FieldConfig field)
Deprecated.
Use
FieldConfig.isEditable() instead. |
default boolean |
isEditable(java.lang.String fieldId)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).isEditable() |
default boolean |
isEnabled(FieldGroup.FieldConfig fc)
Deprecated.
Use
FieldConfig.isEnabled() instead. |
default boolean |
isEnabled(java.lang.String fieldId)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).isEnabled() |
default boolean |
isRequired(FieldGroup.FieldConfig fc)
Deprecated.
Use
FieldConfig.isRequired() instead. |
default boolean |
isRequired(java.lang.String fieldId)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).isRequired() instead. |
boolean |
isValid() |
default boolean |
isValidateOnCommit()
Enable/disable component validation on window commit for methods
Window.validateAll() , Frame.validate() ,
Frame.validateAll() , Frame.isValid()
By default is true and component is validated on window commit. |
default boolean |
isVisible(FieldGroup.FieldConfig fc)
Deprecated.
Use
FieldConfig.isVisible() instead. |
default boolean |
isVisible(java.lang.String fieldId)
Deprecated.
Use
FieldGroup.getFieldNN("fieldId").isVisible() |
void |
removeField(FieldGroup.FieldConfig fieldConfig)
Remove field associated with
fieldConfig . |
void |
removeField(java.lang.String fieldId)
Remove field by id.
|
default void |
requestFocus()
Deprecated.
Use
focusFirstField() instead. |
default void |
requestFocus(java.lang.String fieldId)
Deprecated.
Use
focusField(String) instead. |
void |
setCaptionAlignment(FieldGroup.FieldCaptionAlignment captionAlignment)
Set alignment of field captions
|
void |
setColumnExpandRatio(int colIndex,
float ratio)
Set column expand ratio.
|
void |
setColumns(int columns)
Set column count.
|
void |
setDatasource(Datasource datasource)
Set default datasource for declarative fields.
|
default void |
setEditable(FieldGroup.FieldConfig field,
boolean editable)
Deprecated.
Use
FieldConfig.setEditable(editable) instead. |
default void |
setEditable(java.lang.String fieldId,
boolean editable)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).setEditable(editable) instead. |
default void |
setEnabled(FieldGroup.FieldConfig fc,
boolean enabled)
Deprecated.
Use
FieldConfig.setEnabled(enabled) instead. |
default void |
setEnabled(java.lang.String fieldId,
boolean enabled)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).setEnabled(enabled) instead. |
default void |
setFieldCaption(java.lang.String fieldId,
java.lang.String caption)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).setCaption(caption) instead. |
void |
setFieldCaptionWidth(int fixedCaptionWidth)
Set fixed field captions width.
|
void |
setFieldCaptionWidth(int colIndex,
int width)
Set fixed field captions width for column
colIndex . |
void |
setFieldFactory(FieldGroupFieldFactory fieldFactory)
Set field factory for declarative fields.
|
default void |
setFieldValue(FieldGroup.FieldConfig fc,
java.lang.Object value)
Deprecated.
Inject field instance and use typed component instead of this method.
|
default void |
setFieldValue(java.lang.String fieldId,
java.lang.Object value)
Deprecated.
Inject field instance and use typed component instead of this method.
|
default void |
setRequired(FieldGroup.FieldConfig field,
boolean required)
Deprecated.
Use
FieldConfig.setRequired(required) instead. |
default void |
setRequired(FieldGroup.FieldConfig field,
boolean required,
java.lang.String message)
Deprecated.
Use
FieldConfig.setRequired(required) instead. |
default void |
setRequired(java.lang.String fieldId,
boolean required)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).setRequired(fieldId) instead. |
default void |
setRequired(java.lang.String fieldId,
boolean required,
java.lang.String message)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).setRequired(required) instead. |
default void |
setRequiredMessage(FieldGroup.FieldConfig field,
java.lang.String message)
Deprecated.
Use
FieldConfig.setRequiredMessage(message) instead. |
default void |
setRequiredMessage(java.lang.String fieldId,
java.lang.String message)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).setRequiredMessage(message) instead. |
default void |
setVisible(FieldGroup.FieldConfig fc,
boolean visible)
Deprecated.
Use
FieldConfig.setVisible(visible) instead. |
default void |
setVisible(java.lang.String fieldId,
boolean visible)
Deprecated.
Use
FieldGroup.getFieldNN(fieldId).setVisible(visible) instead. |
void |
validate() |
getFrame, setFrame
getCaption, setCaption
getDescription, setDescription
getIcon, setIcon, setIconFromSet
isBorderVisible, setBorderVisible
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
addEditableChangeListener, removeEditableChangeListener
isEditable, isEditableWithParent, setEditable
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, getWidthUnits, isEnabled, isEnabledItself, isEnabledRecursive, isResponsive, isVisible, isVisibleItself, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
add, add, focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponentsStream, remove, remove, removeAll
static final java.lang.String NAME
FieldGroup.FieldConfig createField(java.lang.String id)
addField(FieldConfig)
call.id
- field idjava.util.List<FieldGroup.FieldConfig> getFields()
java.util.List<FieldGroup.FieldConfig> getFields(int column)
column
- column indexcolumn
FieldGroup.FieldConfig getField(int column, int row)
column
- column indexrow
- row index@Nullable FieldGroup.FieldConfig getField(java.lang.String fieldId)
fieldId
- field idFieldGroup.FieldConfig getFieldNN(java.lang.String fieldId)
fieldId
- field idvoid addField(FieldGroup.FieldConfig field)
field
- field configvoid addField(FieldGroup.FieldConfig fieldConfig, int colIndex)
colIndex
column.fieldConfig
- field configcolIndex
- column indexvoid addField(FieldGroup.FieldConfig fieldConfig, int colIndex, int rowIndex)
colIndex
column to rowIndex
position.fieldConfig
- field configcolIndex
- column indexrowIndex
- row indexvoid removeField(java.lang.String fieldId)
fieldId
- field idvoid removeField(FieldGroup.FieldConfig fieldConfig)
fieldConfig
.fieldConfig
- field id@Deprecated default void requestFocus(java.lang.String fieldId)
focusField(String)
instead.fieldId
- field id@Deprecated default void requestFocus()
focusFirstField()
instead.Component
requestFocus
in interface Component
void focusFirstField()
void focusField(java.lang.String fieldId)
fieldId
- field idDatasource getDatasource()
void setDatasource(Datasource datasource)
datasource
- datasourcevoid bind()
java.util.List<Component> getOwnComponents()
ComponentContainer
getOwnComponents
in interface ComponentContainer
FieldGroup.FieldCaptionAlignment getCaptionAlignment()
void setCaptionAlignment(FieldGroup.FieldCaptionAlignment captionAlignment)
captionAlignment
- field captions alignmentint getFieldCaptionWidth()
void setFieldCaptionWidth(int fixedCaptionWidth)
fixedCaptionWidth
- fixed field caption widthint getFieldCaptionWidth(int colIndex)
colIndex
- column indexcolIndex
void setFieldCaptionWidth(int colIndex, int width)
colIndex
. Set -1 to use auto size.colIndex
- column indexwidth
- widthint getColumns()
void setColumns(int columns)
columns
- column countfloat getColumnExpandRatio(int colIndex)
colIndex
- column indexvoid setColumnExpandRatio(int colIndex, float ratio)
colIndex
- column indexratio
- column expand ratioboolean isValid()
isValid
in interface Validatable
void validate() throws ValidationException
validate
in interface Validatable
ValidationException
FieldGroupFieldFactory getFieldFactory()
void setFieldFactory(FieldGroupFieldFactory fieldFactory)
fieldFactory
- field factorydefault boolean isValidateOnCommit()
Validatable
Window.validateAll()
, Frame.validate()
,
Frame.validateAll()
, Frame.isValid()
By default is true and component is validated on window commit.
For FieldGroup is false.isValidateOnCommit
in interface Validatable
@Nullable default java.lang.Object getSubPart(java.lang.String name)
getSubPart
in interface HasSubParts
@Deprecated default Component getFieldComponent(java.lang.String id)
@Deprecated default Component getFieldComponent(FieldGroup.FieldConfig fieldConfig)
@Deprecated default boolean isRequired(FieldGroup.FieldConfig fc)
FieldConfig.isRequired()
instead.@Deprecated default void setRequired(FieldGroup.FieldConfig field, boolean required, java.lang.String message)
FieldConfig.setRequired(required)
instead.@Deprecated default void setRequired(FieldGroup.FieldConfig field, boolean required)
FieldConfig.setRequired(required)
instead.@Deprecated default java.lang.String getRequiredMessage(FieldGroup.FieldConfig field)
FieldConfig.getRequiredMessage()
instead.@Deprecated default void setRequiredMessage(FieldGroup.FieldConfig field, java.lang.String message)
FieldConfig.setRequiredMessage(message)
instead.@Deprecated default boolean isRequired(java.lang.String fieldId)
FieldGroup.getFieldNN(fieldId).isRequired()
instead.@Deprecated default void setRequired(java.lang.String fieldId, boolean required, java.lang.String message)
FieldGroup.getFieldNN(fieldId).setRequired(required)
instead.@Deprecated default void setRequired(java.lang.String fieldId, boolean required)
FieldGroup.getFieldNN(fieldId).setRequired(fieldId)
instead.@Deprecated default java.lang.String getRequiredMessage(java.lang.String fieldId)
FieldGroup.getFieldNN(fieldId).getRequiredMessage()
instead.@Deprecated default void setRequiredMessage(java.lang.String fieldId, java.lang.String message)
FieldGroup.getFieldNN(fieldId).setRequiredMessage(message)
instead.@Deprecated default void addValidator(FieldGroup.FieldConfig field, Field.Validator validator)
FieldConfig.addValidator(validator)
instead.@Deprecated default void addValidator(java.lang.String fieldId, Field.Validator validator)
FieldGroup.getFieldNN(fieldId).addValidator(validator)
instead.@Deprecated default boolean isEditable(FieldGroup.FieldConfig field)
FieldConfig.isEditable()
instead.@Deprecated default void setEditable(FieldGroup.FieldConfig field, boolean editable)
FieldConfig.setEditable(editable)
instead.@Deprecated default boolean isEditable(java.lang.String fieldId)
FieldGroup.getFieldNN(fieldId).isEditable()
@Deprecated default void setEditable(java.lang.String fieldId, boolean editable)
FieldGroup.getFieldNN(fieldId).setEditable(editable)
instead.@Deprecated default boolean isEnabled(FieldGroup.FieldConfig fc)
FieldConfig.isEnabled()
instead.@Deprecated default void setEnabled(FieldGroup.FieldConfig fc, boolean enabled)
FieldConfig.setEnabled(enabled)
instead.@Deprecated default boolean isEnabled(java.lang.String fieldId)
FieldGroup.getFieldNN(fieldId).isEnabled()
@Deprecated default void setEnabled(java.lang.String fieldId, boolean enabled)
FieldGroup.getFieldNN(fieldId).setEnabled(enabled)
instead.@Deprecated default boolean isVisible(FieldGroup.FieldConfig fc)
FieldConfig.isVisible()
instead.@Deprecated default void setVisible(FieldGroup.FieldConfig fc, boolean visible)
FieldConfig.setVisible(visible)
instead.@Deprecated default boolean isVisible(java.lang.String fieldId)
FieldGroup.getFieldNN("fieldId").isVisible()
@Deprecated default void setVisible(java.lang.String fieldId, boolean visible)
FieldGroup.getFieldNN(fieldId).setVisible(visible)
instead.@Deprecated default java.lang.Object getFieldValue(FieldGroup.FieldConfig fc)
@Deprecated default void setFieldValue(FieldGroup.FieldConfig fc, java.lang.Object value)
@Deprecated default java.lang.Object getFieldValue(java.lang.String fieldId)
@Deprecated default void setFieldValue(java.lang.String fieldId, java.lang.Object value)
@Deprecated default java.lang.String getFieldCaption(java.lang.String fieldId)
FieldGroup.getFieldNN(fieldId).getCaption()
instead.@Deprecated default void setFieldCaption(java.lang.String fieldId, java.lang.String caption)
FieldGroup.getFieldNN(fieldId).setCaption(caption)
instead.@Deprecated void addCustomField(FieldGroup.FieldConfig field, FieldGroup.CustomFieldGenerator fieldGenerator)
FieldGroup.FieldConfig
using FieldGroup.FieldConfig.setComponent(Component)
method.field
- field configfieldGenerator
- field generator@Deprecated void addCustomField(java.lang.String fieldId, FieldGroup.CustomFieldGenerator fieldGenerator)
FieldGroup.FieldConfig
using FieldGroup.FieldConfig.setComponent(Component)
method.fieldId
- field idfieldGenerator
- field generator