Class TileGrid
- All Implemented Interfaces:
HasAttachHandlers
,HasHandlers
,EventListener
,HasVisibility
,IsWidget
,LogicalStructure
,DataBoundComponent
,HasClearHandlers
,HasClickHandlers
,HasDoubleClickHandlers
,HasDragCompleteHandlers
,HasDragMoveHandlers
,HasDragRepositionMoveHandlers
,HasDragRepositionStartHandlers
,HasDragRepositionStopHandlers
,HasDragResizeMoveHandlers
,HasDragResizeStartHandlers
,HasDragResizeStopHandlers
,HasDragStartHandlers
,HasDragStopHandlers
,HasDropCompleteHandlers
,HasDropHandlers
,HasDropMoveHandlers
,HasDropOutHandlers
,HasDropOverHandlers
,HasFetchDataHandlers
,HasFocusChangedHandlers
,HasHoverHandlers
,HasHoverHiddenHandlers
,HasKeyDownHandlers
,HasKeyPressHandlers
,HasMouseDownHandlers
,HasMouseMoveHandlers
,HasMouseOutHandlers
,HasMouseOverHandlers
,HasMouseStillDownHandlers
,HasMouseUpHandlers
,HasMouseWheelHandlers
,HasMovedHandlers
,HasParentMovedHandlers
,HasResizedHandlers
,HasRightMouseDownHandlers
,HasRuleContextChangedHandlers
,HasScrolledHandlers
,HasShowContextMenuHandlers
,HasVisibilityChangedHandlers
,HasDataArrivedHandlers
,HasRecordClickHandlers
,HasRecordContextClickHandlers
,HasRecordDoubleClickHandlers
,HasSelectionChangedHandlers
- Direct Known Subclasses:
TilePalette
DataBoundComponent
that displays a list of objects as a set of
"tiles", where each tile represents one object, and the tiles are laid out in a grid with multiple tiles per row. Each
tile displays one or more properties of the object it represents.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
-
Field Summary
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Perform a DataSource "add" operation to add new records to this component's DataSource.void
addData
(Record newRecord, DSCallback callback) void
addData
(Record newRecord, DSCallback callback, DSRequest requestProperties) Perform a DataSource "add" operation to add new records to this component's DataSource.addDataArrivedHandler
(DataArrivedHandler handler) Add a dataArrived handler.Add acom.smartgwt.client.widgets.DragCompleteHandler
.Add acom.smartgwt.client.widgets.DropCompleteHandler
.addFetchDataHandler
(FetchDataHandler handler) Add a fetchData handler.void
Convenience method to display a {@link com.smartgwt.client..FormulaBuilder} to create a new Formula Field.addRecordClickHandler
(RecordClickHandler handler) Add a recordClick handler.Add a recordContextClick handler.Add a recordDoubleClick handler.Add a selectionChanged handler.void
Convenience method to display a {@link com.smartgwt.client..SummaryBuilder} to create a new Summary Field.void
addTile()
This is not allowed for tileGrid.Whether at least one item is selected
static void
changeAutoChildDefaults
(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName
.static void
changeAutoChildDefaults
(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName
.protected JavaScriptObject
create()
void

 Deselect all records

void
deselectRange
(int startRow, int endRow) Deselect a contiguous range of records by index.void
deselectRecord
(int record) Deselect aRecord
passed in explicitly, or by index.void
deselectRecord
(Record record) Deselect aRecord
passed in explicitly, or by index.void
deselectRecords
(int[] records) Deselect a list ofRecord
s passed in explicitly, or by index.void
deselectRecords
(Record[] records) Deselect a list ofRecord
s passed in explicitly, or by index.void
disableHilite
(String hiliteID) Disable a hilite

void
Disable all hilites.

void
Shows a FieldPicker interface allowing end-users to rearrange the order and visibiility of the fields in the associated DataBoundComponent.void
Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent.void
enableHilite
(String hiliteID) Enable / disable ahilites


void
enableHilite
(String hiliteID, boolean enable) Enable / disable ahilites


void
Enable all hilites.

void
enableHiliting
(boolean enable) Enable all hilites.

void
void
exportData
(DSRequest requestProperties) void
exportData
(DSRequest requestProperties, RPCCallback callback) Uses a "fetch" operation on the currentDataSource
to retrieve data that matches the current filter and sort criteria for this component, then exports the resulting data to a file or window in the requested format.void
Retrieves data from the DataSource that matches the specified criteria.void
Retrieves data from the DataSource that matches the specified criteria.void
fetchData
(Criteria criteria, DSCallback callback) Retrieves data from the DataSource that matches the specified criteria.void
fetchData
(Criteria criteria, DSCallback callback, DSRequest requestProperties) Retrieves data from the DataSource that matches the specified criteria.void
Retrieves data that matches the provided criteria and displays the matching data in this component.void
filterData
(Criteria criteria) Retrieves data that matches the provided criteria and displays the matching data in this component.void
filterData
(Criteria criteria, DSCallback callback) Retrieves data that matches the provided criteria and displays the matching data in this component.void
filterData
(Criteria criteria, DSCallback callback, DSRequest requestProperties) Retrieves data that matches the provided criteria and displays the matching data in this component.find
(AdvancedCriteria adCriteria) Filters all objects according to the AdvancedCriteria passed and returns the first matching object or null if not foundRecord[]
findAll
(AdvancedCriteria adCriteria) Filters all objects according to the AdvancedCriteria passedint
findIndex
(AdvancedCriteria adCriteria) Finds the index of the first Record that matches with the AdvacendCriteria passed.int
findNextIndex
(int startIndex, AdvancedCriteria adCriteria) LikeRecordList.findIndex(java.util.Map)
, but considering the startIndex parameter.int
findNextIndex
(int startIndex, AdvancedCriteria adCriteria, int endIndex) LikeRecordList.findIndex(java.util.Map)
, but considering the startIndex and endIndex parameters.Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key.Text for a menu item allowing users to add a formula fieldoperationId
this component should use when performing add operations.Text for a menu item allowing users to add a formula fieldIf set, when the dataset changes due to filtering, sorting or other actions, any tiles that were showing before and after the change will animate from their old positions to their new positions.IfDataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be performed viaDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
If true, when this component is first drawn, automatically callDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
depending onDataBoundComponent.getAutoFetchAsFilter()
.IfautoFetchData
istrue
, this attribute allows the developer to specify a textMatchStyle for the initialDataBoundComponent.fetchData()
call.Indicates whether records can be dropped into this TileGrid.Adds an item to the header context menu allowing users to launch a dialog to define a new
 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.
Adds an item to the header context menu allowing users to launch a dialog to define a new
 text field that can contain both user-defined text and the formatted values present in other 
 fields, using the {@link com.smartgwt.client..SummaryBuilder}.
Indicates whether tiles can be dragged from thisTileGrid
and dropped elsewhere.Indicates whether tiles can be reordered by dragging within thisTileGrid
.Returns the tile currently under the mouse.Record[]
getData()
A List of TileRecord objects, specifying the data to be used to create the tiles.A TileGrid is adataArity
:multiple component.Return the tileGrid data as aRecordList
.How to fetch and manage records retrieve from the server.int
When usingdata paging
, how many records to fetch at a time.The DataSource that this component should bind to for default fields and for performingDataSource requests
.Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values.Automatically genereated DetailViewer instance used to render the content shown in Tiles by default.Properties for theDetailViewer
that is automatically created to render the contents of tiles by default.Record[]
During a drag-and-drop interaction, this method returns the set of records being dragged out of the component.Indicates what to do with data dragged into another DataBoundComponent.CSS Style to apply to the drag tracker when dragging occurs on this component.getDragTrackerTitle
(ListGridRecord record, int rowNum) Return "title" HTML to display as a drag tracker when the user drags some record.
Default implementation will display the cell value for the title field (seeListGrid.getTitleField()
) for the record(s) being dragged (including any icons / custom formatting / styling, etc).If drawing all tiles would cause no more thandrawAllMaxTiles
tiles to be rendered, the full dataset will instead be drawn even ifshowAllRecords
is false and incremental rendering would have otherwise been used.int
Returns the record index of the tile that would currently be dropped on by the drag in process.When an item is dropped on this component, andaddDropValues
is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that Smart GWT will apply to the dropped object before updating it.Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled.Text for a menu item allowing users to edit a formula fieldDefault class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.Text for a menu item allowing users to edit the formatter for a fieldThe string to display in the body of a tileGrid with an empty data array, ifshowEmptyMessage
is true.The CSS style name applied to theemptyMessage
if displayed.Setting exportAll to true prevents the component from passing its list of fields to the 
 export call.String[]
The list of field-names to export.If Summary rows exist for this component, whether to include them when exporting client data.Operation ID this component should use when performing fetch operations.IfautoFetchData
istrue
, this attribute allows the developer to declaratively specifyDSRequest
properties for the initialfetchData()
call.Returna an array of field alignments for this gridint
Return the number of fields.Return the fields as JavaScriptObjects rather than as SmartGWT Java wrappers of the field class type (e.g.Returns a snapshot of the current presentation of this grid's fields as aListGridFieldState
object.getFieldState
(Boolean sparse) Returns a snapshot of the current presentation of this grid's fields as aListGridFieldState
object.Marker that can be set on a record to flag that record as hilited.Hilite[]
Return the set of hilite-objects currently applied to this DataBoundComponent.Get the current hilites encoded as a String, for saving.Criteria that are never shown to or edited by the user and are cumulative with any criteria provided viaDataBoundComponent.initialCriteria
,DataBoundComponent.setCriteria()
etc.Criteria to use whenDataBoundComponent.setAutoFetchData(Boolean)
is used.The string to display in the body of a tileGrid while data is being loaded.The CSS style name applied to the loadingDataMessage string if displayed.If you have a databound tileGrid and you scroll out of the currently loaded dataset, by default you will see blank tiles until the server returns the data for those rows.Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.static TileGrid
getOrCreateRef
(JavaScriptObject jsObj) If set, detect and prevent duplicate records from being transferred to this component, either via
 drag and drop or viaDataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
.How many tiles should be present in a line when printing?Indicates whether or not this component will load its dataprogressively
int
getRecordIndex
(Record record) Get the index of the provided record.
Return the underlying data of this DataBoundComponent as aRecordList
.This property determines whether tiles that are no longer visible (due to scrolling) are recycled, allowing a large number of records to be displayed using a (potentially) much smaller set of tiles.operationId
this component should use when performing remove operations.boolean
If true, when an update operation occurs on a selected tile's record in adatabound
tileGrid, ensure the updated tile is re-selected when the operation completes.ifreselectOnUpdate
is true, this property governs what selection changed notifications should be triggered when a selected tile's record is edited then automatically reselected when the edited data is merged into the data set.Return the underlying data of this DataBoundComponent as aResultSet
.Optional identifier for saved searches that should be applied to this component.Returns the first selected record in this component.Record[]
Returns all selected records, as an Array.Defines a tileGrid's clickable-selection behavior.Whether tiles are created and drawn for all records, or only for those currently visible.Whether to show fields of non-atomic types when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.
By default, TileGrids will not show fields markeddetail:true
in the DataSource.Indicates whether the text of the emptyMessage property should be displayed if no data is available.Whether to show fields markedhidden:true
when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.
boolean
Whether to associate saved searches by default with the currentDataSource
of a component when asavedSearchId
is not provided.getSort()
Returns the currentSortSpecifiers
for this component.If true,ListGrid.getFieldState()
andListGrid.setFieldState(java.lang.String)
will omit state information for hidden fields by default.Style for the overall TileGrid component.getTile()
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.getTile
(int recordNum) Returns the tile for the passed record or record index.Returns the tile for the passed record or record index.Class-name of a Smart GWT component to use for each tile rendered by this TileGrid.Visual appearance to show when the tile is being dragged.protected String
getTileHTML
(Record record) This method provides the HTML to be displayed within each tile.int
getTileIndex
(Canvas tile) Returns the index of the specified tile.Common properties to use when creating every tile.getTileRecord
(Canvas tile) Given a tile within this this tile-grid, this method will return the associated record.Canvas[]
getTiles()
List of tiles that may be used by the TileGrid to show its current data set.Screen to create (viacreateScreen()
) for the tile in lieu of callinggetTile()
.Horizontal alignment for tile values: "left", "right" or "center".When using the defaultSimpleTile
, CSS style for each value shown within a tile.Method to return the fieldName which represents the "title" for records in this
 Component.

 If this.titleField is explicitly specified it will always be used.
 Otherwise, default implementation will checktitleField
for databound
 components.

 For non databound components returns the first defined field name of"title"
, 
"name"
, or"id"
.getTitleFieldValue
(Record record) Get the value of the titleField for the passed record
operationId
this component should use when performing update operations.If true, the set of fields given by the "default binding" (see 
fields
) is used, with any fields specified in
component.fields
acting as overrides that can suppress or modify the
 display of individual fields, without having to list the entire set of fields that
 should be shown.
TheuseFlatFields
flag causes all simple type fields anywhere in a nested
 set of DataSources to be exposed as a flat list for form binding.boolean
Should tile values change state when the mouse goes down on them?boolean
Should tile values change state when the mouse goes over them?boolean
Should tile values change state when they are selected?Whether values should be allowed to wrap by default, or should be shown on one line regardless of length.void
Invalidate the current data cache for this databound component via a call to the dataset'sinvalidateCache()
method, for example,ResultSet.invalidateCache()
.Loads all records that match this grid's current filter-criteria, optionally firing a callback when the data arrives.loadAllRecords
(Integer maxRecords) loadAllRecords
(Integer maxRecords, DSCallback callback) Loads all records that match this grid's current filter-criteria, optionally firing a callback when the data arrives.protected void
onInit()
protected void
void
removeData
(Record data) Perform a DataSource "remove" operation to remove records from this component's DataSource.void
removeData
(Record data, DSCallback callback) void
removeData
(Record data, DSCallback callback, DSRequest requestProperties) Perform a DataSource "remove" operation to remove records from this component's DataSource.void
Remove the currently selected records from this component.boolean
removeTile
(int tileID) This is not allowed for tileGrid.boolean
removeTile
(Canvas tileID) This is not allowed for tileGrid.boolean
removeTile
(String tileID) This is not allowed for tileGrid.void
Select all records

void
selectRange
(int startRow, int endRow) Select a contiguous range of records by indexvoid
selectRange
(int startRow, int endRow, boolean newState) Select a contiguous range of records by indexvoid
selectRecord
(int record) Select/deselect aRecord
passed in explicitly, or by index.void
selectRecord
(int record, boolean newState) Select/deselect aRecord
passed in explicitly, or by index.void
selectRecord
(Record record) Select/deselect aRecord
passed in explicitly, or by index.void
selectRecord
(Record record, boolean newState) Select/deselect aRecord
passed in explicitly, or by index.void
selectRecords
(int[] records) Select/deselect a list ofRecord
s passed in explicitly, or by index.void
selectRecords
(int[] records, boolean newState) Select/deselect a list ofRecord
s passed in explicitly, or by index.void
selectRecords
(Record[] records) Select/deselect a list ofRecord
s passed in explicitly, or by index.void
selectRecords
(Record[] records, boolean newState) Select/deselect a list ofRecord
s passed in explicitly, or by index.setAddDropValues
(Boolean addDropValues) Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key.setAddFormulaFieldText
(String addFormulaFieldText) Text for a menu item allowing users to add a formula fieldsetAddOperation
(String addOperation) operationId
this component should use when performing add operations.setAddSummaryFieldText
(String addSummaryFieldText) Text for a menu item allowing users to add a formula fieldsetAnimateTileChange
(Boolean animateTileChange) If set, when the dataset changes due to filtering, sorting or other actions, any tiles that were showing before and after the change will animate from their old positions to their new positions.setAutoFetchAsFilter
(Boolean autoFetchAsFilter) IfDataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be performed viaDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
setAutoFetchData
(Boolean autoFetchData) If true, when this component is first drawn, automatically callDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
depending onDataBoundComponent.getAutoFetchAsFilter()
.setAutoFetchTextMatchStyle
(TextMatchStyle autoFetchTextMatchStyle) IfautoFetchData
istrue
, this attribute allows the developer to specify a textMatchStyle for the initialDataBoundComponent.fetchData()
call.setCanAcceptDroppedRecords
(Boolean canAcceptDroppedRecords) Indicates whether records can be dropped into this TileGrid.setCanAddFormulaFields
(Boolean canAddFormulaFields) Adds an item to the header context menu allowing users to launch a dialog to define a new
 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.
setCanAddSummaryFields
(Boolean canAddSummaryFields) Adds an item to the header context menu allowing users to launch a dialog to define a new
 text field that can contain both user-defined text and the formatted values present in other 
 fields, using the {@link com.smartgwt.client..SummaryBuilder}.
setCanDragTilesOut
(Boolean canDragTilesOut) Indicates whether tiles can be dragged from thisTileGrid
and dropped elsewhere.setCanReorderTiles
(Boolean canReorderTiles) Indicates whether tiles can be reordered by dragging within thisTileGrid
.void
setCreateTileCustomizer
(CreateTileCustomizer customizer) Set customizer that definescreateTile
.A List of TileRecord objects, specifying the data to be used to create the tiles.setData
(RecordList data) A List of TileRecord objects, specifying the data to be used to create the tiles.setData
(TileRecord... data) A List of TileRecord objects, specifying the data to be used to create the tiles.setDataArity
(String dataArity) A TileGrid is adataArity
:multiple component.setDataFetchMode
(FetchMode dataFetchMode) How to fetch and manage records retrieve from the server.setDataPageSize
(int dataPageSize) When usingdata paging
, how many records to fetch at a time.setDataSource
(DataSource dataSource) The DataSource that this component should bind to for default fields and for performingDataSource requests
.void
setDataSource
(DataSource dataSource, DetailViewerField... fields) Bind to a DataSource.setDataSource
(String dataSource) The DataSource that this component should bind to for default fields and for performingDataSource requests
.setDeepCloneOnEdit
(Boolean deepCloneOnEdit) Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values.static void
setDefaultProperties
(TileGrid tileGridProperties) Class level method to set the default properties of this class.setDetailViewerProperties
(DetailViewer detailViewerProperties) Properties for theDetailViewer
that is automatically created to render the contents of tiles by default.setDragDataAction
(DragDataAction dragDataAction) Indicates what to do with data dragged into another DataBoundComponent.setDragDataCustomizer
(DragDataCustomizer customizer) During a drag-and-drop interaction, this method returns the set of records being dragged out of the component.setDragTrackerStyle
(String dragTrackerStyle) CSS Style to apply to the drag tracker when dragging occurs on this component.setDrawAllMaxTiles
(Integer drawAllMaxTiles) If drawing all tiles would cause no more thandrawAllMaxTiles
tiles to be rendered, the full dataset will instead be drawn even ifshowAllRecords
is false and incremental rendering would have otherwise been used.setDropValues
(Map dropValues) When an item is dropped on this component, andaddDropValues
is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that Smart GWT will apply to the dropped object before updating it.setDuplicateDragMessage
(String duplicateDragMessage) Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled.setEditFormulaFieldText
(String editFormulaFieldText) Text for a menu item allowing users to edit a formula fieldsetEditProxyConstructor
(String editProxyConstructor) Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.setEditSummaryFieldText
(String editSummaryFieldText) Text for a menu item allowing users to edit the formatter for a fieldsetEmptyMessage
(String emptyMessage) The string to display in the body of a tileGrid with an empty data array, ifshowEmptyMessage
is true.setEmptyMessageStyle
(String emptyMessageStyle) The CSS style name applied to theemptyMessage
if displayed.setExportAll
(Boolean exportAll) Setting exportAll to true prevents the component from passing its list of fields to the 
 export call.setExportFields
(String[] exportFields) The list of field-names to export.setExportIncludeSummaries
(Boolean exportIncludeSummaries) If Summary rows exist for this component, whether to include them when exporting client data.setFetchOperation
(String fetchOperation) Operation ID this component should use when performing fetch operations.setFetchRequestProperties
(DSRequest fetchRequestProperties) IfautoFetchData
istrue
, this attribute allows the developer to declaratively specifyDSRequest
properties for the initialfetchData()
call.setFields
(JavaScriptObject... fields) Field setter variant (alternative tosetFields(FormItem...)
,setFields(ListGridField...)
, etc.) that will accept an array of JavaScriptObject, rather than an array of SmartGWT Java wrappers of the field class type (e.g.setFields
(DetailViewerField... fields) Array of field definitions to control the default rendering of tiles.void
setFieldState
(String fieldState) Sets some presentation properties (visibility, width, userFormula and userSummary) of the grid fields based on theListGridFieldState
object passed in.
Used to restore previous state retrieved from the grid by a call togetFieldState()
.void
setFieldState
(String fieldState, Boolean isSparse) Sets some presentation properties (visibility, width, userFormula and userSummary) of the grid fields based on theListGridFieldState
object passed in.
Used to restore previous state retrieved from the grid by a call togetFieldState()
.setHiliteProperty
(String hiliteProperty) Marker that can be set on a record to flag that record as hilited.setHilites
(Hilite[] hilites) Accepts an array of hilite objects and applies them to this DataBoundComponent.setHiliteState
(String hiliteState) Set the current hilites based on a hiliteState String previously returned from getHilitesState.setImplicitCriteria
(Criteria implicitCriteria) Criteria that are never shown to or edited by the user and are cumulative with any criteria provided viaDataBoundComponent.initialCriteria
,DataBoundComponent.setCriteria()
etc.setImplicitCriteria
(Criteria implicitCriteria, DSCallback callback) setImplicitCriteria
(Criteria criteria, DSCallback callback, Boolean initialFetch) setInitialCriteria
(Criteria initialCriteria) Criteria to use whenDataBoundComponent.setAutoFetchData(Boolean)
is used.setLoadingDataMessage
(String loadingDataMessage) The string to display in the body of a tileGrid while data is being loaded.setLoadingDataMessageStyle
(String loadingDataMessageStyle) The CSS style name applied to the loadingDataMessage string if displayed.setLoadingMessage
(String loadingMessage) If you have a databound tileGrid and you scroll out of the currently loaded dataset, by default you will see blank tiles until the server returns the data for those rows.Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.setPreventDuplicates
(Boolean preventDuplicates) If set, detect and prevent duplicate records from being transferred to this component, either via
 drag and drop or viaDataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
.setPrintTilesPerLine
(Integer printTilesPerLine) How many tiles should be present in a line when printing?setProgressiveLoading
(Boolean progressiveLoading) Indicates whether or not this component will load its dataprogressively
setRecycleTiles
(Boolean recycleTiles) This property determines whether tiles that are no longer visible (due to scrolling) are recycled, allowing a large number of records to be displayed using a (potentially) much smaller set of tiles.setRemoveOperation
(String removeOperation) operationId
this component should use when performing remove operations.setReselectOnUpdate
(boolean reselectOnUpdate) If true, when an update operation occurs on a selected tile's record in adatabound
tileGrid, ensure the updated tile is re-selected when the operation completes.setReselectOnUpdateNotifications
(SelectionNotificationType reselectOnUpdateNotifications) ifreselectOnUpdate
is true, this property governs what selection changed notifications should be triggered when a selected tile's record is edited then automatically reselected when the edited data is merged into the data set.setSavedSearchId
(String savedSearchId) Optional identifier for saved searches that should be applied to this component.setSelectionType
(SelectionStyle selectionType) Defines a tileGrid's clickable-selection behavior.setShowAllRecords
(Boolean showAllRecords) Whether tiles are created and drawn for all records, or only for those currently visible.setShowComplexFields
(Boolean showComplexFields) Whether to show fields of non-atomic types when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.
setShowDetailFields
(Boolean showDetailFields) By default, TileGrids will not show fields markeddetail:true
in the DataSource.setShowEmptyMessage
(Boolean showEmptyMessage) Indicates whether the text of the emptyMessage property should be displayed if no data is available.setShowHiddenFields
(Boolean showHiddenFields) Whether to show fields markedhidden:true
when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.
setShowSavedSearchesByDS
(boolean showSavedSearchesByDS) Whether to associate saved searches by default with the currentDataSource
of a component when asavedSearchId
is not provided.setSort
(SortSpecifier... sortSpecifiers) Sort the component on one or more fields.setSparseFieldState
(Boolean sparseFieldState) If true,ListGrid.getFieldState()
andListGrid.setFieldState(java.lang.String)
will omit state information for hidden fields by default.void
setStyleName
(String styleName) Style for the overall TileGrid component.setTileConstructor
(String tileConstructor) Class-name of a Smart GWT component to use for each tile rendered by this TileGrid.setTileDragAppearance
(DragAppearance tileDragAppearance) Visual appearance to show when the tile is being dragged.setTileProperties
(Canvas tileProperties) Common properties to use when creating every tile.List of tiles that may be used by the TileGrid to show its current data set.setTileScreen
(String tileScreen) Screen to create (viacreateScreen()
) for the tile in lieu of callinggetTile()
.setTileValueAlign
(String tileValueAlign) Horizontal alignment for tile values: "left", "right" or "center".setTileValueStyle
(String tileValueStyle) When using the defaultSimpleTile
, CSS style for each value shown within a tile.setTitleField
(String titleField) Sets the best field to use for a user-visible title for an individual record from this component.setUpdateOperation
(String updateOperation) operationId
this component should use when performing update operations.void
setUpdateTileCustomizer
(UpdateTileCustomizer customizer) Set customizer that definesupdateTile
.setUseAllDataSourceFields
(Boolean useAllDataSourceFields) If true, the set of fields given by the "default binding" (see 
fields
) is used, with any fields specified in
component.fields
acting as overrides that can suppress or modify the
 display of individual fields, without having to list the entire set of fields that
 should be shown.
setUseFlatFields
(Boolean useFlatFields) TheuseFlatFields
flag causes all simple type fields anywhere in a nested
 set of DataSources to be exposed as a flat list for form binding.setValuesShowDown
(boolean valuesShowDown) Should tile values change state when the mouse goes down on them?setValuesShowRollOver
(boolean valuesShowRollOver) Should tile values change state when the mouse goes over them?setValuesShowSelected
(boolean valuesShowSelected) Should tile values change state when they are selected?setWrapValues
(Boolean wrapValues) Whether values should be allowed to wrap by default, or should be shown on one line regardless of length.void
sortByProperty
(String property, boolean ascending) Deprecated.void
transferRecords
(Record[] records, Record targetRecord, Integer index, Canvas sourceWidget, TransferRecordsCallback callback) Transfer a list ofRecord
s from another component (does not have to be a databound component) into this component.void
Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction.void
transferSelectedData
(DataBoundComponent source, int index) Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction.void
viewSelectedData
(ListGrid selectionComponent) Displays the currently selected record(s) of the selectionComponent widget (typically a listGrid) in this component.void
viewSelectedData
(TileGrid selectionComponent) Displays the currently selected record(s) of the selectionComponent widget (typically a listGrid) in this component.void
viewSelectedData
(String selectionComponent) Displays the currently selected record(s) of the selectionComponent widget (typically a listGrid) in this component.Methods inherited from class com.smartgwt.client.widgets.tile.TileLayout
addTile, addTile, getAutoWrapLines, getDragLine, getDragLineStyle, getDragLineThickness, getExpandMargins, getLayoutMargin, getOrientation, getOverflow, getPaddingAsLayoutMargin, getShowDragLine, getTileHeight, getTileHMargin, getTileMargin, getTileSize, getTilesPerLine, getTileVMargin, getTileWidth, layoutTiles, setAutoWrapLines, setDefaultProperties, setDragLineStyle, setDragLineThickness, setExpandMargins, setLayoutMargin, setLayoutPolicy, setLogicalStructure, setOrientation, setOverflow, setPaddingAsLayoutMargin, setShowDragLine, setTileHeight, setTileHMargin, setTileMargin, setTileSize, setTilesPerLine, setTileVMargin, setTileWidth, transformTileRect
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addChild, addChild, addClearHandler, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addRuleContextChangedHandler, addScrolledHandler, addShowContextMenuHandler, addSnapAlignCandidate, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clearExplicitTabIndex, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsEventTarget, containsFocus, containsPoint, containsPoint, dataContextChanged, deparent, depeer, disable, enable, encloses, focus, focusAfterGroup, focusAtEnd, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAdaptiveHeightPriority, getAdaptiveWidthPriority, getAlwaysManageFocusNavigation, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideEffect, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeLayoutMode, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaHandleID, getAriaRole, getAriaStateDefaults, getAutoMaskComponents, getAutoParent, getAutoPopulateData, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBorderRadius, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanAdaptHeight, getCanAdaptWidth, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenResizeSnapAlign, getChildrenSnapAlign, getChildrenSnapCenterAlign, getChildrenSnapEdgeAlign, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getChildTabPosition, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCorrectZoomOverflow, getCursor, getDataContext, getDataPath, getDefaultHeight, getDefaultWidth, getDefiningProperty, getDefiningPropertyName, getDefiningPropertyNameOptions, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragMaxHeight, getDragMaxWidth, getDragMinHeight, getDragMinWidth, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragTargetAsString, getDragType, getDropTarget, getDropTargetAsString, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getElement, getElement, getEnableWhen, getEndLine, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFloatingScrollbars, getFormItemAutoChild, getForwardSVGeventsToObject, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupPadding, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverAutoFitMaxWidth, getHoverAutoFitMaxWidthAsString, getHoverAutoFitWidth, getHoverComponent, getHoverDelay, getHoverFocusKey, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverPersist, getHoverScreen, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlElementAsString, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsRuleScope, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeaveGroupLabelSpace, getLeavePageSpace, getLeft, getLeftAsString, getLocalId, getLocateByIDOnly, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getLocatorName, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMatchElementHeight, getMatchElementWidth, getMaxHeight, getMaxWidth, getMaxZoomOverflowError, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getName, getNativeAutoHideScrollbars, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPaletteDefaults, getPanelContainer, getParentCanvas, getParentElement, getPeers, getPendingMarkerStyle, getPendingMarkerVisible, getPercentBox, getPercentSource, getPersistentMatchElement, getPointerSettings, getPointerTarget, getPointerTargetAsString, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrintStyleName, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getReceiveScrollbarEvents, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getRuleContext, getRuleContext, getRuleScope, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowColor, getShadowDepth, getShadowHOffset, getShadowImage, getShadowOffset, getShadowSoftness, getShadowSpread, getShadowVOffset, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowPointer, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSizeMayChangeOnRedraw, getSkinImgDir, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapGridLineProperties, getSnapGridStyle, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getStartLine, getTabIndex, getTestDataContext, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUISummary, getUpdateTabPositionOnDraw, getUpdateTabPositionOnReparent, getUseBackMask, getUseCSSShadow, getUseDragMask, getUseImageForSVG, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getValuesManagerAsString, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWhen, getVisibleWidth, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getWorkflows, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, initComplete, intersects, isDirty, isDisabled, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, print, print, print, print, printComponents, provideRuleContext, provideRuleContext, redraw, redraw, registerFontScaledPaddingStyles, removeChild, removeChild, removePeer, removePeer, removeRuleContext, removeSnapAlignCandidate, resizeAutoChildAttributes, resizeBy, resizeControls, resizeControlsTo, resizeFonts, resizeFonts, resizeFonts, resizeFontsTo, resizeIcons, resizePadding, resizePadding, resizeTo, resizeTo, revealChild, revealChild, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAdaptHeightByCustomizer, setAdaptiveHeightPriority, setAdaptiveWidthPriority, setAdaptWidthByCustomizer, setAlign, setAllowExternalFilters, setAlwaysManageFocusNavigation, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideEffect, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeLayoutMode, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoHeight, setAutoMaskComponents, setAutoParent, setAutoPopulateData, setAutoResizeAutoChildAttributes, setAutoResizeIcons, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorderRadius, setBottom, setCanAcceptDrop, setCanAdaptHeight, setCanAdaptWidth, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenResizeSnapAlign, setChildrenSnapAlign, setChildrenSnapCenterAlign, setChildrenSnapEdgeAlign, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCorrectZoomOverflow, setCursor, setDataContext, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultShowCustomScrollbars, setDefaultWidth, setDefiningProperty, setDefiningPropertyNameOptions, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragMaxHeight, setDragMaxWidth, setDragMinHeight, setDragMinWidth, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragTarget, setDragType, setDropTarget, setDropTarget, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setElement, setEnableWhen, setEndLine, setExtraSpace, setFacetId, setFloatingScrollbars, setForwardSVGeventsToObject, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupPadding, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverAutoFitMaxWidth, setHoverAutoFitMaxWidth, setHoverAutoFitWidth, setHoverDelay, setHoverFocusKey, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverPersist, setHoverScreen, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsRuleScope, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeaveGroupLabelSpace, setLeavePageSpace, setLeft, setLeft, setLocateByIDOnly, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLocatorName, setLocatorParent, setLocatorParent, setLogicalStructure, setMargin, setMatchElement, setMatchElementHeight, setMatchElementWidth, setMaxHeight, setMaxWidth, setMaxZoomOverflowError, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setName, setNativeAutoHideScrollbars, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setPadding, setPageLeft, setPageTop, setPanelContainer, setParentCanvas, setParentElement, setPeers, setPendingMarkerStyle, setPendingMarkerVisible, setPercentBox, setPercentSource, setPersistentMatchElement, setPointerSettings, setPointerTarget, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrintStyleName, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setReceiveScrollbarEvents, setRect, setRect, setRedrawOnResize, setRelativeTabPosition, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setRuleScope, setScrollbarConstructor, setScrollbarSize, setShadowColor, setShadowDepth, setShadowHOffset, setShadowImage, setShadowOffset, setShadowSoftness, setShadowSpread, setShadowVOffset, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowPointer, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSizeMayChangeOnRedraw, setSkinImgDir, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapGridLineProperties, setSnapGridStyle, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setStartLine, setTabIndex, setTestDataContext, setTitle, setTooltip, setTop, setTop, setUpdateTabPositionOnDraw, setUpdateTabPositionOnReparent, setUseBackMask, setUseCSSShadow, setUseDragMask, setUseImageForSVG, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setValuesManager, setVisibility, setVisible, setVisibleWhen, setWidth, setWidth, setWidth, setWidth100, setWorkflows, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPendingMarker, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, startDebuggingOverflow, stopDebuggingOverflow, updateChildTabPosition, updateChildTabPositions, updateEditNode, updateHover, updateHover, updateShadow, updateTabPositionForDraw, visibleAtPoint, willAcceptDrop
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, clearDynamicProperty, completeCreation, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hasDynamicProperty, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, isDrawn, isFactoryCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDefaultProperties, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, setLogicalStructure, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.smartgwt.client.widgets.DataBoundComponent
getOrCreateJsObj
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
TileGrid
public TileGrid() -
TileGrid
-
-
Method Details
-
getOrCreateRef
-
changeAutoChildDefaults
Changes the defaults for Canvas AutoChildren namedautoChildName
.- Parameters:
autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, seeSGWTProperties
.- See Also:
-
changeAutoChildDefaults
Changes the defaults for FormItem AutoChildren namedautoChildName
.- Parameters:
autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, seeSGWTProperties
.- See Also:
-
create
- Overrides:
create
in classTileLayout
-
setAnimateTileChange
If set, when the dataset changes due to filtering, sorting or other actions, any tiles that were showing before and after the change will animate from their old positions to their new positions.Note : This is an advanced setting
- Overrides:
setAnimateTileChange
in classTileLayout
- Parameters:
animateTileChange
- New animateTileChange value. Default value is true- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getAnimateTileChange
If set, when the dataset changes due to filtering, sorting or other actions, any tiles that were showing before and after the change will animate from their old positions to their new positions.- Overrides:
getAnimateTileChange
in classTileLayout
- Returns:
- Current animateTileChange value. Default value is true
- See Also:
-
setCanAcceptDroppedRecords
Indicates whether records can be dropped into this TileGrid.
If this method is called after the component has been drawn/initialized: Setter forcanAcceptDroppedRecords
.- Parameters:
canAcceptDroppedRecords
- New canAcceptDroppedRecords value. Default value is false- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getCanAcceptDroppedRecords
Indicates whether records can be dropped into this TileGrid.- Returns:
- Current canAcceptDroppedRecords value. Default value is false
- See Also:
-
setCanDragTilesOut
Indicates whether tiles can be dragged from thisTileGrid
and dropped elsewhere.NOTE: If
canDragTilesOut
is initially enabled or might bedynamically enabled
after the grid is created, it may be desirable to disabletouch scrolling
so that touch-dragging a tile starts a drag operation rather than a scroll. IfCanvas.disableTouchScrollingForDrag
is set totrue
, then touch scrolling will be disabled automatically. However, foraccessibility
reasons, it is recommended to leave touch scrolling enabled and provide an alternative set of controls that can be used to perform drag and drop of tiles out of the grid.
If this method is called after the component has been drawn/initialized: Setter forcanDragTilesOut
.- Parameters:
canDragTilesOut
- New canDragTilesOut value. Default value is false- Returns:
TileGrid
instance, for chaining setter calls
-
getCanDragTilesOut
Indicates whether tiles can be dragged from thisTileGrid
and dropped elsewhere.NOTE: If
canDragTilesOut
is initially enabled or might bedynamically enabled
after the grid is created, it may be desirable to disabletouch scrolling
so that touch-dragging a tile starts a drag operation rather than a scroll. IfCanvas.disableTouchScrollingForDrag
is set totrue
, then touch scrolling will be disabled automatically. However, foraccessibility
reasons, it is recommended to leave touch scrolling enabled and provide an alternative set of controls that can be used to perform drag and drop of tiles out of the grid.- Returns:
- Current canDragTilesOut value. Default value is false
-
setCanReorderTiles
Indicates whether tiles can be reordered by dragging within thisTileGrid
.NOTE: If
canReorderTiles
is initially enabled or might bedynamically enabled
after the grid is created, it may be desirable to disabletouch scrolling
so that touch-dragging a tile starts a reorder operation rather than a scroll. IfCanvas.disableTouchScrollingForDrag
is set totrue
, then touch scrolling will be disabled automatically. However, foraccessibility
reasons, it is recommended to leave touch scrolling enabled and provide an alternative set of controls that can be used to perform drag-reordering of tiles.
If this method is called after the component has been drawn/initialized: Setter forcanReorderTiles
.- Parameters:
canReorderTiles
- New canReorderTiles value. Default value is false- Returns:
TileGrid
instance, for chaining setter calls
-
getCanReorderTiles
Indicates whether tiles can be reordered by dragging within thisTileGrid
.NOTE: If
canReorderTiles
is initially enabled or might bedynamically enabled
after the grid is created, it may be desirable to disabletouch scrolling
so that touch-dragging a tile starts a reorder operation rather than a scroll. IfCanvas.disableTouchScrollingForDrag
is set totrue
, then touch scrolling will be disabled automatically. However, foraccessibility
reasons, it is recommended to leave touch scrolling enabled and provide an alternative set of controls that can be used to perform drag-reordering of tiles.- Returns:
- Current canReorderTiles value. Default value is false
-
setData
A List of TileRecord objects, specifying the data to be used to create the tiles.This property will typically not be explicitly specified for databound TileGrids, where the data is returned from the server via databound component methods such as
fetchData()
. In this case the data objects will be set to aresultSet
rather than a simple array.
If this method is called after the component has been drawn/initialized: Provides a new data set to the TileGrid after the grid has been created or drawn. The TileGrid will redraw to show the new data automatically.- Parameters:
data
- data to show in the list. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
setData
A List of TileRecord objects, specifying the data to be used to create the tiles.This property will typically not be explicitly specified for databound TileGrids, where the data is returned from the server via databound component methods such as
fetchData()
. In this case the data objects will be set to aresultSet
rather than a simple array.
If this method is called after the component has been drawn/initialized: Provides a new data set to the TileGrid after the grid has been created or drawn. The TileGrid will redraw to show the new data automatically.- Parameters:
data
- data to show in the list. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
setData
A List of TileRecord objects, specifying the data to be used to create the tiles.This property will typically not be explicitly specified for databound TileGrids, where the data is returned from the server via databound component methods such as
fetchData()
. In this case the data objects will be set to aresultSet
rather than a simple array.
If this method is called after the component has been drawn/initialized: Provides a new data set to the TileGrid after the grid has been created or drawn. The TileGrid will redraw to show the new data automatically.- Parameters:
data
- data to show in the list. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
setDataArity
A TileGrid is adataArity
:multiple component.Note : This is an advanced setting
- Parameters:
dataArity
- New dataArity value. Default value is "multiple"- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getDataArity
A TileGrid is adataArity
:multiple component.- Returns:
- Current dataArity value. Default value is "multiple"
- See Also:
-
setDataFetchMode
How to fetch and manage records retrieve from the server. SeeFetchMode
.This setting only applies to the
ResultSet
automatically created by callingfetchData()
. If a pre-existing ResultSet is passed to setData() instead, it's existing setting forResultSet.fetchMode
applies.- Specified by:
setDataFetchMode
in interfaceDataBoundComponent
- Parameters:
dataFetchMode
- New dataFetchMode value. Default value is "paged"- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getDataFetchMode
How to fetch and manage records retrieve from the server. SeeFetchMode
.This setting only applies to the
ResultSet
automatically created by callingfetchData()
. If a pre-existing ResultSet is passed to setData() instead, it's existing setting forResultSet.fetchMode
applies.- Specified by:
getDataFetchMode
in interfaceDataBoundComponent
- Returns:
- Current dataFetchMode value. Default value is "paged"
- See Also:
-
setDataSource
The DataSource that this component should bind to for default fields and for performingDataSource requests
.Can be specified as either a DataSource instance or the String ID of a DataSource.
- Specified by:
setDataSource
in interfaceDataBoundComponent
- Parameters:
dataSource
- New dataSource value. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
setDataSource
The DataSource that this component should bind to for default fields and for performingDataSource requests
.Can be specified as either a DataSource instance or the String ID of a DataSource.
- Specified by:
setDataSource
in interfaceDataBoundComponent
- Parameters:
dataSource
- New dataSource value. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getDetailViewer
Automatically genereated DetailViewer instance used to render the content shown in Tiles by default.This detailViewer is never actually drawn or displayed to the user - it is simply used to generate the contents of SimpleTiles as described in
getTileHTML()
.This component is an AutoChild named "detailViewer". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current detailViewer value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setDetailViewerProperties
public TileGrid setDetailViewerProperties(DetailViewer detailViewerProperties) throws IllegalStateException Properties for theDetailViewer
that is automatically created to render the contents of tiles by default.- Parameters:
detailViewerProperties
- New detailViewerProperties value. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getDetailViewerProperties
Properties for theDetailViewer
that is automatically created to render the contents of tiles by default.- Returns:
- Current detailViewerProperties value. Default value is null
-
setDrawAllMaxTiles
If drawing all tiles would cause no more thandrawAllMaxTiles
tiles to be rendered, the full dataset will instead be drawn even ifshowAllRecords
is false and incremental rendering would have otherwise been used.The
drawAllMaxTiles
setting prevents incremental rendering from being used in situations where it's really unnecessary, such as a 25 record dataset which happens to be in a grid with a viewport showing only 15 or so tiles. Incremental rendering causes a brief "flash" during scrolling as the visible portion of the dataset is redrawn, and a better scrolling experience can be obtained in this situation by drawing the entire dataset up front, which in this example would have negligible effect on initial draw time.drawAllMaxTiles:0
disables this features. You may want to disable this feature if performance is an issue and:- you very frequently redraw a grid
- you do a lot of computation when rendering each tile
- you are showing many grids on one screen and the user won't scroll most of them
Note : This is an advanced setting
- Parameters:
drawAllMaxTiles
- New drawAllMaxTiles value. Default value is 25- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getDrawAllMaxTiles
If drawing all tiles would cause no more thandrawAllMaxTiles
tiles to be rendered, the full dataset will instead be drawn even ifshowAllRecords
is false and incremental rendering would have otherwise been used.The
drawAllMaxTiles
setting prevents incremental rendering from being used in situations where it's really unnecessary, such as a 25 record dataset which happens to be in a grid with a viewport showing only 15 or so tiles. Incremental rendering causes a brief "flash" during scrolling as the visible portion of the dataset is redrawn, and a better scrolling experience can be obtained in this situation by drawing the entire dataset up front, which in this example would have negligible effect on initial draw time.drawAllMaxTiles:0
disables this features. You may want to disable this feature if performance is an issue and:- you very frequently redraw a grid
- you do a lot of computation when rendering each tile
- you are showing many grids on one screen and the user won't scroll most of them
- Returns:
- Current drawAllMaxTiles value. Default value is 25
- See Also:
-
setEditProxyConstructor
Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.- Overrides:
setEditProxyConstructor
in classCanvas
- Parameters:
editProxyConstructor
- New editProxyConstructor value. Default value is "GridEditProxy"- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getEditProxyConstructor
Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.- Overrides:
getEditProxyConstructor
in classCanvas
- Returns:
- Current editProxyConstructor value. Default value is "GridEditProxy"
- See Also:
-
setEmptyMessage
The string to display in the body of a tileGrid with an empty data array, ifshowEmptyMessage
is true.- Parameters:
emptyMessage
- New emptyMessage value. Default value is "No tiles to show."- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getEmptyMessage
The string to display in the body of a tileGrid with an empty data array, ifshowEmptyMessage
is true.- Returns:
- Current emptyMessage value. Default value is "No tiles to show."
- See Also:
-
setEmptyMessageStyle
The CSS style name applied to theemptyMessage
if displayed.- Parameters:
emptyMessageStyle
- New emptyMessageStyle value. Default value is "emptyMessage"- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getEmptyMessageStyle
The CSS style name applied to theemptyMessage
if displayed.- Returns:
- Current emptyMessageStyle value. Default value is "emptyMessage"
- See Also:
-
setFetchRequestProperties
public TileGrid setFetchRequestProperties(DSRequest fetchRequestProperties) throws IllegalStateException IfautoFetchData
istrue
, this attribute allows the developer to declaratively specifyDSRequest
properties for the initialfetchData()
call.Note that any properties governing more specific request attributes for the initial fetch (such as
autoFetchTextMatchStyle
) will be applied on top of this properties block.- Parameters:
fetchRequestProperties
- New fetchRequestProperties value. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getFetchRequestProperties
IfautoFetchData
istrue
, this attribute allows the developer to declaratively specifyDSRequest
properties for the initialfetchData()
call.Note that any properties governing more specific request attributes for the initial fetch (such as
autoFetchTextMatchStyle
) will be applied on top of this properties block.- Returns:
- Current fetchRequestProperties value. Default value is null
- See Also:
-
setFields
Array of field definitions to control the default rendering of tiles.If not specified, if the DataSource has an
iconField
, only theiconField
andtitleField
will be shown. Otherwise, all non-hidden
non-detail
fields will be shown, similar to the default set of fields shown by aListGrid
.Only applicable if using the default
SimpleTile
class for tiles. (Seetile
for more information).For SimpleTiles, it is possible to use
DetailViewerField.getCellStyle()
andStatefulCanvas.getStateSuffix()
to make a single field statefully styled:final TileGrid tileGrid = new TileGrid(); DetailViewerField animalNameField = new DetailViewerField("countryName"); animalNameField.setCellStyleHandler(new CellStyleHandler() { public String execute(Object value, DetailViewerField field, Record record) { SimpleTile tile = tileGrid.getCurrentTile(); if (value == "Tiger") return "tigerStyle" + tile.getStateSuffix(); else return "nonTigerStyle" + tile.getStateSuffix(); } }); tileGrid.setFields(animalNameField);
- Parameters:
fields
- New fields value. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
setLoadingDataMessage
The string to display in the body of a tileGrid while data is being loaded. Use"${loadingImage}"
to includea loading image
.- Parameters:
loadingDataMessage
- New loadingDataMessage value. Default value is "${loadingImage} Loading data..."- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getLoadingDataMessage
The string to display in the body of a tileGrid while data is being loaded. Use"${loadingImage}"
to includea loading image
.- Returns:
- Current loadingDataMessage value. Default value is "${loadingImage} Loading data..."
- See Also:
-
setLoadingDataMessageStyle
The CSS style name applied to the loadingDataMessage string if displayed.- Parameters:
loadingDataMessageStyle
- New loadingDataMessageStyle value. Default value is "loadingDataMessage"- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getLoadingDataMessageStyle
The CSS style name applied to the loadingDataMessage string if displayed.- Returns:
- Current loadingDataMessageStyle value. Default value is "loadingDataMessage"
- See Also:
-
setLoadingMessage
If you have a databound tileGrid and you scroll out of the currently loaded dataset, by default you will see blank tiles until the server returns the data for those rows. The loadingMessage attribute allows you to specify arbitrary html that will be shown in each such "blank" tile while the data for that tile is loading. (e.g. "<DIV ALIGN='CENTER'>LOADING</DIV>")- Parameters:
loadingMessage
- New loadingMessage value. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getLoadingMessage
If you have a databound tileGrid and you scroll out of the currently loaded dataset, by default you will see blank tiles until the server returns the data for those rows. The loadingMessage attribute allows you to specify arbitrary html that will be shown in each such "blank" tile while the data for that tile is loading. (e.g. "<DIV ALIGN='CENTER'>LOADING</DIV>")- Returns:
- Current loadingMessage value. Default value is null
- See Also:
-
setPrintTilesPerLine
How many tiles should be present in a line when printing?- Parameters:
printTilesPerLine
- New printTilesPerLine value. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getPrintTilesPerLine
How many tiles should be present in a line when printing?- Returns:
- Current printTilesPerLine value. Default value is null
-
setRecycleTiles
This property determines whether tiles that are no longer visible (due to scrolling) are recycled, allowing a large number of records to be displayed using a (potentially) much smaller set of tiles.Recycling tiles may significantly reduce the number of live tile widgets needed to support a particular TileGrid, but may also result in extra work when the TileGrid is scrolled, as a scroll that brings off-screen tiles into view will require recycling tiles that have left the view, even if the new tiles have been visited before (in previous scrolling).
Recycling will occur when
getTile()
is called, unless the supplied record (or record specified by index) is currently bound to an existing tile. Even if recycling is not enabled, the record associated with a given tile may change if the TileGrid data changes.For more control over the tile creation and recycling process, see
createTile()
andupdateTile()
.- Parameters:
recycleTiles
- New recycleTiles value. Default value is true- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getRecycleTiles
This property determines whether tiles that are no longer visible (due to scrolling) are recycled, allowing a large number of records to be displayed using a (potentially) much smaller set of tiles.Recycling tiles may significantly reduce the number of live tile widgets needed to support a particular TileGrid, but may also result in extra work when the TileGrid is scrolled, as a scroll that brings off-screen tiles into view will require recycling tiles that have left the view, even if the new tiles have been visited before (in previous scrolling).
Recycling will occur when
getTile()
is called, unless the supplied record (or record specified by index) is currently bound to an existing tile. Even if recycling is not enabled, the record associated with a given tile may change if the TileGrid data changes.For more control over the tile creation and recycling process, see
createTile()
andupdateTile()
.- Returns:
- Current recycleTiles value. Default value is true
-
setReselectOnUpdate
If true, when an update operation occurs on a selected tile's record in adatabound
tileGrid, ensure the updated tile is re-selected when the operation completes. ThereselectOnUpdateNotifications
attributes governs whetherselectionUpdated()
andCubeGrid.selectionChanged()
will fire when this occurs.Note : This is an advanced setting
- Parameters:
reselectOnUpdate
- New reselectOnUpdate value. Default value is true- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getReselectOnUpdate
public boolean getReselectOnUpdate()If true, when an update operation occurs on a selected tile's record in adatabound
tileGrid, ensure the updated tile is re-selected when the operation completes. ThereselectOnUpdateNotifications
attributes governs whetherselectionUpdated()
andCubeGrid.selectionChanged()
will fire when this occurs.- Returns:
- Current reselectOnUpdate value. Default value is true
-
setReselectOnUpdateNotifications
public TileGrid setReselectOnUpdateNotifications(SelectionNotificationType reselectOnUpdateNotifications) ifreselectOnUpdate
is true, this property governs what selection changed notifications should be triggered when a selected tile's record is edited then automatically reselected when the edited data is merged into the data set.Note : This is an advanced setting
- Parameters:
reselectOnUpdateNotifications
- New reselectOnUpdateNotifications value. Default value is "selectionChanged"- Returns:
TileGrid
instance, for chaining setter calls
-
getReselectOnUpdateNotifications
ifreselectOnUpdate
is true, this property governs what selection changed notifications should be triggered when a selected tile's record is edited then automatically reselected when the edited data is merged into the data set.- Returns:
- Current reselectOnUpdateNotifications value. Default value is "selectionChanged"
-
setSelectionType
Defines a tileGrid's clickable-selection behavior.- Parameters:
selectionType
- New selectionType value. Default value is Selection.MULTIPLE- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getSelectionType
Defines a tileGrid's clickable-selection behavior.- Returns:
- Current selectionType value. Default value is Selection.MULTIPLE
- See Also:
-
setShowAllRecords
Whether tiles are created and drawn for all records, or only for those currently visible.This setting is incompatible with
dataFetchMode
: "paged" as it requires all records matching the criteria to be fetched from the server at once.- Parameters:
showAllRecords
- New showAllRecords value. Default value is false- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getShowAllRecords
Whether tiles are created and drawn for all records, or only for those currently visible.This setting is incompatible with
dataFetchMode
: "paged" as it requires all records matching the criteria to be fetched from the server at once.- Returns:
- Current showAllRecords value. Default value is false
-
setShowDetailFields
By default, TileGrids will not show fields markeddetail:true
in the DataSource. See alsofields
.- Specified by:
setShowDetailFields
in interfaceDataBoundComponent
- Parameters:
showDetailFields
- New showDetailFields value. Default value is false- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getShowDetailFields
By default, TileGrids will not show fields markeddetail:true
in the DataSource. See alsofields
.- Specified by:
getShowDetailFields
in interfaceDataBoundComponent
- Returns:
- Current showDetailFields value. Default value is false
-
setShowEmptyMessage
Indicates whether the text of the emptyMessage property should be displayed if no data is available.- Parameters:
showEmptyMessage
- New showEmptyMessage value. Default value is true- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getShowEmptyMessage
Indicates whether the text of the emptyMessage property should be displayed if no data is available.- Returns:
- Current showEmptyMessage value. Default value is true
- See Also:
-
setStyleName
Style for the overall TileGrid component.- Overrides:
setStyleName
in classCanvas
- Parameters:
styleName
- New styleName value. Default value is "tileGrid"- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getStyleName
Style for the overall TileGrid component.- Overrides:
getStyleName
in classCanvas
- Returns:
- Current styleName value. Default value is "tileGrid"
- See Also:
-
getTile
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.A TileGrid automatically creates one tile per record in the dataset, via the
com.smartgwt.client.types.AutoChild
pattern.By default, the
SimpleTile
class will be used. This class automatically invokesgetTileHTML()
on the tileGrid to generate its content. The standardgetTileHTML()
method uses adetailViewer
to render html for the tile's record, based on the providedfields
(or on the default set of fields).To create a completely different appearance set
tileConstructor
to custom Canvas class name. You can use SmartGWT classes too with help of Reflection. For example, you can extend a DynamicForm with any layout:public class CarTile extends DynamicForm { public CarTile() { StaticTextItem name = new StaticTextItem("name"); name.setShowTitle(false); StaticTextItem price = new StaticTextItem("price"); price.setShowTitle(false); this.setFields(pictureItem, name, price); } }
Register the class factory and use it by passing it's class to tileConstructorpublic interface CarTileMetaFactory extends BeanFactory.MetaFactory { BeanFactory
getCarTileFactory(); } public void onModuleLoad() { GWT.create(CarTileMetaFactory.class); TileGrid tileGrid = new TileGrid(); tileGrid.setTileConstructor(CarTile.class.getName()); tileGrid.draw(); } - Returns:
- null
-
setTileConstructor
Class-name of a Smart GWT component to use for each tile rendered by this TileGrid. Tiles are created by thecom.smartgwt.client.types.AutoChild
pattern; seetile
.Any subclass of Canvas is allowed, but typically any custom class will derive from
SimpleTile
.When using a custom component for tileConstructor, DataBoundComponents that display multiple Records (ListGrid, DetailViewer) will have data provided via
ListGrid.setData()
, and components that display a single Record (DynamicForm) will haveDynamicForm.setValues()
called on them.If the component is not a recognized DataBoundComponent subclass, the Record can be accessed via
this.getAttributeAsRecord("record").
If you implement particularly simple or particularly complex tile interfaces, you may wish to adjust the property
drawAllMaxTiles
.- Parameters:
tileConstructor
- New tileConstructor value. Default value is "SimpleTile"- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getTileConstructor
Class-name of a Smart GWT component to use for each tile rendered by this TileGrid. Tiles are created by thecom.smartgwt.client.types.AutoChild
pattern; seetile
.Any subclass of Canvas is allowed, but typically any custom class will derive from
SimpleTile
.When using a custom component for tileConstructor, DataBoundComponents that display multiple Records (ListGrid, DetailViewer) will have data provided via
ListGrid.setData()
, and components that display a single Record (DynamicForm) will haveDynamicForm.setValues()
called on them.If the component is not a recognized DataBoundComponent subclass, the Record can be accessed via
this.getAttributeAsRecord("record").
If you implement particularly simple or particularly complex tile interfaces, you may wish to adjust the property
drawAllMaxTiles
.- Returns:
- Current tileConstructor value. Default value is "SimpleTile"
- See Also:
-
setTileDragAppearance
Visual appearance to show when the tile is being dragged.Note : This is an advanced setting
- Parameters:
tileDragAppearance
- New tileDragAppearance value. Default value is EventHandler.TRACKER- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getTileDragAppearance
Visual appearance to show when the tile is being dragged.- Returns:
- Current tileDragAppearance value. Default value is EventHandler.TRACKER
- See Also:
-
setTileProperties
Common properties to use when creating every tile.- Parameters:
tileProperties
- New tileProperties value. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- See Also:
-
getTileProperties
Common properties to use when creating every tile.- Returns:
- Current tileProperties value. Default value is null
-
setTiles
List of tiles that may be used by the TileGrid to show its current data set. Note that the Smart GWT framework manages this array for optimal performance, and not all tiles in the array are necessarily visible or assigned a record. This is true regardless of whetherrecycleTiles
is set or not.The number of records in the
TileGrid
's currentdata set
may be determined by callinggetLength()
on it.- Overrides:
setTiles
in classTileLayout
- Parameters:
tiles
- New tiles value. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getTiles
List of tiles that may be used by the TileGrid to show its current data set. Note that the Smart GWT framework manages this array for optimal performance, and not all tiles in the array are necessarily visible or assigned a record. This is true regardless of whetherrecycleTiles
is set or not.The number of records in the
TileGrid
's currentdata set
may be determined by callinggetLength()
on it.- Returns:
- Current tiles value. Default value is null
- See Also:
-
setTileScreen
Screen to create (viacreateScreen()
) for the tile in lieu of callinggetTile()
.If this grid has a
dataSource
, the created screen is provided with aCanvas.dataContext
that includes the record being expanded. Be sure the tile screen meets theserequirements
to utilize thedataContext
.- Parameters:
tileScreen
- New tileScreen value. Default value is null- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getTileScreen
Screen to create (viacreateScreen()
) for the tile in lieu of callinggetTile()
.If this grid has a
dataSource
, the created screen is provided with aCanvas.dataContext
that includes the record being expanded. Be sure the tile screen meets theserequirements
to utilize thedataContext
.- Returns:
- Current tileScreen value. Default value is null
-
setTileValueAlign
Horizontal alignment for tile values: "left", "right" or "center".- Parameters:
tileValueAlign
- New tileValueAlign value. Default value is "center"- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getTileValueAlign
Horizontal alignment for tile values: "left", "right" or "center".- Returns:
- Current tileValueAlign value. Default value is "center"
-
setTileValueStyle
When using the defaultSimpleTile
, CSS style for each value shown within a tile.- Parameters:
tileValueStyle
- New tileValueStyle value. Default value is "tileValue"- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getTileValueStyle
When using the defaultSimpleTile
, CSS style for each value shown within a tile.- Returns:
- Current tileValueStyle value. Default value is "tileValue"
- See Also:
-
setValuesShowDown
Should tile values change state when the mouse goes down on them?- Parameters:
valuesShowDown
- New valuesShowDown value. Default value is false- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getValuesShowDown
public boolean getValuesShowDown()Should tile values change state when the mouse goes down on them?- Returns:
- Current valuesShowDown value. Default value is false
-
setValuesShowRollOver
Should tile values change state when the mouse goes over them?- Parameters:
valuesShowRollOver
- New valuesShowRollOver value. Default value is false- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getValuesShowRollOver
public boolean getValuesShowRollOver()Should tile values change state when the mouse goes over them?- Returns:
- Current valuesShowRollOver value. Default value is false
-
setValuesShowSelected
Should tile values change state when they are selected?- Parameters:
valuesShowSelected
- New valuesShowSelected value. Default value is true- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getValuesShowSelected
public boolean getValuesShowSelected()Should tile values change state when they are selected?- Returns:
- Current valuesShowSelected value. Default value is true
-
setWrapValues
Whether values should be allowed to wrap by default, or should be shown on one line regardless of length.- Parameters:
wrapValues
- New wrapValues value. Default value is false- Returns:
TileGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getWrapValues
Whether values should be allowed to wrap by default, or should be shown on one line regardless of length.- Returns:
- Current wrapValues value. Default value is false
-
addData
Perform a DataSource "add" operation to add new records to this component's DataSource.- Parameters:
newRecord
- new record- See Also:
-
addData
- See Also:
-
addData
Perform a DataSource "add" operation to add new records to this component's DataSource.- Parameters:
newRecord
- new recordcallback
- method to call on operation completionrequestProperties
- additional properties to set on the DSRequest that will be issued- See Also:
-
addTile
public void addTile()This is not allowed for tileGrid. Instead, useaddData()
. -
addDataArrivedHandler
Add a dataArrived handler.Notification method fired when new data arrives from the server to be displayed in this tileGrid, (for example in response to the user scrolling a new set of tiles into view). Only applies to databound tileGrid where the
data
attribute is aResultSet
. This method is fired directly in response todataArrived()
firing on the data object.- Specified by:
addDataArrivedHandler
in interfaceHasDataArrivedHandlers
- Parameters:
handler
- the dataArrived handler- Returns:
HandlerRegistration
used to remove this handler
-
deselectRange
public void deselectRange(int startRow, int endRow) Deselect a contiguous range of records by index.This is a synonym for
selectRange(startRow, endRow, false);
- Parameters:
startRow
- start of selection rangeendRow
- end of selection range (non-inclusive)- See Also:
-
getCurrentTile
Returns the tile currently under the mouse.- Returns:
- the tile currently under the mouse
-
getDragTrackerTitle
Return "title" HTML to display as a drag tracker when the user drags some record.
Default implementation will display the cell value for the title field (seeListGrid.getTitleField()
) for the record(s) being dragged (including any icons / custom formatting / styling, etc).Note: Only called if
ListGrid.dragTrackerMode
is set to"title"
.- Parameters:
record
- First selected record being draggedrowNum
- row index of first record being dragged- Returns:
- Title for the row. Default implementation looks at the value of the title-field cell for the row.
-
getDropIndex
public int getDropIndex()Returns the record index of the tile that would currently be dropped on by the drag in process. Returns one beyond the last valid index to indicate a drop after all records. Except for that special case, a non-null index returned by this method may be passed togetTile()
to get the corresponding visible tile.- Overrides:
getDropIndex
in classTileLayout
- Returns:
- record index of tile that would currently be dropped on, or the record count for a drop after all records
- See Also:
-
getFieldState
Returns a snapshot of the current presentation of this grid's fields as aListGridFieldState
object.This object can be passed to
setFieldState()
to reset this grid's fields to the current state.Note that the information stored includes the current width and visibility of each of this grid's fields.
The optional
sparse
parameter governs whether the returned field state should omit state information for hidden fields. If this parameter is not passed explicitly, field state will be sparse ifDataBoundComponent.sparseFieldState
is true.
When applying sparse field state to a component viasetFieldState()
, any explicitly defined fields on the component that were not captured in the stored state object will be hidden.- Returns:
- current state of this grid's fields.
See
ListGridFieldState
- See Also:
-
getFieldState
Returns a snapshot of the current presentation of this grid's fields as aListGridFieldState
object.This object can be passed to
setFieldState()
to reset this grid's fields to the current state.Note that the information stored includes the current width and visibility of each of this grid's fields.
The optional
sparse
parameter governs whether the returned field state should omit state information for hidden fields. If this parameter is not passed explicitly, field state will be sparse ifDataBoundComponent.sparseFieldState
is true.
When applying sparse field state to a component viasetFieldState()
, any explicitly defined fields on the component that were not captured in the stored state object will be hidden.- Parameters:
sparse
- If true, field state will be ommitted for hidden fields.- Returns:
- current state of this grid's fields.
See
ListGridFieldState
- See Also:
-
getSelectedRecord
Returns the first selected record in this component.NOTE: If a record is returned, it should be treated as read-only and not modified.
- Returns:
- first selected record, or null if nothing selected
- See Also:
-
getTileIndex
Returns the index of the specified tile.- Parameters:
tile
- Tile you want to get the index for- Returns:
- index of the tile in this tileGrid. Will return -1 if the specified tile is not displayed within this grid.
-
getTileRecord
Given a tile within this this tile-grid, this method will return the associated record.- Parameters:
tile
- Tile you want to get the record for- Returns:
- Record associated with the specified tile
-
loadAllRecords
Loads all records that match this grid's current filter-criteria, optionally firing a callback when the data arrives.If the length of the data is
not known
, or is greater than the passed maxRecords, this call returns false. No fetch is issued and the callback, if passed, is not fired.If all data is
already loaded
, no fetch is issued and this call returns true. The callback, if passed, will be fired, but its parameters will be null, since there was no fetch to provide the values from.In all other cases, this call returns true and a fetch is issued for all necessary records. When the data arrives, the callback is fired.
- Returns:
- true if a fetch was made or was not needed - false otherwise
- See Also:
-
loadAllRecords
- See Also:
-
loadAllRecords
Loads all records that match this grid's current filter-criteria, optionally firing a callback when the data arrives.If the length of the data is
not known
, or is greater than the passed maxRecords, this call returns false. No fetch is issued and the callback, if passed, is not fired.If all data is
already loaded
, no fetch is issued and this call returns true. The callback, if passed, will be fired, but its parameters will be null, since there was no fetch to provide the values from.In all other cases, this call returns true and a fetch is issued for all necessary records. When the data arrives, the callback is fired.
- Parameters:
maxRecords
- optional maximum record count - if passed, no fetch takes place if maxRecords is below the known length of the datacallback
- callback to fire if a fetch is issued - if all data was already loaded, the callback is fired with no parameters- Returns:
- true if a fetch was made or was not needed - false otherwise
- See Also:
-
addRecordClickHandler
Add a recordClick handler.Executed when the tileGrid receives a 'click' event on a tile. The default implementation does nothing -- override to perform some action when any record is clicked.
A record event handler can be specified either as a function to execute, or as a string of script to evaluate. If the handler is defined as a string of script, all the parameters below will be available as variables for use in the script.
If you want to cancel the click based on the parameters, Callcom.smartgwt.client.widgets.tile.events.RecordClickEvent#cancel()
from withinRecordClickHandler.onRecordClick(com.smartgwt.client.widgets.tile.events.RecordClickEvent)
. Otherwise, return true so that the click event be registered with the tile.- Specified by:
addRecordClickHandler
in interfaceHasRecordClickHandlers
- Parameters:
handler
- the recordClick handler- Returns:
HandlerRegistration
used to remove this handler
-
addRecordContextClickHandler
Add a recordContextClick handler.Executed when the tileGrid receives a context-click (right mouse button) event on a tile. The default implementation does nothing -- override to perform some action when any record is right-clicked.
Cancel the event to suppress the native browser context menu.A record event handler can be specified either as a function to execute, or as a string of script to evaluate. If the handler is defined as a string of script, all the parameters below will be available as variables for use in the script.
If you want to cancel the click based on the parameters, CallRecordContextClickEvent.cancel()
from withinRecordContextClickHandler.onRecordContextClick(com.smartgwt.client.widgets.tile.events.RecordContextClickEvent)
. Otherwise, return true so that the click event be registered with the tile.- Specified by:
addRecordContextClickHandler
in interfaceHasRecordContextClickHandlers
- Parameters:
handler
- the recordContextClick handler- Returns:
HandlerRegistration
used to remove this handler
-
addRecordDoubleClickHandler
Add a recordDoubleClick handler.Executed when the tileGrid receives a 'doubleclick' event on a tile. The default implementation does nothing -- override to perform some action when any record is doubleclicked.
A record event handler can be specified either as a function to execute, or as a string of script to evaluate. If the handler is defined as a string of script, all the parameters below will be available as variables for use in the script.
If you want to cancel the doubleclick based on the parameters, Callcom.smartgwt.client.widgets.tile.events.RecordDoubleClickEvent#cancel()
from withinRecordDoubleClickHandler.onRecordDoubleClick(com.smartgwt.client.widgets.tile.events.RecordDoubleClickEvent)
. Otherwise, return true so that the doubleclick event be registered with the tile.- Specified by:
addRecordDoubleClickHandler
in interfaceHasRecordDoubleClickHandlers
- Parameters:
handler
- the recordDoubleClick handler- Returns:
HandlerRegistration
used to remove this handler
-
removeData
Perform a DataSource "remove" operation to remove records from this component's DataSource.- Parameters:
data
- primary key values of record to delete, (or complete record)- See Also:
-
removeData
-
removeData
Perform a DataSource "remove" operation to remove records from this component's DataSource.- Parameters:
data
- primary key values of record to delete, (or complete record)callback
- method to call on operation completionrequestProperties
- additional properties to set on the DSRequest that will be issued- See Also:
-
removeTile
This is not allowed for tileGrid. Instead, useremoveData()
.- Overrides:
removeTile
in classTileLayout
- Parameters:
tileID
- index or String ID of the tile- Returns:
- whether a tile was found and removed
-
removeTile
public boolean removeTile(int tileID) This is not allowed for tileGrid. Instead, useremoveData()
.- Overrides:
removeTile
in classTileLayout
- Parameters:
tileID
- index or String ID of the tile- Returns:
- whether a tile was found and removed
-
removeTile
This is not allowed for tileGrid. Instead, useremoveData()
.- Overrides:
removeTile
in classTileLayout
- Parameters:
tileID
- index or String ID of the tile- Returns:
- whether a tile was found and removed
-
addSelectionChangedHandler
Add a selectionChanged handler.Called when selection changes within this tileGrid. Note this method fires for each record for which selection is modified - so when a user clicks inside a tileGrid this method will typically fire twice (once for the old record being deselected, and once for the new record being selected).
- Specified by:
addSelectionChangedHandler
in interfaceHasSelectionChangedHandlers
- Parameters:
handler
- the selectionChanged handler- Returns:
HandlerRegistration
used to remove this handler
-
selectRange
public void selectRange(int startRow, int endRow) Select a contiguous range of records by index- Parameters:
startRow
- start of selection rangeendRow
- end of selection range (non-inclusive)- See Also:
-
selectRange
public void selectRange(int startRow, int endRow, boolean newState) Select a contiguous range of records by index- Parameters:
startRow
- start of selection rangeendRow
- end of selection range (non-inclusive)newState
- new selection state (if null, defaults to true)- See Also:
-
setFieldState
Sets some presentation properties (visibility, width, userFormula and userSummary) of the grid fields based on theListGridFieldState
object passed in.
Used to restore previous state retrieved from the grid by a call togetFieldState()
.The optional
isSparse
parameter may be passed to indicate whether the fieldState object is "sparse" - whether it includes explicit state information for hidden fields. In this case any fields defined on the component not explicitly included in the fieldState object will be hidden.
IfisSparse
is not explicitly passed as a parameter, sparseness will be assumed ifDataBoundComponent.sparseFieldState
is true.- Parameters:
fieldState
- state to apply to the grid's fields. SeeListGridFieldState
- See Also:
-
setFieldState
Sets some presentation properties (visibility, width, userFormula and userSummary) of the grid fields based on theListGridFieldState
object passed in.
Used to restore previous state retrieved from the grid by a call togetFieldState()
.The optional
isSparse
parameter may be passed to indicate whether the fieldState object is "sparse" - whether it includes explicit state information for hidden fields. In this case any fields defined on the component not explicitly included in the fieldState object will be hidden.
IfisSparse
is not explicitly passed as a parameter, sparseness will be assumed ifDataBoundComponent.sparseFieldState
is true.- Parameters:
fieldState
- state to apply to the grid's fields. SeeListGridFieldState
isSparse
- If true, the fieldState passed in is assumed to be "sparse". Any fields defined on this component without explicit field state values will be hidden.- See Also:
-
viewSelectedData
Displays the currently selected record(s) of the selectionComponent widget (typically a listGrid) in this component.For a DynamicForm the first record of the selection is shown after the form is placed into
read-only mode
. A subsequent call toDynamicForm.editRecord()
or similar will return the form to editability.Note that since field-level
canEdit:true
settings override the form-level canEdit setting the automatic change to read-only may not change every field. -
viewSelectedData
Displays the currently selected record(s) of the selectionComponent widget (typically a listGrid) in this component.For a DynamicForm the first record of the selection is shown after the form is placed into
read-only mode
. A subsequent call toDynamicForm.editRecord()
or similar will return the form to editability.Note that since field-level
canEdit:true
settings override the form-level canEdit setting the automatic change to read-only may not change every field. -
viewSelectedData
Displays the currently selected record(s) of the selectionComponent widget (typically a listGrid) in this component.For a DynamicForm the first record of the selection is shown after the form is placed into
read-only mode
. A subsequent call toDynamicForm.editRecord()
or similar will return the form to editability.Note that since field-level
canEdit:true
settings override the form-level canEdit setting the automatic change to read-only may not change every field. -
setDefaultProperties
Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
- Parameters:
tileGridProperties
- properties that should be used as new defaults when instances of this class are created- See Also:
-
onInit
protected void onInit() -
onInit_TileGrid
protected void onInit_TileGrid() -
getTileHTML
This method provides the HTML to be displayed within each tile. Seetile
. This is an override point.- Parameters:
record
- the tile for which HTML should be retrieved- Returns:
- HTML contents for the tile, as a String
-
getTile
Returns the tile for the passed record or record index.Note that this method may be overridden but developers should be aware that this method may be called repeatedly for the same record each time the TileGrid refreshes that row. If you override this API, you will need to cache and re-use the same tile objects per record. Typically this would be achieved by storing a pool of Tile objects that are re-used if a Record with the same primaryKey is passed to getTile().
When calling this method directly, if {@link com.smartgwt.client.widgets.tile.TileGrid@showAllRecords} is false, this may return null for records that are not currently visible.
- Parameters:
tile
- (TileRecord) record- Returns:
- (Canvas) tile for this record
-
getTile
Returns the tile for the passed record or record index.Note that this method may be overridden but developers should be aware that this method may be called repeatedly for the same record each time the TileGrid refreshes that row. If you override this API, you will need to cache and re-use the same tile objects per record. Typically this would be achieved by storing a pool of Tile objects that are re-used if a Record with the same primaryKey is passed to getTile().
When calling this method directly, if +link{showAllRecords} is false, this may return null for records that are not currently visible.
This is an override point
- Overrides:
getTile
in classTileLayout
- Parameters:
tile
- (int) index of record in this.data- Returns:
- (Canvas) tile for this record
-
getDataAsRecordList
Return the tileGrid data as aRecordList
. If the component is bound to a DataSource, the actual type of the RecordList instance will be aResultSet
.- Returns:
- the data
-
sortByProperty
Deprecated.UsesetSort(com.smartgwt.client.data.SortSpecifier...)
instead.Sort data by property.- Parameters:
property
- propertyascending
- direction
-
removeSelectedData
public void removeSelectedData()Remove the currently selected records from this component. If this is a databound grid, the records will be removed directly from the DataSource.If no records are selected, no action is taken. The grid will automatically be updated if the record deletion succeeds.
-
getSelection
Returns all selected records, as an Array.- Returns:
- list of records, empty list if nothing selected
-
setDataSource
Bind to a DataSource.Binding to a DataSource means that the component will use the DataSource to provide default data for its fields.
When binding to a new DataSource, if the component has any existing "fields" or has a dataset, these will be discarded by default, since it is assumed the new DataSource may represent a completely unrelated set of objects. If the old "fields" are still relevant, pass them to setDataSource().
- Parameters:
dataSource
-fields
-
-
setCreateTileCustomizer
Set customizer that definescreateTile
. That method will be called when a new tile is required.- Parameters:
CreateTileCustomizer
- customizer- See Also:
-
setUpdateTileCustomizer
Set customizer that definesupdateTile
. If both that method andcreateTile
have been defined andrecycleTiles
is true, this customizer method will be called when the framework needs to recycle a tile to be used with a new record. This notification provides an opportunity to update any widget properties that depend on the specifics of the record.- Parameters:
UpdateTileCustomizer
- customizer- See Also:
-
com.smartgwt.client.widgets.tile.CreateTileCustomizer#updateTile
getRecycleTiles()
-
getData
A List of TileRecord objects, specifying the data to be used to create the tiles.This property will typically not be explicitly specified for databound TileGrids, where the data is returned from the server via databound component methods such as
fetchData()
. In this case the data objects will be set to aresultSet
rather than a simple array.- Returns:
- Current data value. Default value is null
- See Also:
-
setDataPageSize
Description copied from interface:DataBoundComponent
When usingdata paging
, how many records to fetch at a time. If set to a positive integer,dataPageSize
will override the defaultresultSize
for ResultSets automatically created when you callfetchData()
(and similarly for theresultSize
of ResultTrees). The default of 0 means to just use the default page size of the data container.Note that regardless of the
dataPageSize
setting, a component will always fetch all of data that it needs to draw. Settings such asshowAllRecords:true
,drawAllMaxCells
anddrawAheadRatio
can cause more rows than the configureddataPageSize
to be fetched.- Specified by:
setDataPageSize
in interfaceDataBoundComponent
- Parameters:
dataPageSize
- dataPageSize Default value is 0- Returns:
DataBoundComponent
instance, for chaining setter calls- See Also:
-
getDataPageSize
public int getDataPageSize()Description copied from interface:DataBoundComponent
When usingdata paging
, how many records to fetch at a time. If set to a positive integer,dataPageSize
will override the defaultresultSize
for ResultSets automatically created when you callfetchData()
(and similarly for theresultSize
of ResultTrees). The default of 0 means to just use the default page size of the data container.Note that regardless of the
dataPageSize
setting, a component will always fetch all of data that it needs to draw. Settings such asshowAllRecords:true
,drawAllMaxCells
anddrawAheadRatio
can cause more rows than the configureddataPageSize
to be fetched.- Specified by:
getDataPageSize
in interfaceDataBoundComponent
- Returns:
- int
- See Also:
-
setUseAllDataSourceFields
Description copied from interface:DataBoundComponent
If true, the set of fields given by the "default binding" (see 
fields
) is used, with any fields specified in
component.fields
acting as overrides that can suppress or modify the
 display of individual fields, without having to list the entire set of fields that
 should be shown.

 If
component.fields
contains fields that are not found in the DataSource,
 they will be shown after the most recently referred to DataSource field. If the new
 fields appear first, they will be shown first.- Specified by:
setUseAllDataSourceFields
in interfaceDataBoundComponent
- Parameters:
useAllDataSourceFields
- useAllDataSourceFields Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getUseAllDataSourceFields
Description copied from interface:DataBoundComponent
If true, the set of fields given by the "default binding" (see 
fields
) is used, with any fields specified in
component.fields
acting as overrides that can suppress or modify the
 display of individual fields, without having to list the entire set of fields that
 should be shown.

 If
component.fields
contains fields that are not found in the DataSource,
 they will be shown after the most recently referred to DataSource field. If the new
 fields appear first, they will be shown first.- Specified by:
getUseAllDataSourceFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setSparseFieldState
Description copied from interface:DataBoundComponent
If true,ListGrid.getFieldState()
andListGrid.setFieldState(java.lang.String)
will omit state information for hidden fields by default.- Specified by:
setSparseFieldState
in interfaceDataBoundComponent
- Parameters:
sparseFieldState
- sparseFieldState Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getSparseFieldState
Description copied from interface:DataBoundComponent
If true,ListGrid.getFieldState()
andListGrid.setFieldState(java.lang.String)
will omit state information for hidden fields by default.- Specified by:
getSparseFieldState
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setShowHiddenFields
Description copied from interface:DataBoundComponent
Whether to show fields markedhidden:true
when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.

 The
hidden
property is used on DataSource fields to mark fields that are
 never of meaning to an end user.- Specified by:
setShowHiddenFields
in interfaceDataBoundComponent
- Parameters:
showHiddenFields
- showHiddenFields Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getShowHiddenFields
Description copied from interface:DataBoundComponent
Whether to show fields markedhidden:true
when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.

 The
hidden
property is used on DataSource fields to mark fields that are
 never of meaning to an end user.- Specified by:
getShowHiddenFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setShowComplexFields
Description copied from interface:DataBoundComponent
Whether to show fields of non-atomic types when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.

 If true, the component will show fields that declare a complex type, for example, a
 field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a
 DataSource that declares the fields of a shipping address (city, street name, etc).


 Such fields may need custom formatters or editors in order to create a usable interface,
 for example, an Address field in a ListGrid might use a custom formatter to combine the
 relevant fields of an address into one column, and might use a pop-up dialog for
 editing.
Note : This is an advanced setting
- Specified by:
setShowComplexFields
in interfaceDataBoundComponent
- Parameters:
showComplexFields
- showComplexFields Default value is true- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getShowComplexFields
Description copied from interface:DataBoundComponent
Whether to show fields of non-atomic types when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.

 If true, the component will show fields that declare a complex type, for example, a
 field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a
 DataSource that declares the fields of a shipping address (city, street name, etc).


 Such fields may need custom formatters or editors in order to create a usable interface,
 for example, an Address field in a ListGrid might use a custom formatter to combine the
 relevant fields of an address into one column, and might use a pop-up dialog for
 editing.
- Specified by:
getShowComplexFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setFetchOperation
Description copied from interface:DataBoundComponent
Operation ID this component should use when performing fetch operations.- Specified by:
setFetchOperation
in interfaceDataBoundComponent
- Parameters:
fetchOperation
- fetchOperation Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getFetchOperation
Description copied from interface:DataBoundComponent
Operation ID this component should use when performing fetch operations.- Specified by:
getFetchOperation
in interfaceDataBoundComponent
- Returns:
- String
-
setUpdateOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing update operations.- Specified by:
setUpdateOperation
in interfaceDataBoundComponent
- Parameters:
updateOperation
- Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls- See Also:
-
getUpdateOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing update operations.- Specified by:
getUpdateOperation
in interfaceDataBoundComponent
- Returns:
- String
- See Also:
-
setAddOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing add operations.- Specified by:
setAddOperation
in interfaceDataBoundComponent
- Parameters:
addOperation
- Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls- See Also:
-
getAddOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing add operations.- Specified by:
getAddOperation
in interfaceDataBoundComponent
- Returns:
- String
- See Also:
-
setRemoveOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing remove operations.- Specified by:
setRemoveOperation
in interfaceDataBoundComponent
- Parameters:
removeOperation
- Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls- See Also:
-
getRemoveOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing remove operations.- Specified by:
getRemoveOperation
in interfaceDataBoundComponent
- Returns:
- String
- See Also:
-
setExportFields
Description copied from interface:DataBoundComponent
The list of field-names to export. If provided, the field-list in the exported output is 
 limited and sorted as per the list.

 If exportFields is not provided, the exported output includes all visible fields 
 from this component, sorted as they appear.
- Specified by:
setExportFields
in interfaceDataBoundComponent
- Parameters:
exportFields
- exportFields Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getExportFields
Description copied from interface:DataBoundComponent
The list of field-names to export. If provided, the field-list in the exported output is 
 limited and sorted as per the list.

 If exportFields is not provided, the exported output includes all visible fields 
 from this component, sorted as they appear.
- Specified by:
getExportFields
in interfaceDataBoundComponent
- Returns:
- the list of field-names to export.
-
setExportAll
Description copied from interface:DataBoundComponent
Setting exportAll to true prevents the component from passing its list of fields to the 
 export call. The result is the export of all visible fields fromfields
.

 If exportAll is false, an export operation will first consider 

exportFields
, if it's set, and fall back on all visible fields from
fields
otherwise.- Specified by:
setExportAll
in interfaceDataBoundComponent
- Parameters:
exportAll
- exportAll Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getExportAll
Description copied from interface:DataBoundComponent
Setting exportAll to true prevents the component from passing its list of fields to the 
 export call. The result is the export of all visible fields fromfields
.

 If exportAll is false, an export operation will first consider 

exportFields
, if it's set, and fall back on all visible fields from
fields
otherwise.- Specified by:
getExportAll
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setExportIncludeSummaries
Description copied from interface:DataBoundComponent
If Summary rows exist for this component, whether to include them when exporting client data. Defaults to true if not set- Specified by:
setExportIncludeSummaries
in interfaceDataBoundComponent
- Parameters:
exportIncludeSummaries
- exportIncludeSummaries Default value is true- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getExportIncludeSummaries
Description copied from interface:DataBoundComponent
If Summary rows exist for this component, whether to include them when exporting client data. Defaults to true if not set- Specified by:
getExportIncludeSummaries
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setPreventDuplicates
Description copied from interface:DataBoundComponent
If set, detect and prevent duplicate records from being transferred to this component, either via
 drag and drop or viaDataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
. When a duplicate transfer is detected,
 a dialog will appear showing theduplicateDragMessage
.

 If the component either does not have a
DataSource
or has a DataSource with no
primaryKey
declared, duplicate checking is off by
 default. If duplicate checking is enabled, it looks for an existing record in the dataset
 that has all of the properties of the dragged record, and considers that a duplicate.

 For
DragDataAction
:"copy" where the target DataSource is related to the source
 DataSource by foreignKey, a duplicate means that the target list, as filtered by the current
 criteria, already has a record whose value for the foreignKey field matches the
 primaryKey of the record being transferred.

 For example, consider dragging "employees" to "teams", where "teams" has a field
 "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target
 grid has search criteria causing it to show all the members of one team. A duplicate -
 adding an employee to the same team twice - is when the target grid's dataset contains an
 record with "employeeId" matching the "id" field of the dropped employee.
- Specified by:
setPreventDuplicates
in interfaceDataBoundComponent
- Parameters:
preventDuplicates
- preventDuplicates Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getPreventDuplicates
Description copied from interface:DataBoundComponent
If set, detect and prevent duplicate records from being transferred to this component, either via
 drag and drop or viaDataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
. When a duplicate transfer is detected,
 a dialog will appear showing theduplicateDragMessage
.

 If the component either does not have a
DataSource
or has a DataSource with no
primaryKey
declared, duplicate checking is off by
 default. If duplicate checking is enabled, it looks for an existing record in the dataset
 that has all of the properties of the dragged record, and considers that a duplicate.

 For
DragDataAction
:"copy" where the target DataSource is related to the source
 DataSource by foreignKey, a duplicate means that the target list, as filtered by the current
 criteria, already has a record whose value for the foreignKey field matches the
 primaryKey of the record being transferred.

 For example, consider dragging "employees" to "teams", where "teams" has a field
 "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target
 grid has search criteria causing it to show all the members of one team. A duplicate -
 adding an employee to the same team twice - is when the target grid's dataset contains an
 record with "employeeId" matching the "id" field of the dropped employee.
- Specified by:
getPreventDuplicates
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setDuplicateDragMessage
Description copied from interface:DataBoundComponent
Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.- Specified by:
setDuplicateDragMessage
in interfaceDataBoundComponent
- Parameters:
duplicateDragMessage
- duplicateDragMessage Default value is "Duplicates not allowed"- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getDuplicateDragMessage
Description copied from interface:DataBoundComponent
Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.- Specified by:
getDuplicateDragMessage
in interfaceDataBoundComponent
- Returns:
- String
-
setAddDropValues
Description copied from interface:DataBoundComponent
Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. "Drop values" are properties of the dropped item that you wish to change (and persist) as a result of the item being dropped on this grid.If this value is true and this component is databound,
DataBoundComponent.getDropValues()
will be called for every databound item dropped on this grid, and an update performed on the item- Specified by:
setAddDropValues
in interfaceDataBoundComponent
- Parameters:
addDropValues
- addDropValues Default value is true- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getAddDropValues
Description copied from interface:DataBoundComponent
Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. "Drop values" are properties of the dropped item that you wish to change (and persist) as a result of the item being dropped on this grid.If this value is true and this component is databound,
DataBoundComponent.getDropValues()
will be called for every databound item dropped on this grid, and an update performed on the item- Specified by:
getAddDropValues
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setDropValues
Description copied from interface:DataBoundComponent
When an item is dropped on this component, andaddDropValues
is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that Smart GWT will apply to the dropped object before updating it.If this property is not defined, Smart GWT defaults to returning the selection criteria currently in place for this component. Thus, any databound items (for example, rows from other grids bound to the same DataSource) dropped on the grid will, by default, be subjected to an update that makes them conform to the grid's current filter criteria.
Note : This is an advanced setting
- Specified by:
setDropValues
in interfaceDataBoundComponent
- Parameters:
dropValues
- dropValues Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getDropValues
Description copied from interface:DataBoundComponent
When an item is dropped on this component, andaddDropValues
is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that Smart GWT will apply to the dropped object before updating it.If this property is not defined, Smart GWT defaults to returning the selection criteria currently in place for this component. Thus, any databound items (for example, rows from other grids bound to the same DataSource) dropped on the grid will, by default, be subjected to an update that makes them conform to the grid's current filter criteria.
Note : This is an advanced setting
- Specified by:
getDropValues
in interfaceDataBoundComponent
- Returns:
- Returns the "drop values" to apply to a record dropped on this component prior to update. Only
 applicable to databound components - see
dropValues
for more details. If multiple records 
 are being dropped, this method is called for each of them in turn.

 This method returns the following:

- 

- Nothing, if
addDropValues
is false 
 - dropValues, if that property is set. If the component's criteria object is applicable (as explained
 in the next item), it is merged into dropValues, with properties in dropValues taking precedence. 

- The component's criteria object, if the most recent textMatchStyle for the component was "exact" 
 and it is simple criteria (ie, not an AdvancedCriteria object) 

- Otherwise nothing 


 You can override this method if you need more complex setting of drop values than can be 
 provided by simply supplying a dropValues object.
 

- Nothing, if
-
setProgressiveLoading
Indicates whether or not this component will load its dataprogressively
- Parameters:
progressiveLoading
-- Returns:
DataBoundComponent
instance, for chaining setter calls- See Also:
-
getProgressiveLoading
Indicates whether or not this component will load its dataprogressively
- Returns:
- See Also:
-
setUseFlatFields
Description copied from interface:DataBoundComponent
TheuseFlatFields
flag causes all simple type fields anywhere in a nested
 set of DataSources to be exposed as a flat list for form binding. 


useFlatFields
is typically used with imported metadata, such as 
XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback)
from a 
XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback)
, as a means of eliminating levels of XML
 nesting that aren't meaningful in a user interface, without the cumbersome and fragile
 process of mapping form fields to XML structures.

 For example, having called
