public class TableView extends ListGrid implements HasDetailsSelectedHandlers, HasImageClickHandlers, com.smartgwt.mobile.client.internal.data.HasRecordCanSelectPropertyAttribute, HasRecordNavigationClickHandlers, HasRowContextClickHandlers, HasSelectionChangedHandlers, HasSelectionUpdatedHandlers, com.smartgwt.mobile.client.internal.SelectedSetHandler
DataSource, or, a local dataset can be provided as a
RecordList.
The TableView provides built-in controls such as +link{navigation arrows,showNavigation} and
shows fields from the provided records in one of several built-in RecordLayouts or in a
custom format.com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Modifier and Type | Field and Description |
|---|---|
static TableViewCssResource |
_CSS |
protected com.google.gwt.dom.client.UListElement |
_ul |
static java.lang.String |
COMPONENT_CLASS_NAME
sc-table, the CSS class name that is added to the TableView
element. |
static java.lang.String |
GROUP_VALUE_STRING_ATTRIBUTE_NAME
data-sc-groupValueString, the HTML5 data attribute that is set on the element
holding the table group for the records of a GroupNode. |
static java.lang.String |
IS_LOAD_MORE_RECORDS_ATTRIBUTE_NAME |
static java.lang.String |
RECORD_COMPONENT_CLASS_NAME
sc-record-component, the CSS class name added to the element
of each record component. |
static java.lang.String |
RECORD_COUNTER_CLASS_NAME
sc-record-counter, the CSS class name added to the counter element of a row. |
static java.lang.String |
RECORD_DESCRIPTION_CLASS_NAME
sc-record-description, the CSS class name added to the description element of a row. |
static java.lang.String |
RECORD_ICON_CLASS_NAME
sc-record-icon, the CSS class name added to the icon element of a row. |
static java.lang.String |
RECORD_INFO_CLASS_NAME
sc-record-info, the CSS class name added to the info element of a row. |
static java.lang.String |
RECORD_TITLE_CLASS_NAME
sc-record-title, the CSS class name added to the title element of a row. |
static java.lang.String |
ROW_CLASS_NAME
sc-row, the CSS class name that is added to each table row element. |
static java.lang.String |
TABLE_GROUP_CLASS_NAME
sc-table-group |
fieldNums__sortSpecifiersalignment, enforcePolicy, hPolicy, members, membersMargin, minMemberSize, momentumScroll, overflow, paddingAsLayoutMargin, reverseOrder, valign, vertical_CONTENT_CHANGED_EVENT_TYPE, _HISTORY_ENABLED, _REQUEST_SCROLL_TO_EVENT_TYPE, id, touched| Constructor and Description |
|---|
TableView() |
TableView(RecordList records) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
_canSelectRecord(Record record) |
protected void |
_clearSelected(com.google.gwt.dom.client.Element element) |
RecordList |
_createDataModel(Criteria filterCriteria,
java.lang.Object operation,
DSRequest context) |
protected void |
_createSelectionModel() |
protected void |
_dataArrived(int start,
int end) |
protected void |
_dataChanged(DataChangedEvent event) |
protected void |
_destroySelectionModel() |
protected com.google.gwt.dom.client.Element |
_findElement(com.google.gwt.dom.client.NativeEvent event) |
protected Record |
_findRecord(com.google.gwt.dom.client.Element element) |
protected java.lang.Integer |
_findRecordIndex(com.google.gwt.dom.client.Element element) |
com.smartgwt.mobile.client.internal.test.AutoTestLocatable |
_getChildFromLocatorSubstring(java.lang.String substring,
int index,
java.util.List<java.lang.String> locatorArray,
com.smartgwt.mobile.client.internal.test.GetAttributeConfiguration configuration) |
protected static com.google.gwt.dom.client.Element |
_getDeleteDisclosureElem(com.google.gwt.dom.client.Element recordElem,
com.google.gwt.dom.client.Element targetElem) |
java.lang.Object |
_getInnerAttributeFromSplitLocator(java.util.List<java.lang.String> locatorArray,
com.smartgwt.mobile.client.internal.test.GetAttributeConfiguration configuration) |
java.lang.String |
_getRecordRemovedProperty() |
protected static com.google.gwt.dom.client.Element |
_getSelectionDisclosureElem(com.google.gwt.dom.client.Element recordElem,
com.google.gwt.dom.client.Element targetElem) |
void |
_markRecordRemoved(Record record) |
protected void |
_markRecordRemoved(Record record,
com.google.gwt.dom.client.Element deleteDisclosureElem,
boolean suppressEvent) |
void |
_onSelectedSet(com.smartgwt.mobile.client.internal.SelectedSetEvent event) |
boolean |
_recordMarkedAsRemoved(Record record) |
protected void |
_refreshRows() |
void |
_setRecordRemovedProperty(java.lang.String recordRemovedProperty) |
protected void |
_setSelected(com.google.gwt.dom.client.Element element) |
void |
_unmarkRecordRemoved(Record record) |
protected void |
_unmarkRecordRemoved(Record record,
com.google.gwt.dom.client.Element deleteDisclosureElem) |
void |
addData(Record record)
Perform a DataSource "add" operation to add new records to this component's DataSource.
|
com.google.gwt.event.shared.HandlerRegistration |
addDataChangedHandler(DataChangedHandler handler)
Register a handler for when the data in the record changes - fired when the user marks the record for delete
|
com.google.gwt.event.shared.HandlerRegistration |
addDetailsSelectedHandler(DetailsSelectedHandler handler)
Register a handler for details selected.
|
com.google.gwt.event.shared.HandlerRegistration |
addImageClickHandler(ImageClickHandler handler)
Register a handler for a click on the image displayed in a record if
iconField
has been specified |
com.google.gwt.event.shared.HandlerRegistration |
addRecordNavigationClickHandler(RecordNavigationClickHandler handler)
Register a handler for a navigation click - fired when the user clicks on a record, or
on the navigate icon for a record depending on
setNavigationMode(NavigationMode) |
com.google.gwt.event.shared.HandlerRegistration |
addRowContextClickHandler(RowContextClickHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addSelectionChangedHandler(SelectionChangedHandler handler)
Register a handler for selection changed.
|
void |
clearSort() |
protected Canvas |
createRecordComponent(Record record)
If
showRecordComponents is true, then this
method must be overridden to create the custom component that should be used in place of all
default table row controls except for the reorder and deletion controls. |
void |
destroy() |
void |
discardAllEdits() |
java.lang.String |
getCanRemoveProperty() |
boolean |
getCanRemoveRecords() |
boolean |
getCanReorderRecords() |
int |
getCellHeight() |
java.lang.String |
getDefaultPrimaryKeyFieldName()
Returns the default primary key field name that is used when a
DataSource
is not set on this TableView. |
java.lang.String |
getDetailCountProperty() |
java.lang.String |
getEmptyMessage() |
java.lang.String |
getFieldName(int fieldNum) |
java.lang.String |
getGroupByField() |
boolean |
getHiliteOnTouch() |
java.lang.String |
getLoadingMessage() |
com.google.gwt.resources.client.ImageResource |
getNavIcon()
Navigation icon shown next to records when
getShowNavigation() returns true and
getNavigationMode() is set to NavigationMode.NAVICON_ONLY. |
com.google.gwt.resources.client.ImageResource |
getNavigationIcon(Record record)
ImageResource to display as a NavigationIcon per record.
|
NavigationMode |
getNavigationMode() |
NavStack |
getParentNavStack()
The parent
NavStack. |
java.lang.String |
getRecordCanSelectProperty() |
RecordFormatter |
getRecordFormatter() |
RecordLayout |
getRecordLayout() |
java.lang.String |
getRecordNavigationProperty() |
Rectangle |
getRowClientBounds(int rowNum)
Calculates and returns the bounding client
Rectangle
of the row at rowNum, or null if the row at rowNum
is not being displayed by this TableView. |
Rectangle |
getRowClientBounds(Record record)
Calculates and returns the bounding client
Rectangle
of the row corresponding to record, or null if this TableView
is not displaying a row for Record. |
int |
getRowTop(int rowNum)
Calculates the Y coordinate of the row at
rowNum relative to the top of
the TableView. |
java.lang.Integer |
getRowTop(Record record)
Calculates the Y coordinate of the row corresponding to
record relative to
the top of the TableView. |
com.google.gwt.resources.client.ImageResource |
getSelectedIcon() |
boolean |
getShowDetailCount() |
boolean |
getShowIcons() |
boolean |
getShowNavigation() |
boolean |
getShowNavigation(Record record)
Whether to show navigation controls for some specific record.
|
boolean |
getShowRecordComponents()
If
true, this TableView should create and show a custom embedded
component in every row. |
boolean |
getShowSelectedIcon() |
SortSpecifier[] |
getSort() |
java.lang.Boolean |
getSortDirection() |
TableMode |
getTableMode()
Return the table style.
|
com.google.gwt.resources.client.ImageResource |
getWholeRecordNavIcon()
Navigation icon shown next to records when
getShowNavigation() returns true and
getNavigationMode() is set to NavigationMode.WHOLE_RECORD. |
java.lang.Boolean |
hasChanges() |
void |
hideDeletableRecords() |
void |
hideMoveableRecords() |
boolean |
isDeferRemoval() |
void |
loadRecords(java.util.List<Record> recordsToShow)
Renders the records in
recordsToShow on screen. |
void |
markRecordRemoved(int rowNum) |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
onLoad() |
void |
refreshRow(int rowNum) |
void |
removeData(Record record)
Perform a DataSource "remove" operation to remove records from this component's DataSource.
|
void |
removeData(Record record,
DSCallback callback) |
void |
removeData(Record record,
DSCallback callback,
DSRequest request) |
boolean |
saveAllEdits() |
void |
setBaseStyle(java.lang.String baseStyle) |
void |
setCanRemoveProperty(java.lang.String canRemoveProperty) |
void |
setCanRemoveRecords(java.lang.Boolean canRemoveRecords) |
void |
setCanReorderRecords(java.lang.Boolean canReorderRecords) |
void |
setCellHeight(int cellHeight) |
void |
setData(RecordList records) |
void |
setDataSource(DataSource ds) |
void |
setDefaultPrimaryKeyFieldName(java.lang.String defaultPrimaryKeyFieldName)
|
void |
setDeferRemoval(boolean deferRemoval) |
void |
setDetailCountProperty(java.lang.String detailCountProperty) |
void |
setEmptyMessage(java.lang.String emptyMessage) |
void |
setFields(ListGridField... fields) |
void |
setGroupByField(java.lang.String groupByField) |
void |
setHiliteOnTouch(boolean hilite)
Should we show highlight styling when the user touches a record in this grid.
|
void |
setInnerHTML(java.lang.String html)
return the table content panel
|
void |
setLoadingMessage(java.lang.String loadingMessage) |
void |
setNavIcon(com.google.gwt.resources.client.ImageResource img)
Setter to override the navigation icon shown next to records when
getShowNavigation()
returns true and getNavigationMode() is set to NavigationMode.NAVICON_ONLY |
void |
setNavigationMode(NavigationMode navigationMode)
Set navigation style for this TableView.
|
void |
setParentNavStack(NavStack parentNavStack) |
void |
setRecordCanSelectProperty(java.lang.String recordCanSelectProperty) |
void |
setRecordFormatter(RecordFormatter recordFormatter)
Formatter for the record as a whole, aside from built-in controls such as navigation
controls.
|
void |
setRecordLayout(RecordLayout layout)
Sets the arrangement of data fields from the record.
|
void |
setRecordNavigationProperty(java.lang.String recordNavigationProperty)
Boolean property on each record that controls whether navigation controls are shown for
that record.
|
void |
setSelectedIcon(com.google.gwt.resources.client.ImageResource selectedIcon) |
void |
setSelectionType(SelectionStyle selectionType) |
void |
setShowDetailCount(java.lang.Boolean showDetailCount) |
void |
setShowIcons(java.lang.Boolean showIcons) |
void |
setShowNavigation(boolean showNavigation)
Whether to show navigation controls by default on all records.
|
void |
setShowSelectedIcon(boolean showSelectedIcon) |
void |
setSort(SortSpecifier... sortSpecifiers) |
void |
setSortDirection(java.lang.Boolean up) |
void |
setTableMode(TableMode tableMode)
Set the style of the table.
|
void |
setWholeRecordNavIcon(com.google.gwt.resources.client.ImageResource img)
Setter to override the navigation icon shown next to records when
getShowNavigation()
returns true and getNavigationMode() is set to NavigationMode.WHOLE_RECORD |
void |
showDeletableRecords() |
void |
showMoveableRecords() |
void |
updateData(Record record)
Perform a DataSource "update" operation to update existing records in this component's DataSource.
|
_copyFieldConfiguration, _getRecordBaseStyleProperty, compareValues, getBaseStyle, getBaseStyle, getCanEdit, getDataManager, getField, getFieldName, getFieldNum, getFields, getFieldValue, getMainRecord, getRecordBaseStyleProperty, getSelectionType, getShowTitle, getSubrecordsProperty, getTitle, getValidators, setCanEdit, setDataManager, setFieldName, setMainRecord, setRecordBaseStyleProperty, setShowTitle, setSubrecordsProperty, setTitle, setValidators, showValue, updateCanEdit_buildRequest, _cloneComponentValues, _duplicateValues, _filter, _filterWithCriteria, _fireSelectionUpdated, _getData, _getDeepCloneOnEdit, _getInitialCriteria, _getSelection, _getSelectionObject, _resolveStopOnError, _setDeepCloneOnEdit, _updateDataModel, _validateField, _validateFieldAndDependencies, addSelectionUpdatedHandler, deselectAllRecords, deselectRecord, deselectRecords, fetchData, fetchData, fetchData, fetchData, filterData, getCriteria, getDataFetchMode, getDataField, getDataPageSize, getDataSource, getDescriptionField, getFetchOperation, getIconField, getInfoField, getRecordList, getResultSet, getSelectedRecord, getSelectedRecords, getStopOnError, getTitleField, getUseAllDataSourceFields, invalidateCache, isPartiallySelected, isSelected, selectRecord, selectRecord, selectRecords, selectRecords, selectSingleRecord, setCriteria, setDataFetchMode, setDataField, setDataPageSize, setDescriptionField, setFetchOperation, setIconField, setInfoField, setStopOnError, setTitleField, setUseAllDataSourceFieldsaddDragMoveHandler, addMember, addMember, addMembers, addMembers, addMembers, clear, getEnforcePolicy, getHPolicy, getLayoutBottomMargin, getLayoutLeftMargin, getLayoutMargin, getLayoutRightMargin, getLayoutTopMargin, getManagePercentBreadth, getMember, getMember, getMemberNumber, getMemberNumber, getMembers, getMembersMargin, getMinMemberSize, getMomentumScroll, getOverflow, getPaddingAsLayoutMargin, getReverseOrder, getVertical, getVPolicy, hasMember, hideMember, hideMember, reflow, removeMember, removeMember, removeMembers, removeMembers, reorderMember, reorderMembers, setAlign, setAlign, setDefaultLayoutAlign, setDefaultLayoutAlign, setEnforcePolicy, setHPolicy, setLayoutBottomMargin, setLayoutLeftMargin, setLayoutMargin, setLayoutRightMargin, setLayoutTopMargin, setManagePercentBreadth, setMembers, setMembersMargin, setMinMemberSize, setMomentumScroll, setOverflow, setPaddingAsLayoutMargin, setReverseOrder, setVertical, setVisibleMember, setVPolicy, showMember, showMember_add, _booleanValue, _fireContentChangedEvent, _fireContentChangedEvent, _fireRequestScrollToEvent, _getAndroidWindowSoftInputMode, _getAttributeFromSplitLocator, _getFixNavigationBarPositionDuringKeyboardFocus, _getHideTabBarDuringKeyboardFocus, _getInnerElement, _hideAddressBar, _hideAddressBarNow, _insert, _isDifferent, _isHDPIDisplay, _isIOS4OrOlder, _isIOS5, _isIOSMin6_0, _isStandaloneMode, _nativeParseFloat, _removeClassName, _setClassName, _setHandleDisabled, _sinkAnimationEndEvent, _sinkContentChangedEvent, _sinkFocusInEvent, _sinkFocusOutEvent, _sinkInputEvent, _sinkRequestScrollToEvent, _sinkTransitionEndEvent, _triggerDebugger, addChild, addChild, addChild, addClickHandler, addShowContextMenuHandler, disable, enable, getContextMenu, getID, getInnerHTML, getMargin, hasChild, hasChild, isAndroid, isDisabled, isEnabled, isIPad, isIPhone, isSafari, isStandAlone, isUIWebView, parseDimension, removeChild, removeChild, setContents, setContextMenu, setDisabled, setElement, setID, setMargin, setStyleName, split, useIOSNativeScrollingadd, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeadd, add, adopt, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddSelectionUpdatedHandlergetStopOnErrorpublic static final TableViewCssResource _CSS
@SGWTInternal public static final java.lang.String IS_LOAD_MORE_RECORDS_ATTRIBUTE_NAME
public static final java.lang.String GROUP_VALUE_STRING_ATTRIBUTE_NAME
data-sc-groupValueString, the HTML5 data attribute that is set on the element
holding the table group for the records of a GroupNode.
Using CSS attribute selectors, you can style the table rows differently by group. For example, when using group values 0, 1, and 2:
.sc-table > [data-sc-groupValueString="0"] > .sc-table-group > .sc-row {
/* Group 0 row styles */
}
.sc-table > [data-sc-groupValueString="1"] > .sc-table-group > .sc-row {
/* Group 1 row styles */
}
.sc-table > [data-sc-groupValueString="2"] > .sc-table-group > .sc-row {
/* Group 2 row styles */
}
public static final java.lang.String COMPONENT_CLASS_NAME
sc-table, the CSS class name that is added to the TableView
element.public static final java.lang.String TABLE_GROUP_CLASS_NAME
sc-table-grouppublic static final java.lang.String ROW_CLASS_NAME
sc-row, the CSS class name that is added to each table row element.public static final java.lang.String RECORD_ICON_CLASS_NAME
sc-record-icon, the CSS class name added to the icon element of a row.public static final java.lang.String RECORD_COUNTER_CLASS_NAME
sc-record-counter, the CSS class name added to the counter element of a row.public static final java.lang.String RECORD_TITLE_CLASS_NAME
sc-record-title, the CSS class name added to the title element of a row.public static final java.lang.String RECORD_INFO_CLASS_NAME
sc-record-info, the CSS class name added to the info element of a row.public static final java.lang.String RECORD_DESCRIPTION_CLASS_NAME
sc-record-description, the CSS class name added to the description element of a row.public static final java.lang.String RECORD_COMPONENT_CLASS_NAME
sc-record-component, the CSS class name added to the element
of each record component.@SGWTInternal protected com.google.gwt.dom.client.UListElement _ul
public TableView()
public TableView(RecordList records)
public void destroy()
destroy in class DataBoundComponent<RecordList>public com.smartgwt.mobile.client.internal.test.AutoTestLocatable _getChildFromLocatorSubstring(java.lang.String substring,
int index,
java.util.List<java.lang.String> locatorArray,
com.smartgwt.mobile.client.internal.test.GetAttributeConfiguration configuration)
_getChildFromLocatorSubstring in interface com.smartgwt.mobile.client.internal.test.AutoTestLocatable_getChildFromLocatorSubstring in class Canvaspublic java.lang.Object _getInnerAttributeFromSplitLocator(java.util.List<java.lang.String> locatorArray,
com.smartgwt.mobile.client.internal.test.GetAttributeConfiguration configuration)
_getInnerAttributeFromSplitLocator in interface com.smartgwt.mobile.client.internal.test.AutoTestLocatable_getInnerAttributeFromSplitLocator in class DataBoundComponent<RecordList>public void setBaseStyle(java.lang.String baseStyle)
setBaseStyle in class ListGrid@SGWTInternal
protected static com.google.gwt.dom.client.Element _getDeleteDisclosureElem(com.google.gwt.dom.client.Element recordElem,
com.google.gwt.dom.client.Element targetElem)
@SGWTInternal
protected static com.google.gwt.dom.client.Element _getSelectionDisclosureElem(com.google.gwt.dom.client.Element recordElem,
com.google.gwt.dom.client.Element targetElem)
public final java.lang.String getDefaultPrimaryKeyFieldName()
DataSource
is not set on this TableView. (When a DataSource is set, the
primary key field name is the name of the DataSourceField
that has its primaryKey attribute
set to true.)public void setDefaultPrimaryKeyFieldName(java.lang.String defaultPrimaryKeyFieldName)
defaultPrimaryKeyFieldName - the new default primary key field name.@SGWTInternal protected com.google.gwt.dom.client.Element _findElement(com.google.gwt.dom.client.NativeEvent event)
@SGWTInternal protected java.lang.Integer _findRecordIndex(com.google.gwt.dom.client.Element element)
@SGWTInternal protected Record _findRecord(com.google.gwt.dom.client.Element element)
public void setDataSource(DataSource ds)
setDataSource in class DataBoundComponent<RecordList>public void setFields(ListGridField... fields)
public final java.lang.String getGroupByField()
public void setGroupByField(java.lang.String groupByField)
public final java.lang.String getFieldName(int fieldNum)
getFieldName in class ListGridpublic void setTableMode(TableMode tableMode)
TableMode.PLAIN.tableMode - the default table style (plain or grouped)public TableMode getTableMode()
TableMode.PLAIN.public void setInnerHTML(java.lang.String html)
public void setRecordLayout(RecordLayout layout)
Several presets are available, or a RecordFormatter can be
defined to take over rendering of TableView rows entirely.
Note that controls supported by the TableView itself, such as navigation icons, are implicitly added to the data fields described in the RecordLayout.
layout - the record layoutpublic RecordLayout getRecordLayout()
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class Canvaspublic void onLoad()
onLoad in class com.google.gwt.user.client.ui.Widgetpublic void setRecordFormatter(RecordFormatter recordFormatter)
recordLayout.
Writing a custom RecordFormatter is advanced usage. In many cases, where
it may seem that a custom formatter is needed, the same customization can be achieved
using a default formatter in conjunction with a CellFormatter
set on a ListGridField.
recordFormatter - the record formatterpublic RecordFormatter getRecordFormatter()
public void setData(RecordList records)
setData in class DataBoundComponent<RecordList>protected void _createSelectionModel()
_createSelectionModel in class DataBoundComponent<RecordList>protected void _destroySelectionModel()
_destroySelectionModel in class DataBoundComponent<RecordList>public void _onSelectedSet(com.smartgwt.mobile.client.internal.SelectedSetEvent event)
_onSelectedSet in interface com.smartgwt.mobile.client.internal.SelectedSetHandler@SGWTInternal protected void _dataChanged(DataChangedEvent event)
@SGWTInternal
protected void _dataArrived(int start,
int end)
public final SortSpecifier[] getSort()
getSort in interface com.smartgwt.mobile.client.internal.data.HasSortSpecifiersgetSort in class DataBoundComponent<RecordList>public void setSort(SortSpecifier... sortSpecifiers)
setSort in interface com.smartgwt.mobile.client.internal.data.HasSortSpecifierssetSort in class DataBoundComponent<RecordList>public void clearSort()
public RecordList _createDataModel(Criteria filterCriteria, java.lang.Object operation, DSRequest context)
_createDataModel in class DataBoundComponent<RecordList>public void addData(Record record)
record - new recordpublic void removeData(Record record)
record - primary key values of record to delete, (or complete record)public void removeData(Record record, DSCallback callback)
public void removeData(Record record, DSCallback callback, DSRequest request)
public void updateData(Record record)
record - updated recordpublic void setSortDirection(java.lang.Boolean up)
public java.lang.Boolean getSortDirection()
public java.lang.Boolean hasChanges()
@SGWTInternal protected void _refreshRows()
public boolean getShowRecordComponents()
true, this TableView should create and show a custom embedded
component in every row. The returned component is used in place of all default table
row controls except for the reorder and deletion controls.false.createRecordComponent(Record)protected Canvas createRecordComponent(Record record)
showRecordComponents is true, then this
method must be overridden to create the custom component that should be used in place of all
default table row controls except for the reorder and deletion controls.record - the Record from this TableView's data.record.public void loadRecords(java.util.List<Record> recordsToShow)
recordsToShow on screen.getShowRecordComponents()public final Rectangle getRowClientBounds(int rowNum)
Rectangle
of the row at rowNum, or null if the row at rowNum
is not being displayed by this TableView.
The bounding rectangle can be passed to Popover.showForArea().
to display a Popover for the row.
rowNum - the index of the row to calculate the client bounds of.Rectangle representing the bounds relative to the viewport
of the row at rowNum, or null if the row at rowNum
is not being displayed by this TableView.public final Rectangle getRowClientBounds(Record record)
Rectangle
of the row corresponding to record, or null if this TableView
is not displaying a row for Record.
The bounding rectangle can be passed to Popover.showForArea().
to display a Popover for the row.
record - the Record corresponding to the row to calculate the client bounds of.Rectangle representing the bounds relative to the viewport
of the row corresponding to record, or null if this TableView
is not displaying a row for Record.public final int getRowTop(int rowNum)
rowNum relative to the top of
the TableView. Note that this method is reliable for all rows that
are being shown by this TableView.rowNum - the index of the row to calculate the top offset for.TableView that the row
at rowNum lies, or an estimate based on cellHeight/rowHeight
if the row is not being shown by this TableView.public final java.lang.Integer getRowTop(Record record)
record relative to
the top of the TableView.record - the Record corresponding to the row to calculate the top offset for.TableView that the row
corresponding to record lies, or null if the row is not being shown by this
TableView.@SGWTInternal public final java.lang.String _getRecordRemovedProperty()
@SGWTInternal public void _setRecordRemovedProperty(java.lang.String recordRemovedProperty)
public void markRecordRemoved(int rowNum)
@SGWTInternal public void _markRecordRemoved(Record record)
@SGWTInternal protected void _markRecordRemoved(Record record, com.google.gwt.dom.client.Element deleteDisclosureElem, boolean suppressEvent)
@SGWTInternal public void _unmarkRecordRemoved(Record record)
@SGWTInternal protected void _unmarkRecordRemoved(Record record, com.google.gwt.dom.client.Element deleteDisclosureElem)
@SGWTInternal public final boolean _recordMarkedAsRemoved(Record record)
public void discardAllEdits()
public boolean saveAllEdits()
public void refreshRow(int rowNum)
public void setHiliteOnTouch(boolean hilite)
hilite - true to enable record highlighting on selectionpublic boolean getHiliteOnTouch()
@SGWTInternal protected void _setSelected(com.google.gwt.dom.client.Element element)
@SGWTInternal protected void _clearSelected(com.google.gwt.dom.client.Element element)
public void setNavigationMode(NavigationMode navigationMode)
NavigationMode.WHOLE_RECORD.navigationMode - public final NavigationMode getNavigationMode()
public void setShowNavigation(boolean showNavigation)
setRecordNavigationProperty(String).showNavigation - public final boolean getShowNavigation()
public boolean getShowNavigation(Record record)
record navigation property is set
on the record in question, this will be respected, otherwise will return the result of the value set via setShowNavigation(boolean)record - public void setRecordNavigationProperty(java.lang.String recordNavigationProperty)
"_navigate".recordNavigationProperty - public java.lang.String getRecordNavigationProperty()
public final NavStack getParentNavStack()
NavStack.
If the navigationMode of this TableView is
NavigationMode.WHOLE_RECORD, you can set the
parentNavStack to the NavStack instance that contains this TableView
in its child widget hierarchy. Once set, this TableView will automatically
fade out and deselect the selected row when returning to the page that contains this
TableView, just like the standard iOS Settings app.
NavStack if one has been set; otherwise null.public void setParentNavStack(NavStack parentNavStack)
public void setSelectionType(SelectionStyle selectionType)
setSelectionType in class ListGridpublic void setRecordCanSelectProperty(java.lang.String recordCanSelectProperty)
setRecordCanSelectProperty in interface com.smartgwt.mobile.client.internal.data.HasRecordCanSelectPropertyAttributepublic final java.lang.String getRecordCanSelectProperty()
getRecordCanSelectProperty in interface com.smartgwt.mobile.client.internal.data.HasRecordCanSelectPropertyAttribute@SGWTInternal protected boolean _canSelectRecord(Record record)
public final boolean getShowSelectedIcon()
public void setShowSelectedIcon(boolean showSelectedIcon)
public final java.lang.String getDetailCountProperty()
public void setDetailCountProperty(java.lang.String detailCountProperty)
public final java.lang.String getCanRemoveProperty()
public void setCanRemoveProperty(java.lang.String canRemoveProperty)
public boolean isDeferRemoval()
public void setDeferRemoval(boolean deferRemoval)
public void setCellHeight(int cellHeight)
public final int getCellHeight()
public boolean getShowDetailCount()
public void setShowDetailCount(java.lang.Boolean showDetailCount)
public boolean getCanRemoveRecords()
public void setCanRemoveRecords(java.lang.Boolean canRemoveRecords)
public boolean getCanReorderRecords()
public void setCanReorderRecords(java.lang.Boolean canReorderRecords)
public boolean getShowIcons()
public void setShowIcons(java.lang.Boolean showIcons)
public java.lang.String getLoadingMessage()
public void setLoadingMessage(java.lang.String loadingMessage)
public final java.lang.String getEmptyMessage()
public void setEmptyMessage(java.lang.String emptyMessage)
public void setSelectedIcon(com.google.gwt.resources.client.ImageResource selectedIcon)
public final com.google.gwt.resources.client.ImageResource getSelectedIcon()
public void setNavIcon(com.google.gwt.resources.client.ImageResource img)
getShowNavigation()
returns true and getNavigationMode() is set to NavigationMode.NAVICON_ONLYimg - getNavigationIcon(Record)public final com.google.gwt.resources.client.ImageResource getNavIcon()
getShowNavigation() returns true and
getNavigationMode() is set to NavigationMode.NAVICON_ONLY. Default media
may be overridden via setNavIcon(ImageResource)getNavigationIcon(Record)public void setWholeRecordNavIcon(com.google.gwt.resources.client.ImageResource img)
getShowNavigation()
returns true and getNavigationMode() is set to NavigationMode.WHOLE_RECORDimg - getNavigationIcon(Record)public final com.google.gwt.resources.client.ImageResource getWholeRecordNavIcon()
getShowNavigation() returns true and
getNavigationMode() is set to NavigationMode.WHOLE_RECORD. Default media
may be overridden via setWholeRecordNavIcon(ImageResource)getNavigationIcon(Record)public com.google.gwt.resources.client.ImageResource getNavigationIcon(Record record)
getNavIcon() or getWholeRecordNavIcon() depending on
setNavigationMode(NavigationMode) but could be overridden to customize this
icon on a per-record basis.record - the recordpublic void showDeletableRecords()
public void hideDeletableRecords()
public void showMoveableRecords()
public void hideMoveableRecords()
public com.google.gwt.event.shared.HandlerRegistration addDataChangedHandler(DataChangedHandler handler)
handler - the handlerHandlerRegistrationpublic com.google.gwt.event.shared.HandlerRegistration addRecordNavigationClickHandler(RecordNavigationClickHandler handler)
setNavigationMode(NavigationMode)addRecordNavigationClickHandler in interface HasRecordNavigationClickHandlershandler - the handlerHandlerRegistrationpublic com.google.gwt.event.shared.HandlerRegistration addImageClickHandler(ImageClickHandler handler)
iconField
has been specifiedaddImageClickHandler in interface HasImageClickHandlershandler - the handlerHandlerRegistrationpublic com.google.gwt.event.shared.HandlerRegistration addRowContextClickHandler(RowContextClickHandler handler)
addRowContextClickHandler in interface HasRowContextClickHandlerspublic com.google.gwt.event.shared.HandlerRegistration addSelectionChangedHandler(SelectionChangedHandler handler)
SelectionEvent.getState() value for details
has been specifiedaddSelectionChangedHandler in interface HasSelectionChangedHandlershandler - the handlerHandlerRegistrationpublic com.google.gwt.event.shared.HandlerRegistration addDetailsSelectedHandler(DetailsSelectedHandler handler)
addDetailsSelectedHandler in interface HasDetailsSelectedHandlershandler - the handlerHandlerRegistration