public class WTable extends WAbstractTable
WAbstractTable.Column, WAbstractTable.ColumnResizeListenerImpl, WAbstractTable.ValueChangeListenerImplform, INTERNAL_STATE_RECORD_PROPERTYEMPTY| Constructor and Description |
|---|
WTable() |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(RecordHolder gridColumn)
Registers a new column.
|
protected com.vaadin.ui.CustomTable |
createWidget()
Called once, to create the actual Vaadin component.
|
RecordHolder |
getDataSource()
Gets the definition of the currently used data source.
|
String |
getNoDataMessage() |
Object |
getSelection()
Gets the current selection.
|
void |
preventGC(Set<ValueHolder> set)
Override for all components which are actively using some record holders, not directly linked to the model.
|
void |
refresh()
Refreshes the content.
|
protected void |
restoreInternalState(Map<String,Object> state)
Restores the UI state of this component which was previously written
by
FormComponent.writeInternalState(Map). |
void |
select(Object rowObject)
Sets the selected row in the table.
|
void |
setDataSource(RecordHolder ds)
Sets the data source to this table.
|
void |
setNoDataMessage(String noDataMessage)
Sets message displayed when no data are available.
|
void |
setRowStyleGenerator(ClosureHolder styleGenerator)
Sets the style generator that is used for generating styles for rows.
|
protected void |
writeInternalState(Map<String,Object> state)
Writes the UI state of this component to the provided map.
|
addColumn, columnGetAlignment, columnGetExpandRatio, columnGetHeader, columnGetHeaderAlignmnet, columnGetHeaderStyleName, columnGetWidth, columnIsCollapsed, columnIsCollapsible, columnSetAlignment, columnSetCollapsed, columnSetCollapsible, columnSetExpandRatio, columnSetHeader, columnSetHeaderAlignment, columnSetHeaderStyleName, columnSetWidth, getColumn, getColumn, getColumns, getComponentCount, getComponents, getFilterId, getFilterValueType, getHasChildrenAdapter, getPageLength, getTableColumns, getTableColumnStates, getValueType, getWidget, isColumnCollapsingAllowed, isColumnReorderingAllowed, isFilteringEnabled, isSafeToSetDefaultFilterValues, isSelectable, onResetFilters, resetFilters, restoreColumnState, setColumnCollapsingAllowed, setColumnReorderingAllowed, setColumnResizeListener, setFilteringEnabled, setPageLength, setSelectable, setSelectionChangeListener, setWidgetPageLength, updateFilterFieldVisibilitiesaddDataErrorMessage, addStyleName, attach, call, clearDataErrorMessages, createEvent, equals, getCaption, getComponentAlignment, getContextClickHandler, getCustomErrorMessage, getDataErrorMessages, getDescription, getExpandRatio, getHeight, getIcon, getModelingId, getNamespace, getStyleName, getTabIndex, getWidth, hashCode, isEnabled, isReadOnly, isVisible, localize, markAsDirty, removeStyleName, restoreState, saveState, setCaption, setComponentAlignment, setContextClickHandler, setContextMenuItems, setCustomErrorMessage, setDescription, setEnabled, setExpandRatio, setHeight, setIcon, setReadOnly, setStyleName, setTabIndex, setVisible, setWidth, toStringprotected com.vaadin.ui.CustomTable createWidget()
FormComponentcreateWidget in class FormComponentpublic void setNoDataMessage(String noDataMessage)
noDataMessage - public String getNoDataMessage()
public RecordHolder getDataSource()
null if the currently
used data source is not backed by forms::DataSource.public void setDataSource(RecordHolder ds)
ds - a record of type forms::DataSource representing the data source.public void refresh()
refresh in class WAbstractTablepublic void addColumn(RecordHolder gridColumn)
addColumn in class WAbstractTablegridColumn - forms::GridColumnpublic void preventGC(Set<ValueHolder> set)
FormComponentWTabSheet maintains a set of opened tabs. These tab records are not referenced
directly from forms::TabSheet and will therefore be garbage-collected. We however need those records to not to be GCed as the user
may ask for them simply by calling getTab(Integer).
Please note that the component definition records (e.g. forms::Button) are already GC-protected and they do not need to be added to this set.
Also, any child components currently attached to the UI are automatically protected and are not required to be registered in the set.preventGC in class WAbstractTableset - a set of records which are to be GC-prevented, never null. The component should add any records here.
Default implementation does nothing.public void select(Object rowObject)
select in class WAbstractTablerowObject - the row object identifying the row to selectpublic Object getSelection()
WAbstractTablegetSelection in class WAbstractTablenull if there is no selection.public void setRowStyleGenerator(ClosureHolder styleGenerator)
styleGenerator - the row style generator to set, or null to remove
a previously set generatorprotected void writeInternalState(Map<String,Object> state)
FormComponentMany UI attributes such as size, caption, etc. are not held in the records but are stored exclusively in the Vaadin components. In the records the getter/setter methods of such attributes directly delegate to the underlying component. For the purposes of the Save Document/Todo use case the state of such attributes has to be preserved.
Subclasses should override this method. The overriding method should call
super.writeInternalState(state) to store the state form the super
class as well. The attributes should be written to the provided state
parameter. The type of the values written to the state can only by
Java representation of LSPS types. That is java.util.Date,
java.lang.String, Decimal, RecordHolder,
ListHolder, ... The name of the attributes stored in the map
should be unique and should not collide with the names used by any
of the superclass. It is the responsibility of the overridden method to ensure
that.
Subclasses overriding this method should also override
FormComponent.restoreInternalState(Map) and restore the state written
by this method.
writeInternalState in class WAbstractTablestate - a map to which this method should write the component's UI state.FormComponent.restoreInternalState(Map),
FormComponent.saveState()protected void restoreInternalState(Map<String,Object> state)
FormComponentFormComponent.writeInternalState(Map).
Subclasses should override and call super.restoreInternalState(state);restoreInternalState in class WAbstractTablestate - a map of attributes and their valuesFormComponent.writeInternalState(Map)Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.