WebService.getInputDS(java.lang.String)
to retrieve the input message
 schema for a web service operation whose input message looks like this:

 <FindServices>
 <searchFor>search text</searchFor>
 <Options>
 <caseSensitive>false</caseSensitive>
 </Options>
 <IncludeInSearch>
 <serviceName>true</serviceName>
 <documentation>true</documentation>
 <keywords>true</keywords>
 </IncludeInSearch>
 </FindServices>


 SettinguseFlatFields
on aDynamicForm
that is bound to this input
 message schema would result in 5FormItem
reflecting the 5 simple type
 fields in the message.

 For this form, the result of
DynamicForm.getValues()
might look
 like:


{
 searchFor: "search text",
 caseSensitive: false,
 serviceName: true,
 documentation : true,
 keywords : true
 }

 When contacting aWebService
, these values can be automatically
 mapped to the structure of the input message for a web service operation by setting
 {@link com.smartgwt.client..WSRequest#getUseFlatFields useFlatFields} (for use withWebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)
) or by setting
useFlatFields
(for use with aDataSource
that is
'bound to a WSDL web service'
via
wsOperation
). 

 Using these two facilities in conjunction (component.useFlatFields and
 request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user
 presentation and when providing the data for XML messages.


 You can also set
useFlatFields
to automatically enable 
 "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a
 particular operationType.

 Note that
useFlatFields
is not generally recommended for use with structures
 where multiple simple type fields exist with the same name, however if used with such a
 structure, the first field to use a given name wins. "first" means the first field
 encountered in a depth first search. "wins" means only the first field will be present as a
 field when data binding.- Specified by:
setUseFlatFields
in interfaceDataBoundComponent
- Parameters:
useFlatFields
- useFlatFields Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getUseFlatFields
Description copied from interface:DataBoundComponent
TheuseFlatFields
flag causes all simple type fields anywhere in a nested
 set of DataSources to be exposed as a flat list for form binding. 


useFlatFields
is typically used with imported metadata, such as 
XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback)
from a 
XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback)
, as a means of eliminating levels of XML
 nesting that aren't meaningful in a user interface, without the cumbersome and fragile
 process of mapping form fields to XML structures.

 For example, having called
