public static interface FieldGroup.FieldConfig extends Component.HasXmlDescriptor, Component.HasCaption, Component.HasFormatter, Component.HasInputPrompt
Field
.Modifier and Type | Method and Description |
---|---|
void |
addValidator(Field.Validator validator)
Add validator for declarative field.
|
Component |
getComponent() |
Component |
getComponentNN() |
java.util.function.Consumer<Component.ContextHelpIconClickEvent> |
getContextHelpIconClickHandler() |
java.lang.String |
getContextHelpText() |
Datasource |
getDatasource() |
java.lang.String |
getId() |
CollectionDatasource |
getOptionsDatasource() |
java.lang.String |
getProperty() |
java.lang.String |
getRequiredError()
Deprecated.
|
java.lang.String |
getRequiredMessage() |
java.lang.String |
getStyleName() |
java.lang.Integer |
getTabIndex() |
Datasource |
getTargetDatasource() |
java.lang.String |
getWidth() |
boolean |
isBound() |
java.lang.Boolean |
isContextHelpTextHtmlEnabled() |
boolean |
isCustom() |
java.lang.Boolean |
isEditable() |
java.lang.Boolean |
isEnabled() |
java.lang.Boolean |
isRequired() |
java.lang.Boolean |
isVisible() |
void |
removeValidator(Field.Validator validator)
Remove validator.
|
void |
setComponent(Component component)
Bind Component to this field config.
|
void |
setComponent(Component component,
FieldGroup.FieldAttachMode mode)
Bind Component to this field config.
|
void |
setContextHelpIconClickHandler(java.util.function.Consumer<Component.ContextHelpIconClickEvent> handler)
Sets a context help icon click handler
|
void |
setContextHelpText(java.lang.String contextHelpText)
Set context help text for declarative field.
|
void |
setContextHelpTextHtmlEnabled(java.lang.Boolean enabled)
Defines if context help text can be presented as HTML.
|
void |
setCustom(boolean custom)
Set custom flag.
|
void |
setDatasource(Datasource datasource)
Set datasource for declarative field.
|
void |
setEditable(java.lang.Boolean editable)
Set editable for declarative field.
|
void |
setEnabled(java.lang.Boolean enabled)
Set enabled for declarative field.
|
void |
setOptionsDatasource(CollectionDatasource optionsDatasource)
Set options datasource for declarative field.
|
void |
setProperty(java.lang.String property)
Set property for declarative field.
|
void |
setRequired(java.lang.Boolean required)
Set required for declarative field.
|
void |
setRequiredError(java.lang.String requiredError)
Deprecated.
|
void |
setRequiredMessage(java.lang.String requiredMessage)
Set required message for declarative field.
|
void |
setStyleName(java.lang.String stylename)
Set stylename parameter.
|
void |
setTabIndex(java.lang.Integer tabIndex)
Set tab index for declarative field.
|
void |
setVisible(java.lang.Boolean visible)
Set visible for declarative field.
|
void |
setWidth(java.lang.String width)
Set width parameter.
|
getXmlDescriptor, setXmlDescriptor
getCaption, getDescription, setCaption, setDescription
getFormatter, setFormatter
getInputPrompt, setInputPrompt
java.lang.String getId()
boolean isBound()
java.lang.String getWidth()
void setWidth(java.lang.String width)
isBound()
is true sets width to the connected Component.width
- widthjava.lang.String getStyleName()
void setStyleName(java.lang.String stylename)
isBound()
is true sets stylename to the connected Component.stylename
- style nameDatasource getTargetDatasource()
Datasource getDatasource()
void setDatasource(Datasource datasource)
datasource
- datasourcejava.lang.Boolean isRequired()
void setRequired(java.lang.Boolean required)
isBound()
is true and Component implements Field
then sets required to the connected Component.required
- required flagjava.lang.Boolean isEditable()
void setEditable(java.lang.Boolean editable)
isBound()
is true and Component implements Field
then sets editable to the connected Component.editable
- editable flagjava.lang.Boolean isEnabled()
void setEnabled(java.lang.Boolean enabled)
isBound()
is true then sets enabled to the connected Component.enabled
- enabled flagjava.lang.Boolean isVisible()
void setVisible(java.lang.Boolean visible)
isBound()
is true then sets visible to the connected Component.visible
- visible flagjava.lang.String getProperty()
void setProperty(java.lang.String property)
property
- property namejava.lang.Integer getTabIndex()
void setTabIndex(java.lang.Integer tabIndex)
isBound()
is true and Component implements Focusable
then sets tab index to the connected Component.tabIndex
- tab index@Deprecated java.lang.String getRequiredError()
getRequiredMessage()
@Deprecated void setRequiredError(java.lang.String requiredError)
setRequiredMessage(String)
}boolean isCustom()
void setCustom(boolean custom)
FieldGroup.bind()
will not create Component for field even if it does not have connected Component.custom
- custom flagjava.lang.String getRequiredMessage()
void setRequiredMessage(java.lang.String requiredMessage)
isBound()
is true and Component implements Field
then sets required message to the connected Component.requiredMessage
- required message@Nullable Component getComponent()
Component getComponentNN()
void setComponent(Component component)
When used with custom="true", the datasource and the property should be set up manually.
component
- componentFieldConfig#setComponent(Component, FieldAttachMode)
void setComponent(Component component, FieldGroup.FieldAttachMode mode)
mode
is FieldGroup.FieldAttachMode.APPLY_DEFAULTS
then FieldConfig will apply default values for
caption, description, width, required and other Field properties otherwise it will not.
When used with custom="true", the datasource and the property should be set up manually.
component
- componentmode
- field attach modevoid addValidator(Field.Validator validator)
Field
then validator
will be added
to Component directly.validator
- validatorvoid removeValidator(Field.Validator validator)
Field
then validator
will be removed
from Component directly.validator
- validatorvoid setOptionsDatasource(CollectionDatasource optionsDatasource)
OptionsField
then optionsDatasource
will be set to Component directly.optionsDatasource
- options datasourceCollectionDatasource getOptionsDatasource()
java.lang.String getContextHelpText()
void setContextHelpText(java.lang.String contextHelpText)
isBound()
is true and Component implements Field
then sets context help text
to the connected Component.contextHelpText
- context help text to be setjava.lang.Boolean isContextHelpTextHtmlEnabled()
void setContextHelpTextHtmlEnabled(java.lang.Boolean enabled)
If isBound()
is true and Component implements Field
then sets this attribute
to the connected Component.
enabled
- true if field accepts context help text in HTML formatjava.util.function.Consumer<Component.ContextHelpIconClickEvent> getContextHelpIconClickHandler()
void setContextHelpIconClickHandler(java.util.function.Consumer<Component.ContextHelpIconClickEvent> handler)
handler
- the handler to set