ADAPTER
- is the generic type of AbstractUiWidgetNative.getWidgetAdapter()
.ROW
- is the generic type of a row in the value list
.ITEM_CONTAINER
- is the generic type of the ItemContainer
.public abstract class AbstractUiWidgetListTable<ADAPTER extends UiWidgetAdapterListTable<ROW,ITEM_CONTAINER>,ROW,ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>> extends AbstractUiWidgetAbstractListTable<ADAPTER,ROW,ITEM_CONTAINER> implements UiWidgetListTable<ROW>
UiWidgetListTable
.AbstractUiWidgetNative.SizeImpl
AbstractUiWidget.AccessHelper, AbstractUiWidget.EventSender, AbstractUiWidget.HandlerContainer
STYLE_DATA_TABLE
PROPERTY_SUMMARY
PROPERTY_TITLE
STYLE_HEADER
HTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_ID
PROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLE
WAI_ARIA
ACCESS_KEY_NONE, HTML_ATTRIBUTE_ACCESS_KEY
Constructor and Description |
---|
AbstractUiWidgetListTable(UiContext context,
ADAPTER widgetAdapter)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected List<ROW> |
doGetValue(List<ROW> template,
ValidationState state)
This method is called from the
data-binding triggered by API methods such as
AbstractUiFeatureValueAndValidation.getValue() . |
protected void |
doSetValue(List<ROW> newValue,
boolean forUser)
This method is called from the
data-binding triggered by API methods such as
AbstractUiWidget.setValue(Object, boolean) . |
protected void |
initializeWidgetAdapter(ADAPTER adapter)
This method is called from
AbstractUiWidgetNative.getWidgetAdapter() to initialize the UiWidgetAdapter . |
addRow, addRow, doSetSelected, getAllAvailableItems, getItemContainer, getLastAvailableItem, getRowIndex, getValueClass, removeRow, replaceRow, sort
createColumn, createColumn, createRowContainer, createRowContainer, createSelectionColumn, createTableColumnAdapter, dragColumn, getColumn, getColumnById, getColumnCount, getItem, getRowNumberColumn, getSelectionColumn, getSortColumn, hasRowNumberColumn, setColumns, setDragOverColumn
addSelectionHandler, asFeatureSelectedValue, clearSelection, doGetSelected, getFirstAvailableItem, getSelectedValue, getSelectedValues, getSelectedValuesInternal, getSelectionCount, getSelectionMode, getSummary, getTitle, hasSelectedValue, isEditable, isSelected, isTitleVisible, onItemSelection, removeSelectionHandler, setEditable, setSelectedValue, setSelectedValues, setSelectedValues, setSelection, setSelection, setSelectionMode, setSummary, setTitle, setTitleVisible
addFocusHandler, getAccessKey, isFocused, onAccessKeyPressed, removeFocusHandler, setAccessKey, setFocused, setFocused
addChangeHandler, addStyle, clearMessages, clearValidity, createSize, createUniqueId, createWidgetAdapter, dispose, doSetMode, doValidate, getAriaRole, getAriaRoleFixedType, getChild, getChild, getChildCount, getChildIndex, getId, getIndexOfStyle, getMode, getModeFixed, getParent, getPrimaryStyle, getSize, getStyles, getTooltip, getVisibleFlag, getWidgetAdapter, getWidgetAdapter, hasStyle, hasWidgetAdapter, isDisposed, isEnabled, isModifiedRecursive, isVisible, isVisibleRecursive, removeChangeHandler, removeFromParent, removeStyle, setAriaRole, setEnabled, setId, setIdPrefix, setMode, setMode, setModeFixed, setParent, setPrimaryStyle, setStyles, setTooltip, setVisible, setVisible, toString, visibilityChanged
addEventHandler, addValidator, clearMessagesLocal, clearValidationFailure, convertValueToString, fireEvent, fireValueChange, getBasicUtil, getContext, getDataBinding, getDataBinding, getDataBindingForWidget, getEventSender, getFactory, getLogger, getObserverSource, getOriginalValue, getRecentValue, getSource, getValueDirect, getValueOrException, getWidgetAdapter, hasEventSender, isMandatory, isModified, 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
getValue
addRow, addRow, getRowIndex, removeRow, replaceRow
createColumn, createColumn, getColumn, getColumnById, getColumnCount, getRowNumberColumn, getSelectionColumn, setColumns
getTitle, setTitle
addSelectionHandler, isSelected, removeSelectionHandler, setSelection
setSelectedValue, setSelectedValues
getSelectedValue, getSelectedValues, getSelectionCount, hasSelectedValue
setSelectionMode
getSelectionMode
setSummary
getSummary
setTitleVisible
isTitleVisible
setEditable
isEditable
asFeatureSelectedValue
getValueAndValidate, getValueDirect
addChangeHandler, removeChangeHandler
resetValue, setValue, setValue, setValueForUser
getOriginalValue, getValueOrException
addValidatorMandatory, isMandatory
addValidator, removeValidator
validate
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
public AbstractUiWidgetListTable(UiContext context, ADAPTER widgetAdapter)
context
- is the context
.widgetAdapter
- is the widget adapter
. Typically null
for
lazy initialization.protected void doSetValue(List<ROW> newValue, boolean forUser)
data-binding
triggered by API methods such as
AbstractUiWidget.setValue(Object, boolean)
. In many cases the data-binding
already
performs the required work to do. However, here is the place to implemented the custom logic to get the
value from the actual widget. For details see AbstractUiWidget.doGetValue(Object, ValidationState)
.doSetValue
in class AbstractUiWidgetNative<ADAPTER extends UiWidgetAdapterListTable<ROW,ITEM_CONTAINER>,List<ROW>>
newValue
- is the value to set. Typically a composite object (e.g. java bean) so its attributes are set
to fields (see UiWidgetField
).forUser
- true
if called from AbstractUiFeatureValueAndValidation.setValueForUser(Object)
, false
if
set from AbstractUiFeatureValueAndValidation.setValue(Object)
.AbstractUiWidget.doGetValue(Object, ValidationState)
protected List<ROW> doGetValue(List<ROW> template, ValidationState state) throws RuntimeException
data-binding
triggered by API methods such as
AbstractUiFeatureValueAndValidation.getValue()
. In many cases the data-binding
already performs the
required work to do. However, here is the place to implemented the custom logic to get the value from the
actual widget. The following cases have to be distinguished:
native
fields
this method has to get the actual
value from the underlying native widget (text-box, password-field, etc.).custom fields
this
method will be responsible to convert from the delegates value (see
UiWidgetCustom.getDelegate()
) to the proper value type. E.g. if you want to create a custom
widget to edit your own datatype such as CustomerNumber
based on a
UiWidgetTextField
you need to convert from String
to CustomerNumber
.custom composite widgets
you should use AbstractUiWidget.getDataBinding()
.
UiDataBinding.createAndBind(net.sf.mmm.util.pojo.path.api.TypedProperty)
that gives you high-level support and makes your live easy. Then there is no need to override this
method.Void
, there is nothing to do here.AbstractUiWidget.doSetValue(Object, boolean)
.doGetValue
in class AbstractUiWidgetNative<ADAPTER extends UiWidgetAdapterListTable<ROW,ITEM_CONTAINER>,List<ROW>>
template
- is the object where the data is filled in. May only be null
if according to
data-binding
(e.g. if <VALUE> is an (immutable)
Datatype
).state
- is the ValidationState
. May be null
(if the validation is omitted).
Should only be used to propagate to AbstractUiWidget.getValueDirect(Object, ValidationState)
of children.null
if empty. If <VALUE> is
String
the empty String
has to be returned if no value has been entered. In case
<VALUE> is a mutable object (java bean) the template
is NOT
null
and is to be returned by this method after the value(s) of this widget have
been assigned. For immutable datatypes
template
will be null
and this method has to create a new instance of
<VALUE> based on the end-users input in the widget.RuntimeException
AbstractUiWidget.doSetValue(Object, boolean)
protected void initializeWidgetAdapter(ADAPTER adapter)
AbstractUiWidgetNative.getWidgetAdapter()
to initialize the UiWidgetAdapter
. All
attributes of this widget need to be set in the UiWidgetAdapter
.initializeWidgetAdapter
in class AbstractUiWidgetAbstractListTable<ADAPTER extends UiWidgetAdapterListTable<ROW,ITEM_CONTAINER>,ROW,ITEM_CONTAINER extends ItemContainer<ROW,ITEM_CONTAINER>>
adapter
- is the UiWidgetAdapter
to initialize.Copyright © 2001–2016 mmm-Team. All rights reserved.