WebService.getInputDS(java.lang.String)
to retrieve the input message
 schema for a web service operation whose input message looks like this:

 <FindServices>
 <searchFor>search text</searchFor>
 <Options>
 <caseSensitive>false</caseSensitive>
 </Options>
 <IncludeInSearch>
 <serviceName>true</serviceName>
 <documentation>true</documentation>
 <keywords>true</keywords>
 </IncludeInSearch>
 </FindServices>


 SettinguseFlatFields
on aDynamicForm
that is bound to this input
 message schema would result in 5FormItem
reflecting the 5 simple type
 fields in the message.

 For this form, the result of
DynamicForm.getValues()
might look
 like:


{
 searchFor: "search text",
 caseSensitive: false,
 serviceName: true,
 documentation : true,
 keywords : true
 }

 When contacting aWebService
, these values can be automatically
 mapped to the structure of the input message for a web service operation by setting
 {@link com.smartgwt.client..WSRequest#getUseFlatFields useFlatFields} (for use withWebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)
) or by setting
useFlatFields
(for use with aDataSource
that is
'bound to a WSDL web service'
via
wsOperation
). 

 Using these two facilities in conjunction (component.useFlatFields and
 request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user
 presentation and when providing the data for XML messages.


 You can also set
useFlatFields
to automatically enable 
 "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a
 particular operationType.

 Note that
useFlatFields
is not generally recommended for use with structures
 where multiple simple type fields exist with the same name, however if used with such a
 structure, the first field to use a given name wins. "first" means the first field
 encountered in a depth first search. "wins" means only the first field will be present as a
 field when data binding.- Specified by:
getUseFlatFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setHiliteProperty
Description copied from interface:DataBoundComponent
Marker that can be set on a record to flag that record as hilited. Should be set to a value
 that matches {@link com.smartgwt.client..Hilite#getId id} for a hilite defined on this component.- Specified by:
setHiliteProperty
in interfaceDataBoundComponent
- Parameters:
hiliteProperty
- hiliteProperty Default value is "_hilite"- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getHiliteProperty
Description copied from interface:DataBoundComponent
Marker that can be set on a record to flag that record as hilited. Should be set to a value
 that matches {@link com.smartgwt.client..Hilite#getId id} for a hilite defined on this component.- Specified by:
getHiliteProperty
in interfaceDataBoundComponent
- Returns:
- String
-
editFields
public void editFields()Shows a FieldPicker interface allowing end-users to rearrange the order and visibiility of the fields in the associated DataBoundComponent. -
editHilites
public void editHilites()Description copied from interface:DataBoundComponent
Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent.- Specified by:
editHilites
in interfaceDataBoundComponent
-
getHiliteState
Description copied from interface:DataBoundComponent
Get the current hilites encoded as a String, for saving.- Specified by:
getHiliteState
in interfaceDataBoundComponent
- Returns:
- the hilite state
-
setHiliteState
Description copied from interface:DataBoundComponent
Set the current hilites based on a hiliteState String previously returned from getHilitesState.- Specified by:
setHiliteState
in interfaceDataBoundComponent
- Parameters:
hiliteState
- hilites state encoded as a String- Returns:
DataBoundComponent
instance, for chaining setter calls
-
setHilites
Description copied from interface:DataBoundComponent
Accepts an array of hilite objects and applies them to this DataBoundComponent. See alsogetHilites
for a method of retrieving the hilite array for storage, including hilites manually added by the user.NOTE: This is only supported on
ListGrid
for now.- Specified by:
setHilites
in interfaceDataBoundComponent
- Parameters:
hilites
- array of hilite objects- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getHilites
Description copied from interface:DataBoundComponent
Return the set of hilite-objects currently applied to this DataBoundComponent. These can be saved for storage and then restored to a component later via setHilites().- Specified by:
getHilites
in interfaceDataBoundComponent
- Returns:
- array of hilite objects
-
setDragDataAction
Description copied from class:TileLayout
Indicates what to do with data dragged into another DataBoundComponent. See DragDataAction type for details.- Specified by:
setDragDataAction
in interfaceDataBoundComponent
- Overrides:
setDragDataAction
in classTileLayout
- Parameters:
dragDataAction
- New dragDataAction value. Default value is Canvas.MOVE- Returns:
TileLayout
instance, for chaining setter calls- See Also:
-
getDragDataAction
Description copied from class:TileLayout
Indicates what to do with data dragged into another DataBoundComponent. See DragDataAction type for details.- Specified by:
getDragDataAction
in interfaceDataBoundComponent
- Overrides:
getDragDataAction
in classTileLayout
- Returns:
- Current dragDataAction value. Default value is Canvas.MOVE
- See Also:
-
setDragTrackerStyle
Description copied from interface:DataBoundComponent
CSS Style to apply to the drag tracker when dragging occurs on this component.- Specified by:
setDragTrackerStyle
in interfaceDataBoundComponent
- Parameters:
dragTrackerStyle
- dragTrackerStyle Default value is "gridDragTracker"- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getDragTrackerStyle
Description copied from interface:DataBoundComponent
CSS Style to apply to the drag tracker when dragging occurs on this component.- Specified by:
getDragTrackerStyle
in interfaceDataBoundComponent
- Returns:
- String
-
setCanAddFormulaFields
Description copied from interface:DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new
 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.

 User-added formula fields can be persisted via
ListGrid.getFieldState()
and 
ListGrid.setFieldState(java.lang.String)
.- Specified by:
setCanAddFormulaFields
in interfaceDataBoundComponent
- Parameters:
canAddFormulaFields
- canAddFormulaFields Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
addSummaryField
public void addSummaryField()Description copied from interface:DataBoundComponent
Convenience method to display a {@link com.smartgwt.client..SummaryBuilder} to create a new Summary Field. This 
 is equivalent to callingDataBoundComponentGen#editSummaryField
with 
 no parameter.

- Specified by:
addSummaryField
in interfaceDataBoundComponent
-
addFormulaField
public void addFormulaField()Description copied from interface:DataBoundComponent
Convenience method to display a {@link com.smartgwt.client..FormulaBuilder} to create a new Formula Field. This 
 is equivalent to callingDataBoundComponentGen#editFormulaField
with 
 no parameter.

- Specified by:
addFormulaField
in interfaceDataBoundComponent
-
getCanAddFormulaFields
Description copied from interface:DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new
 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.

 User-added formula fields can be persisted via
ListGrid.getFieldState()
and 
ListGrid.setFieldState(java.lang.String)
.- Specified by:
getCanAddFormulaFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setAddFormulaFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to add a formula field- Specified by:
setAddFormulaFieldText
in interfaceDataBoundComponent
- Parameters:
addFormulaFieldText
- addFormulaFieldText Default value is "Add formula column..."- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getAddFormulaFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to add a formula field- Specified by:
getAddFormulaFieldText
in interfaceDataBoundComponent
- Returns:
- String
-
setEditFormulaFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to edit a formula field- Specified by:
setEditFormulaFieldText
in interfaceDataBoundComponent
- Parameters:
editFormulaFieldText
- editFormulaFieldText Default value is "Edit formula..."- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getEditFormulaFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to edit a formula field- Specified by:
getEditFormulaFieldText
in interfaceDataBoundComponent
- Returns:
- String
-
setCanAddSummaryFields
Description copied from interface:DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new
 text field that can contain both user-defined text and the formatted values present in other 
 fields, using the {@link com.smartgwt.client..SummaryBuilder}.

 User-added summary fields can be persisted via
ListGrid.getFieldState()
and 
ListGrid.setFieldState(java.lang.String)
.- Specified by:
setCanAddSummaryFields
in interfaceDataBoundComponent
- Parameters:
canAddSummaryFields
- canAddSummaryFields Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getCanAddSummaryFields
Description copied from interface:DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new
 text field that can contain both user-defined text and the formatted values present in other 
 fields, using the {@link com.smartgwt.client..SummaryBuilder}.

 User-added summary fields can be persisted via
ListGrid.getFieldState()
and 
ListGrid.setFieldState(java.lang.String)
.- Specified by:
getCanAddSummaryFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setAddSummaryFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to add a formula field- Specified by:
setAddSummaryFieldText
in interfaceDataBoundComponent
- Parameters:
addSummaryFieldText
- addSummaryFieldText Default value is "Add summary column..."- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getAddSummaryFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to add a formula field- Specified by:
getAddSummaryFieldText
in interfaceDataBoundComponent
- Returns:
- String
-
setEditSummaryFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to edit the formatter for a field- Specified by:
setEditSummaryFieldText
in interfaceDataBoundComponent
- Parameters:
editSummaryFieldText
- editSummaryFieldText Default value is "Edit summary format..."- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getEditSummaryFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to edit the formatter for a field- Specified by:
getEditSummaryFieldText
in interfaceDataBoundComponent
- Returns:
- String
-
setSavedSearchId
Description copied from interface:DataBoundComponent
Optional identifier for saved searches that should be applied to this component.By default
SavedSearches
are associated with a component via itslocal ID
andDataSource ID
. This property allows developers to override this behavior and explicitly associate a component with a set of saved searches. This can provide a couple of benefits:
Firstly this ensures that saved searches will be unambiguously associated with the particular component even if the page changes such that a stored minimal locator would no longer applied to the component, without requiring an explicitCanvas.ID
.
Secondly this allows the same set of saved searches to be applied to more than one component on a page. This may be valueable for cases where the same information from the same dataSource is presented to users in multiple places.Note: This is an advanced setting.
- Specified by:
setSavedSearchId
in interfaceDataBoundComponent
- Parameters:
savedSearchId
- New savedSearchId value. Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getSavedSearchId
Description copied from interface:DataBoundComponent
Optional identifier for saved searches that should be applied to this component.By default
SavedSearches
are associated with a component via itslocal ID
andDataSource ID
. This property allows developers to override this behavior and explicitly associate a component with a set of saved searches. This can provide a couple of benefits:
Firstly this ensures that saved searches will be unambiguously associated with the particular component even if the page changes such that a stored minimal locator would no longer applied to the component, without requiring an explicitCanvas.ID
.
Secondly this allows the same set of saved searches to be applied to more than one component on a page. This may be valueable for cases where the same information from the same dataSource is presented to users in multiple places.- Specified by:
getSavedSearchId
in interfaceDataBoundComponent
- Returns:
- Current savedSearchId value. Default value is null
-
setShowSavedSearchesByDS
public TileGrid setShowSavedSearchesByDS(boolean showSavedSearchesByDS) throws IllegalStateException Description copied from interface:DataBoundComponent
Whether to associate saved searches by default with the currentDataSource
of a component when asavedSearchId
is not provided. If this property is true, then when the DataSource is changed, existing saved searches will disappear and only be available if the DataSource is set back to its original value.If this property is false, saved searches will persist across DataSource changes so that searches that aren't applicable to the current DataSource might still be shown.
Note: This is an advanced setting
- Specified by:
setShowSavedSearchesByDS
in interfaceDataBoundComponent
- Parameters:
showSavedSearchesByDS
- New showSavedSearchesByDS value. Default value is true- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getShowSavedSearchesByDS
public boolean getShowSavedSearchesByDS()Description copied from interface:DataBoundComponent
Whether to associate saved searches by default with the currentDataSource
of a component when asavedSearchId
is not provided. If this property is true, then when the DataSource is changed, existing saved searches will disappear and only be available if the DataSource is set back to its original value.If this property is false, saved searches will persist across DataSource changes so that searches that aren't applicable to the current DataSource might still be shown.
- Specified by:
getShowSavedSearchesByDS
in interfaceDataBoundComponent
- Returns:
- Current showSavedSearchesByDS value. Default value is true
-
findAll
Filters all objects according to the AdvancedCriteria passed- Parameters:
adCriteria
- AdvancedCriteria to use to filter results- Returns:
- all matching Objects or null if none found
-
find
Filters all objects according to the AdvancedCriteria passed and returns the first matching object or null if not found- Parameters:
adCriteria
- AdvancedCriteria to use to filter results- Returns:
- first matching object or null if not found
-
findIndex
Finds the index of the first Record that matches with the AdvacendCriteria passed.- Parameters:
adCriteria
- AdvancedCriteria to use to filter results- Returns:
- index of the first matching Record or -1 if not found
-
findNextIndex
LikeRecordList.findIndex(java.util.Map)
, but considering the startIndex and endIndex parameters.- Parameters:
startIndex
- first index to consideradCriteria
- AdvancedCriteria to use to filter resultsendIndex
- last index to consider- Returns:
- index of the first matching Record or -1 if not found
-
findNextIndex
LikeRecordList.findIndex(java.util.Map)
, but considering the startIndex parameter.- Parameters:
startIndex
- first index to consideradCriteria
- AdvancedCriteria to use to filter results- Returns:
- index of the first matching Record or -1 if not found
-
selectRecord
Description copied from interface:DataBoundComponent
Select/deselect aRecord
passed in explicitly, or by index.- Specified by:
selectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to select
-
selectRecord
public void selectRecord(int record) Description copied from interface:DataBoundComponent
Select/deselect aRecord
passed in explicitly, or by index.- Specified by:
selectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to select
-
selectRecord
public void selectRecord(int record, boolean newState) Description copied from interface:DataBoundComponent
Select/deselect aRecord
passed in explicitly, or by index.- Specified by:
selectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to selectnewState
- new selection state (if null, defaults to true)
-
selectRecord
Description copied from interface:DataBoundComponent
Select/deselect aRecord
passed in explicitly, or by index.- Specified by:
selectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to selectnewState
- new selection state (if null, defaults to true)
-
selectRecords
public void selectRecords(int[] records) Description copied from interface:DataBoundComponent
Select/deselect a list ofRecord
s passed in explicitly, or by index.- Specified by:
selectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to select
-
selectRecords
public void selectRecords(int[] records, boolean newState) Description copied from interface:DataBoundComponent
Select/deselect a list ofRecord
s passed in explicitly, or by index.- Specified by:
selectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to selectnewState
- new selection state
-
selectRecords
Description copied from interface:DataBoundComponent
Select/deselect a list ofRecord
s passed in explicitly, or by index.- Specified by:
selectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to select
-
selectRecords
Description copied from interface:DataBoundComponent
Select/deselect a list ofRecord
s passed in explicitly, or by index.- Specified by:
selectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to selectnewState
- new selection state (if null, defaults to true)
-
deselectRecord
Description copied from interface:DataBoundComponent
Deselect aRecord
passed in explicitly, or by index.Synonym for
selectRecord(record, false)
- Specified by:
deselectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to deselect
-
deselectRecord
public void deselectRecord(int record) Description copied from interface:DataBoundComponent
Deselect aRecord
passed in explicitly, or by index.Synonym for
selectRecord(record, false)
- Specified by:
deselectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to deselect
-
deselectRecords
public void deselectRecords(int[] records) Description copied from interface:DataBoundComponent
Deselect a list ofRecord
s passed in explicitly, or by index.Synonym for
selectRecords(records, false)
- Specified by:
deselectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to deselect
-
deselectRecords
Description copied from interface:DataBoundComponent
Deselect a list ofRecord
s passed in explicitly, or by index.Synonym for
selectRecords(records, false)
- Specified by:
deselectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to deselect
-
selectAllRecords
public void selectAllRecords()Description copied from interface:DataBoundComponent
Select all records

- Specified by:
selectAllRecords
in interfaceDataBoundComponent
-
deselectAllRecords
public void deselectAllRecords()Description copied from interface:DataBoundComponent

 Deselect all records

- Specified by:
deselectAllRecords
in interfaceDataBoundComponent
-
anySelected
Description copied from interface:DataBoundComponent
Whether at least one item is selected
- Specified by:
anySelected
in interfaceDataBoundComponent
- Returns:
- true == at least one item is selected false == nothing at all is selected
-
enableHilite
Description copied from interface:DataBoundComponent
Enable / disable ahilites


- Specified by:
enableHilite
in interfaceDataBoundComponent
- Parameters:
hiliteID
- ID of hilite to enable
-
enableHilite
Description copied from interface:DataBoundComponent
Enable / disable ahilites


- Specified by:
enableHilite
in interfaceDataBoundComponent
- Parameters:
hiliteID
- ID of hilite to enableenable
- new enabled state to apply - if null, defaults to true
-
disableHilite
Description copied from interface:DataBoundComponent
Disable a hilite

- Specified by:
disableHilite
in interfaceDataBoundComponent
- Parameters:
hiliteID
- ID of hilite to disable
-
enableHiliting
public void enableHiliting()Description copied from interface:DataBoundComponent
Enable all hilites.

- Specified by:
enableHiliting
in interfaceDataBoundComponent
-
enableHiliting
public void enableHiliting(boolean enable) Description copied from interface:DataBoundComponent
Enable all hilites.

- Specified by:
enableHiliting
in interfaceDataBoundComponent
- Parameters:
enable
- new enabled state to apply - if null, defaults to true
-
disableHiliting
public void disableHiliting()Description copied from interface:DataBoundComponent
Disable all hilites.

- Specified by:
disableHiliting
in interfaceDataBoundComponent
-
getDragData
Description copied from interface:DataBoundComponent
During a drag-and-drop interaction, this method returns the set of records being dragged out of the component. In the default implementation, this is the list of currently selected records.This method is consulted by

ListGrid.willAcceptDrop()
.- Specified by:
getDragData
in interfaceDataBoundComponent
- Returns:
- Array of
Record
s that are currently selected.
-
transferSelectedData
Description copied from interface:DataBoundComponent
Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction. This method acts on the dropped records exactly as if they had been dropped in an actual drag / drop interaction, including any special databound behavior invoked by callingDataBoundComponent.getDropValues()
for each dropped record.To transfer all data in, for example, a
ListGrid
, call grid.selection.selectAll() first.Note that drag/drop type transfers of records between components are asynchronous operations: Smart GWT may need to perform server turnarounds to establish whether dropped records already exist in the target component. Therefore, it is possible to issue a call to
transferSelectedData()
and/or thedrop()
method of a databound component whilst a transfer is still active. When this happens, Smart GWT adds the second and subsequent transfer requests to a queue and runs them one after the other. If you want to be notified when a transfer process has actually completed, useHasDropCompleteHandlers.addDropCompleteHandler(com.smartgwt.client.widgets.events.DropCompleteHandler)
. See theDragging
documentation for an overview of list grid drag/drop data transfer.- Specified by:
transferSelectedData
in interfaceDataBoundComponent
- Parameters:
source
- source component from which the records will be tranferred
-
transferSelectedData
Description copied from interface:DataBoundComponent
Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction. This method acts on the dropped records exactly as if they had been dropped in an actual drag / drop interaction, including any special databound behavior invoked by callingDataBoundComponent.getDropValues()
for each dropped record.To transfer all data in, for example, a
ListGrid
, call grid.selection.selectAll() first.Note that drag/drop type transfers of records between components are asynchronous operations: Smart GWT may need to perform server turnarounds to establish whether dropped records already exist in the target component. Therefore, it is possible to issue a call to
transferSelectedData()
and/or thedrop()
method of a databound component whilst a transfer is still active. When this happens, Smart GWT adds the second and subsequent transfer requests to a queue and runs them one after the other. If you want to be notified when a transfer process has actually completed, useHasDropCompleteHandlers.addDropCompleteHandler(com.smartgwt.client.widgets.events.DropCompleteHandler)
. See theDragging
documentation for an overview of list grid drag/drop data transfer.- Specified by:
transferSelectedData
in interfaceDataBoundComponent
- Parameters:
source
- source component from which the records will be transferredindex
- target index (drop position) of the rows within this grid.
-
getRecordIndex
Description copied from interface:DataBoundComponent
Get the index of the provided record.

 Override in subclasses to provide more specific behaviour, for instance, when data holds a
 large number of records


- Specified by:
getRecordIndex
in interfaceDataBoundComponent
- Parameters:
record
- the record whose index is to be retrieved- Returns:
- indexindex of the record, or -1 if not found
-
getTitleFieldValue
Description copied from interface:DataBoundComponent
Get the value of the titleField for the passed record

 Override in subclasses 


- Specified by:
getTitleFieldValue
in interfaceDataBoundComponent
- Parameters:
record
- the record whose index is to be retrieved- Returns:
- valuethe value of the titleField for the passed record
-
setTitleField
Description copied from interface:DataBoundComponent
Sets the best field to use for a user-visible title for an individual record from this component.- Specified by:
setTitleField
in interfaceDataBoundComponent
- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getTitleField
Description copied from interface:DataBoundComponent
Method to return the fieldName which represents the "title" for records in this
 Component.

 If this.titleField is explicitly specified it will always be used.
 Otherwise, default implementation will checktitleField
for databound
 components.

 For non databound components returns the first defined field name of"title"
, 
"name"
, or"id"
. If we dont find any field-names that match these
 titles, the first field in the component will be used instead.
- Specified by:
getTitleField
in interfaceDataBoundComponent
- Returns:
- fieldName the title field for this component.
-
getDataSource
Description copied from interface:DataBoundComponent
The DataSource that this component should bind to for default fields and for performingDataSource requests
.- Specified by:
getDataSource
in interfaceDataBoundComponent
- Returns:
- DataSource
-
setAutoFetchData
Description copied from interface:DataBoundComponent
If true, when this component is first drawn, automatically callDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
depending onDataBoundComponent.getAutoFetchAsFilter()
. Criteria for this fetch may be picked up frominitialCriteria
and textMatchStyle may be specified viaDataBoundComponent.getAutoFetchTextMatchStyle()
.NOTE: If autoFetchData is set, calling ListGrid.fetchData() before draw will cause two requests to be issued, one from the manual call to fetchData() and one from the autoFetchData setting. The second request will use only
initialCriteria
and not any other criteria or settings from the first request. Generally, turn off autoFetchData if you are going to manually call fetchData() at any time.- Specified by:
setAutoFetchData
in interfaceDataBoundComponent
- Parameters:
autoFetchData
- autoFetchData- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
-
getAutoFetchData
Description copied from interface:DataBoundComponent
If true, when this component is first drawn, automatically callDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
depending onDataBoundComponent.getAutoFetchAsFilter()
. Criteria for this fetch may be picked up frominitialCriteria
and textMatchStyle may be specified viaDataBoundComponent.getAutoFetchTextMatchStyle()
.NOTE: If autoFetchData is set, calling ListGrid.fetchData() before draw will cause two requests to be issued, one from the manual call to fetchData() and one from the autoFetchData setting. The second request will use only
initialCriteria
and not any other criteria or settings from the first request. Generally, turn off autoFetchData if you are going to manually call fetchData() at any time.- Specified by:
getAutoFetchData
in interfaceDataBoundComponent
- Returns:
- autoFetchData autoFetchData
-
setAutoFetchTextMatchStyle
public TileGrid setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle) throws IllegalStateException Description copied from interface:DataBoundComponent
IfautoFetchData
istrue
, this attribute allows the developer to specify a textMatchStyle for the initialDataBoundComponent.fetchData()
call.- Specified by:
setAutoFetchTextMatchStyle
in interfaceDataBoundComponent
- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
-
getAutoFetchTextMatchStyle
Description copied from interface:DataBoundComponent
IfautoFetchData
istrue
, this attribute allows the developer to specify a textMatchStyle for the initialDataBoundComponent.fetchData()
call.- Specified by:
getAutoFetchTextMatchStyle
in interfaceDataBoundComponent
- Returns:
- autoFetchTextMatchStyle autoFetchTextMatchStyle
-
setAutoFetchAsFilter
Description copied from interface:DataBoundComponent
IfDataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be performed viaDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
- Specified by:
setAutoFetchAsFilter
in interfaceDataBoundComponent
- Parameters:
autoFetchAsFilter
- autoFetchAsFilter- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
-
getAutoFetchAsFilter
Description copied from interface:DataBoundComponent
IfDataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be performed viaDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
- Specified by:
getAutoFetchAsFilter
in interfaceDataBoundComponent
- Returns:
- auto fetch as filter
-
setInitialCriteria
Description copied from interface:DataBoundComponent
Criteria to use whenDataBoundComponent.setAutoFetchData(Boolean)
is used.- Specified by:
setInitialCriteria
in interfaceDataBoundComponent
- Parameters:
initialCriteria
- the initial criteria- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getInitialCriteria
Description copied from interface:DataBoundComponent
Criteria to use whenDataBoundComponent.setAutoFetchData(Boolean)
is used.- Specified by:
getInitialCriteria
in interfaceDataBoundComponent
- Returns:
- the criteria
-
setImplicitCriteria
Description copied from interface:DataBoundComponent
Criteria that are never shown to or edited by the user and are cumulative with any criteria provided viaDataBoundComponent.initialCriteria
,DataBoundComponent.setCriteria()
etc.- Specified by:
setImplicitCriteria
in interfaceDataBoundComponent
- Parameters:
implicitCriteria
- New implicitCriteria value. Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls
-
setImplicitCriteria
-
setImplicitCriteria
-
getImplicitCriteria
Description copied from interface:DataBoundComponent
Criteria that are never shown to or edited by the user and are cumulative with any criteria provided viaDataBoundComponent.initialCriteria
,DataBoundComponent.setCriteria()
etc.- Specified by:
getImplicitCriteria
in interfaceDataBoundComponent
- Returns:
- Current implicitCriteria value. Default value is null
-
fetchData
public void fetchData()Description copied from interface:DataBoundComponent
Retrieves data from the DataSource that matches the specified criteria.When
fetchData()
is first called, if data has not already been provided viasetData()
, this method will create aResultSet
, which will be configured based on component settings such asfetchOperation
anddataPageSize
, as well as the general purposedataProperties
. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.NOTE: do not use both
autoFetchData
and a call tofetchData()
- this may result in two DSRequests to fetch data. Use eitherautoFetchData
andsetAutoFetchCriteria()
or a manual call to fetchData() passing criteria.Whether a ResultSet was automatically created or provided via
setData()
, subsequent calls to fetchData() will simply callresultSet.setCriteria()
.Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call
willFetchData(criteria)
to determine if new criteria will result in a server fetch.If you need to force data to be re-fetched, you can call
invalidateCache()
and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when usinginvalidateCache()
there is no need to also callfetchData()
and in fact this could produce unexpected results.This method takes an optional callback parameter (set to a
DSCallback
) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can useresultSet.willFetchData()
to determine whether or not a server fetch will occur whenfetchData()
is called with new criteria.In addition to the callback parameter for this method, developers can use
resultSet.addDataArrivedHandler
to be notified every time data is loaded.- Specified by:
fetchData
in interfaceDataBoundComponent
-
fetchData
Description copied from interface:DataBoundComponent
Retrieves data from the DataSource that matches the specified criteria.When
fetchData()
is first called, if data has not already been provided viasetData()
, this method will create aResultSet
, which will be configured based on component settings such asfetchOperation
anddataPageSize
, as well as the general purposedataProperties
. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.NOTE: do not use both
autoFetchData
and a call tofetchData()
- this may result in two DSRequests to fetch data. Use eitherautoFetchData
andsetAutoFetchCriteria()
or a manual call to fetchData() passing criteria.Whether a ResultSet was automatically created or provided via
setData()
, subsequent calls to fetchData() will simply callresultSet.setCriteria()
.Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call
willFetchData(criteria)
to determine if new criteria will result in a server fetch.If you need to force data to be re-fetched, you can call
invalidateCache()
and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when usinginvalidateCache()
there is no need to also callfetchData()
and in fact this could produce unexpected results.This method takes an optional callback parameter (set to a
DSCallback
) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can useresultSet.willFetchData()
to determine whether or not a server fetch will occur whenfetchData()
is called with new criteria.In addition to the callback parameter for this method, developers can use
resultSet.addDataArrivedHandler
to be notified every time data is loaded.- Specified by:
fetchData
in interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
-
fetchData
Description copied from interface:DataBoundComponent
Retrieves data from the DataSource that matches the specified criteria.When
fetchData()
is first called, if data has not already been provided viasetData()
, this method will create aResultSet
, which will be configured based on component settings such asfetchOperation
anddataPageSize
, as well as the general purposedataProperties
. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.NOTE: do not use both
autoFetchData
and a call tofetchData()
- this may result in two DSRequests to fetch data. Use eitherautoFetchData
andsetAutoFetchCriteria()
or a manual call to fetchData() passing criteria.Whether a ResultSet was automatically created or provided via
setData()
, subsequent calls to fetchData() will simply callresultSet.setCriteria()
.Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call
willFetchData(criteria)
to determine if new criteria will result in a server fetch.If you need to force data to be re-fetched, you can call
invalidateCache()
and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when usinginvalidateCache()
there is no need to also callfetchData()
and in fact this could produce unexpected results.This method takes an optional callback parameter (set to a
DSCallback
) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can useresultSet.willFetchData()
to determine whether or not a server fetch will occur whenfetchData()
is called with new criteria.In addition to the callback parameter for this method, developers can use
resultSet.addDataArrivedHandler
to be notified every time data is loaded.- Specified by:
fetchData
in interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires only if server contact was required
-
fetchData
Description copied from interface:DataBoundComponent
Retrieves data from the DataSource that matches the specified criteria.When
fetchData()
is first called, if data has not already been provided viasetData()
, this method will create aResultSet
, which will be configured based on component settings such asfetchOperation
anddataPageSize
, as well as the general purposedataProperties
. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.NOTE: do not use both
autoFetchData
and a call tofetchData()
- this may result in two DSRequests to fetch data. Use eitherautoFetchData
andsetAutoFetchCriteria()
or a manual call to fetchData() passing criteria.Whether a ResultSet was automatically created or provided via
setData()
, subsequent calls to fetchData() will simply callresultSet.setCriteria()
.Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call
willFetchData(criteria)
to determine if new criteria will result in a server fetch.If you need to force data to be re-fetched, you can call
invalidateCache()
and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when usinginvalidateCache()
there is no need to also callfetchData()
and in fact this could produce unexpected results.This method takes an optional callback parameter (set to a
DSCallback
) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can useresultSet.willFetchData()
to determine whether or not a server fetch will occur whenfetchData()
is called with new criteria.In addition to the callback parameter for this method, developers can use
resultSet.addDataArrivedHandler
to be notified every time data is loaded.- Specified by:
fetchData
in interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires only if server contact was requiredrequestProperties
- additional properties to set on the DSRequest that will be issued
-
filterData
public void filterData()Description copied from interface:DataBoundComponent
Retrieves data that matches the provided criteria and displays the matching data in this component.This method behaves exactly like
ListGrid.fetchData()
except thattextMatchStyle
is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.- Specified by:
filterData
in interfaceDataBoundComponent
-
filterData
Description copied from interface:DataBoundComponent
Retrieves data that matches the provided criteria and displays the matching data in this component.This method behaves exactly like
ListGrid.fetchData()
except thattextMatchStyle
is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.- Specified by:
filterData
in interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
-
filterData
Description copied from interface:DataBoundComponent
Retrieves data that matches the provided criteria and displays the matching data in this component.This method behaves exactly like
ListGrid.fetchData()
except thattextMatchStyle
is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.- Specified by:
filterData
in interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires only if server contact was required; seeDataBoundComponent.fetchData()
for details
-
filterData
Description copied from interface:DataBoundComponent
Retrieves data that matches the provided criteria and displays the matching data in this component.This method behaves exactly like
ListGrid.fetchData()
except thattextMatchStyle
is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.- Specified by:
filterData
in interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires only if server contact was required; seeDataBoundComponent.fetchData()
for detailsrequestProperties
- for databound components only - optional additional properties to set on the DSRequest that will be issued
-
invalidateCache
public void invalidateCache()Description copied from interface:DataBoundComponent
Invalidate the current data cache for this databound component via a call to the dataset'sinvalidateCache()
method, for example,ResultSet.invalidateCache()
.NOTE: there is no need to call
invalidateCache()
when a save operation is performed on a DataSource. Automatic cache synchronization features will automatically update caches - seeResultSet
for details. If automatic cache synchronization isn't working, troubleshoot the problem using the steps suggested in the FAQ rather than just calling invalidateCache(). CallinginvalidateCache()
unnecessarily causes extra server load and added code complexity.Calling
invalidateCache()
will automatically cause a new fetch to be performed with the current set of criteria if data had been previously fetched and the component is currently drawn with data visible - there is no need to manually call fetchData() after invalidateCache() and this could result in duplicate fetches.While data is being re-loaded after a call to
invalidateCache()
, the widget is in a state similar to initial data load - it doesn't know the total length of the dataset and any APIs that act on records or row indices will necessarily fail and should not be called. To detect that the widget is in this state, callResultSet.lengthIsKnown()
.invalidateCache()
only has an effect if this component's dataset is a data manager class that manages a cache (eg ResultSet or ResultTree). If data was provided as a simple Array or List, invalidateCache() does nothing.- Specified by:
invalidateCache
in interfaceDataBoundComponent
- See Also:
-
getResultSet
Description copied from interface:DataBoundComponent
Return the underlying data of this DataBoundComponent as aResultSet
.Note that this method should only be called after initial data has been fetched by this DataBoundComponent.
- Specified by:
getResultSet
in interfaceDataBoundComponent
- Returns:
- ResultSet, or null if the underlying data is not a ResultSet
- See Also:
-
getRecordList
Description copied from interface:DataBoundComponent
Return the underlying data of this DataBoundComponent as aRecordList
.Depending on the component configuration, the actual JavaScript instance of the returned RecordList may be one of several types:
- If the component is not bound to a
DataSource
, the instance is generally an Array ofRecord
. - If the component is bound to a DataSource, the instance is a
ResultSet
. - If the component is a grouped ListGrid, the instance is a
Tree
. To access the ungrouped record list regardless of grouping status, useisGrouped() ? getOriginalRecordList() : getRecordList()
- If the component is a
TreeGrid
, the instance is a ResultTree.
- Specified by:
getRecordList
in interfaceDataBoundComponent
- Returns:
- the RecordList
- If the component is not bound to a
-
getDataAsJSList
- Specified by:
getDataAsJSList
in interfaceDataBoundComponent
-
exportData
public void exportData()Description copied from interface:DataBoundComponent
- Specified by:
exportData
in interfaceDataBoundComponent
-
exportData
Description copied from interface:DataBoundComponent
- Specified by:
exportData
in interfaceDataBoundComponent
-
exportData
Description copied from interface:DataBoundComponent
Uses a "fetch" operation on the currentDataSource
to retrieve data that matches the current filter and sort criteria for this component, then exports the resulting data to a file or window in the requested format.A variety of DSRequest settings, such as
exportAs
andexportFilename
, affect the exporting process: seeexportResults
for further detail.Note that data exported via this method does not include any client-side formatting and relies on both the Smart GWT server and server-side DataSources. To export client-data with formatters applied, see
exportClientData
, which still requires the Smart GWT server but does not rely on server-side DataSources.For more information on exporting data, see
DataSource.exportData
.- Specified by:
exportData
in interfaceDataBoundComponent
- Parameters:
requestProperties
- additional properties to set on DSRequest that will be issuedcallback
- Optional callback. Note that this parameter only applies if you specifyexportToClient
: false in the request properties, because file downloads don't provide ordinary framework callbacks- See Also:
-
addFetchDataHandler
Add a fetchData handler.Notification function fired on fetchData() or filterData()
- Specified by:
addFetchDataHandler
in interfaceHasFetchDataHandlers
- Parameters:
handler
- the filterData handler- Returns:
HandlerRegistration
used to remove this handler
-
addDropCompleteHandler
Add acom.smartgwt.client.widgets.DropCompleteHandler
. See that class's documentation for a definition of "drop complete", and how it differs from "drag complete" (com.smartgwt.client.widgets.DragCompleteHandler
).- Specified by:
addDropCompleteHandler
in interfaceHasDropCompleteHandlers
- Parameters:
handler
- the DropCompleteHandler- Returns:
HandlerRegistration
used to remove this handler
-
addDragCompleteHandler
Add acom.smartgwt.client.widgets.DragCompleteHandler
. See that class's documentation for a definition of "drag complete", and how it differs from "drop complete" (com.smartgwt.client.widgets.DropCompleteHandler
).- Specified by:
addDragCompleteHandler
in interfaceHasDragCompleteHandlers
- Parameters:
handler
- the DropCompleteHandler- Returns:
HandlerRegistration
used to remove this handler
-
getFieldAlignments
Description copied from interface:DataBoundComponent
Returna an array of field alignments for this grid- Specified by:
getFieldAlignments
in interfaceDataBoundComponent
- Returns:
- array of Alignments
-
getDeepCloneOnEdit
Description copied from interface:DataBoundComponent
Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values. SeeDataSource.getDeepCloneOnEdit()
for details of what this means.If this value is not explicitly set, it defaults to the DataSource
deepCloneOnEdit
value. This value can also be overridden per-field withDataSourceField.setDeepCloneOnEdit(java.lang.Boolean)
.Like the other
deepCloneOnEdit
settings, this flag only has an effect if you are editing a values object that contains nested objects or arrays, usingCanvas.setDataPath(java.lang.String)
- Specified by:
getDeepCloneOnEdit
in interfaceDataBoundComponent
-
setDeepCloneOnEdit
Description copied from interface:DataBoundComponent
Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values. SeeDataSource.getDeepCloneOnEdit()
for details of what this means.If this value is not explicitly set, it defaults to the DataSource
deepCloneOnEdit
value. This value can also be overridden per-field withDataSourceField.setDeepCloneOnEdit(java.lang.Boolean)
.Like the other
deepCloneOnEdit
settings, this flag only has an effect if you are editing a values object that contains nested objects or arrays, usingCanvas.setDataPath(java.lang.String)
- Specified by:
setDeepCloneOnEdit
in interfaceDataBoundComponent
- Returns:
DataBoundComponent
instance, for chaining setter calls
-
setFields
Description copied from interface:DataBoundComponent
Field setter variant (alternative tosetFields(FormItem...)
,setFields(ListGridField...)
, etc.) that will accept an array of JavaScriptObject, rather than an array of SmartGWT Java wrappers of the field class type (e.g.FormItem
,ListGridField
, etc.) This is an advanced method and only for cases where you have the JavaScriptObject for each field but want to avoid having to create each associated SmartGWT Java wrapper.Note: use
toArray()
to create a Java array of JavaScriptObject if you only have the array itself as a single JavaScriptObject.- Specified by:
setFields
in interfaceDataBoundComponent
- Parameters:
fields
- the component fields- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getFieldsAsJavaScriptObjects
Description copied from interface:DataBoundComponent
Return the fields as JavaScriptObjects rather than as SmartGWT Java wrappers of the field class type (e.g.FormItem
,ListGridField
, etc.) This avoids building the SmartGWT Java wrappers for the fields in situations where they aren't needed - and for FormItems in particular - where there may not be enough information to determine the correct subclass, such as before the SmartClient instance underlying theDynamicForm
has been created.- Specified by:
getFieldsAsJavaScriptObjects
in interfaceDataBoundComponent
- Returns:
- the component fields
-
getFieldCount
public int getFieldCount()Description copied from interface:DataBoundComponent
Return the number of fields.- Specified by:
getFieldCount
in interfaceDataBoundComponent
- Returns:
- the number of fields
-
transferRecords
public void transferRecords(Record[] records, Record targetRecord, Integer index, Canvas sourceWidget, TransferRecordsCallback callback) Description copied from interface:DataBoundComponent
Transfer a list ofRecord
s from another component (does not have to be a databound component) into this component. This method is only applicable to list-type components, such asListGrid
orcom.smartgwt.client.widgets.tile.TileGridTileGrid
. Notably, it does not apply toTreeGrid
; the equivalent for treeGrids istransferNodes
.This method implements the automatic drag-copy and drag-move behaviors of components like
ListGrid
, and calling it is equivalent to completing a drag and drop of thedropRecords
(the default record drop behavior is simply to calltransferRecords()
, passing in the dropped nodes)Note that this method is asynchronous - it may need to perform server turnarounds to prevent duplicates in the target component's data. If you wish to be notified when the transfer process has completed, you can either pass a non-null callback to this method or add a
DropCompleteHandler
to this component.See also
transferSelectedData()
- Specified by:
transferRecords
in interfaceDataBoundComponent
- Parameters:
records
- Recordss to transfer to this componenttargetRecord
- The target record (eg, of a drop interaction), for contextindex
- Insert point relative to the target record for the transferred recordssourceWidget
- The databound or non-databound component from which the records are to be transferred.callback
- optional TransferRecordsCallback to be fired when the transfer process has completed (pass null if your code does not need to be called back). The callback will be passed the list of records actually transferred to this component
-
setDragDataCustomizer
During a drag-and-drop interaction, this method returns the set of records being dragged out of the component. In the default implementation, this is the list of currently selected records.This method is consulted by
willAcceptDrop()
.- Parameters:
DragDataCustomizer
- customizer- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getSort
Description copied from interface:DataBoundComponent
Returns the currentSortSpecifiers
for this component. Will return null if this component has never been sorted, or the underlying SmartClient widget does not exist.- Specified by:
getSort
in interfaceDataBoundComponent
- Returns:
- current sort specifiers for this component (null if unsorted or no SC widget)
-
setSort
Description copied from interface:DataBoundComponent
Sort the component on one or more fields.Pass in an array of
SortSpecifier
s to have the component's data sorted by the fields in eachspecifier.property
and in the directions specified. The component can be sorted by any combination of fields, including fields specified in the fields array andunused fields from the underlying dataSource
, if there is one.If setSort() is called on a component which doesn't yet have a SmartClient widget, the widget will be created. If
autoFetchData
is set and aDataSource
has been set, this will result in data being fetched.- Specified by:
setSort
in interfaceDataBoundComponent
- Parameters:
sortSpecifiers
- Array ofSortSpecifier
objects
-
setLogicalStructure
Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility. -
getLogicalStructure
Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.- Specified by:
getLogicalStructure
in interfaceLogicalStructure
- Overrides:
getLogicalStructure
in classTileLayout
-
setSort(com.smartgwt.client.data.SortSpecifier...)
instead.