VALUE
- is the generic type of the value
. Typically a custom
Datatype
.DELEGATE
- is the generic type of the delegate
.public abstract class UiWidgetCustomFieldComposite<VALUE,DELEGATE extends UiWidgetDynamicComposite<UiWidgetRegular>> extends UiWidgetCustomField<VALUE,DELEGATE>
custom field widget
that is composed out
of multiple field widgets
and potentially other widgets. Extend this class to create
a widget for a composite Datatype
. add
the child widgets in the
constructor (of your sub-class) and requires that at least one of them is a UiWidgetField
.UiWidgetCustomField.EventHandlerAdapter
AbstractUiWidget.AccessHelper, AbstractUiWidget.EventSender, AbstractUiWidget.HandlerContainer
Modifier and Type | Field and Description |
---|---|
private List<UiWidgetField<?>> |
fieldList
The
List of children that are field widgets. |
STYLE_FIELD, STYLE_LABEL, STYLE_MANDATORY, STYLE_VIEW
STYLE_HEADER
HTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_ID
PROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLE
WAI_ARIA
PROPERTY_LABEL
ACCESS_KEY_NONE, HTML_ATTRIBUTE_ACCESS_KEY
Constructor and Description |
---|
UiWidgetCustomFieldComposite(UiContext context,
DELEGATE delegate,
Class<VALUE> valueClass)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addChild(UiWidgetRegular child) |
protected abstract String |
convertValueToString(VALUE value)
Converts the given value to
String . |
protected UiWidgetField<?> |
getFirstField()
This method gets the first active field contained in this custom field.
|
boolean |
isTrimValue()
|
private void |
registerField(UiWidgetField<?> field) |
void |
setTrimValue(boolean trimValue)
This method sets the
trimValue flag. |
addFocusHandler, getAccessKey, getChild, getChild, getChildCount, getChildIndex, getEventHandlerAdapter, getLabel, getLabelWidget, getNullValue, getValidationFailure, getValueAsString, isFocused, removeFocusHandler, setAccessKey, setFocused, setLabel, setValidationFailure, setValueAsString, toString
addStyle, clearMessages, clearValidity, dispose, doInitialize, doSetMode, doValidate, getAriaRole, getDelegate, getDelegate, getId, getMode, getModeFixed, getParent, getPrimaryStyle, getSize, getSource, getStyles, getTooltip, getValueClass, getVisibleFlag, getWidgetAdapter, hasStyle, hasWidgetAdapter, initialize, isDisposed, isEnabled, isModifiedRecursive, isVisible, isVisibleRecursive, removeFromParent, removeStyle, setEnabled, setId, setMode, setMode, setModeFixed, setParent, setPrimaryStyle, setStyles, setTooltip, setVisible, setVisible
addChangeHandler, addEventHandler, addValidator, clearMessagesLocal, clearValidationFailure, doGetValue, doSetValue, fireEvent, fireValueChange, getBasicUtil, getContext, getDataBinding, getDataBinding, getDataBindingForWidget, getEventSender, getFactory, getLogger, getObserverSource, getOriginalValue, getRecentValue, getValueDirect, getValueOrException, getWidgetAdapter, hasEventSender, isMandatory, isModified, removeChangeHandler, removeEventHandler, removeFromParent, removeValidator, setMandatory, setModified, setParent, setValue
addValidatorMandatory, createValidationFailure, getValue, getValueAndValidate, handleGetValueError, resetValue, setValue, setValueForUser, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getContext, getParent, getSize
clearMessages
addEventHandler, removeEventHandler
setMode
getMode
setModeFixed
getModeFixed
setId
getId
setTooltip
getTooltip
getVisibleFlag, isVisible, setVisible, setVisible
isVisibleRecursive
setEnabled
isEnabled
addStyle, removeStyle
hasStyle
setStyles
getStyles
setPrimaryStyle
getPrimaryStyle
dispose
isDisposed
isModified
getAriaRole
getValue
getValueAndValidate, getValueDirect
addChangeHandler, removeChangeHandler
resetValue, setValue, setValue, setValueForUser
getOriginalValue, getValueOrException
addValidatorMandatory, isMandatory
addValidator, removeValidator
private final List<UiWidgetField<?>> fieldList
List
of children that are field widgets.protected void addChild(UiWidgetRegular child)
child
- is the child widget to add.UiWidgetDynamicComposite.addChild(net.sf.mmm.client.ui.api.widget.UiWidget)
private void registerField(UiWidgetField<?> field)
field
- is the UiWidgetField
to register.public boolean isTrimValue()
value
of this object should be automatically trimmed
. The default value is
true
. E.g. if a text field widget supports this property and it is true
the
value entered by the end-user will automatically be trimmed
. If you want prevent
this (e.g. if the end-user shall provide a separator, indentation, substitution variable, or the like)
you need to set
it to false
.public void setTrimValue(boolean trimValue)
trimValue
flag.trimValue
- is the new value of AttributeReadTrimValue.isTrimValue()
.protected UiWidgetField<?> getFirstField()
delegate
itself but also a child of the delegate in case of a composite custom
field.getFirstField
in class UiWidgetCustomField<VALUE,DELEGATE extends UiWidgetDynamicComposite<UiWidgetRegular>>
UiWidgetCustom.getDelegate()
protected abstract String convertValueToString(VALUE value)
String
.convertValueToString
in class AbstractUiWidget<VALUE>
value
- is the value to convert.String
representation to display the given value
.Copyright © 2001–2016 mmm-Team. All rights reserved.