public class ColumnTree extends Layout implements HasNodeSelectedHandlers, DataBoundComponent
Tree
class, which manipulates hierarchical data sets
TreeDataBinding
. A ColumnTree shows a single branch of
the underlying Tree
horizontally, from left to right. Thus, the leftmost
column shows all the top-level nodes. When the user clicks one of those nodes, a new column is shown immediately to the
right of the top-level column, showing the selected node's children. Additional columns are shown as required to present
lower-level children. The behavior of ColumnTree is similar to that of the Browser interface in the Apple™
iTunes™ application.
config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Constructor and Description |
---|
ColumnTree() |
ColumnTree(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addDragCompleteHandler(DragCompleteHandler handler)
Add a
com.smartgwt.client.widgets.DragCompleteHandler . |
com.google.gwt.event.shared.HandlerRegistration |
addDropCompleteHandler(DropCompleteHandler handler)
Add a
com.smartgwt.client.widgets.DropCompleteHandler . |
com.google.gwt.event.shared.HandlerRegistration |
addFetchDataHandler(FetchDataHandler handler)
Add a fetchData handler.
|
void |
addFormulaField()
Convenience method to display a
com.smartgwt.client..FormulaBuilder to create a new Formula Field. |
com.google.gwt.event.shared.HandlerRegistration |
addNodeSelectedHandler(NodeSelectedHandler handler)
Add a onNodeSelected handler.
|
void |
addSummaryField()
Convenience method to display a
com.smartgwt.client..SummaryBuilder to create a new Summary Field. |
java.lang.Boolean |
anySelected()
Whether at least one item is selected
|
java.lang.Boolean |
anySelected(int colNum)
Whether at least one item is selected in the supplied column (the first column if none is passed)
|
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName . |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName . |
protected com.google.gwt.core.client.JavaScriptObject |
create() |
void |
deselectAllRecords()
Deselect all records
|
void |
deselectAllRecords(int colNum)
Deselect all records in the supplied column (the first column if none is passed)
|
void |
deselectRecord(int record)
Deselect a
Record passed in explicitly, or by index. |
void |
deselectRecord(int record,
int colNum)
Deselect a
Record passed in explicitly, or by index. |
void |
deselectRecord(Record record)
Deselect a
Record passed in explicitly, or by index. |
void |
deselectRecord(Record[] records)
Deselect a list of
Record s passed in explicitly, or by index. |
void |
deselectRecord(Record record,
int colNum) |
void |
deselectRecords(int[] records)
Deselect a list of
Record s passed in explicitly, or by index. |
void |
deselectRecords(int[] records,
int colNum)
Deselect a list of
Record s passed in explicitly, or by index. |
void |
deselectRecords(Record[] records)
Deselect a list of
Record s passed in explicitly, or by index. |
void |
deselectRecords(Record[] records,
int colNum)
Deselect a list of
Record s passed in explicitly, or by index. |
void |
disableHilite(java.lang.String hiliteID)
Disable a hilite
|
void |
disableHiliting()
Disable all hilites.
|
void |
editFields()
Shows a FieldPicker interface allowing end-users to rearrange the order and visibiility
of the fields in the associated DataBoundComponent.
|
void |
editHilites()
Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent.
|
void |
enableHilite(java.lang.String hiliteID)
Enable / disable a
hilites
|
void |
enableHilite(java.lang.String hiliteID,
boolean enable)
Enable / disable a
hilites
|
void |
enableHiliting()
Enable all hilites.
|
void |
enableHiliting(boolean enable)
Enable all hilites.
|
void |
exportData()
|
void |
exportData(DSRequest requestProperties)
|
void |
exportData(DSRequest requestProperties,
RPCCallback callback)
Uses a "fetch" operation on the current
DataSource
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 |
fetchData()
Retrieves data from the DataSource that matches the specified criteria.
|
void |
fetchData(Criteria criteria)
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 |
filterData()
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.
|
Record |
find(AdvancedCriteria adCriteria)
Filters all objects according to the AdvancedCriteria passed and returns the first matching object or null if not found
|
Record[] |
findAll(AdvancedCriteria adCriteria)
Filters all objects according to the AdvancedCriteria passed
|
int |
findIndex(AdvancedCriteria adCriteria)
Finds the index of the first Record that matches with the AdvacendCriteria passed.
|
int |
findNextIndex(int startIndex,
AdvancedCriteria adCriteria)
Like
RecordList.findIndex(java.util.Map) , but considering the startIndex parameter. |
int |
findNextIndex(int startIndex,
AdvancedCriteria adCriteria,
int endIndex)
Like
RecordList.findIndex(java.util.Map) , but considering the startIndex and endIndex parameters. |
void |
folderDrop(TreeNode[] nodes,
TreeNode folder,
int index,
Canvas sourceWidget)
Process a drop of one or more nodes on a TreeGrid folder.
Note: See TreeGridDrop
for an overview of TreeGrid drag and drop behavior. |
java.lang.Boolean |
getAddDropValues()
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.
|
java.lang.String |
getAddFormulaFieldText()
Text for a menu item allowing users to add a formula field
|
java.lang.String |
getAddOperation()
operationId this component
should use when performing add operations. |
java.lang.String |
getAddSummaryFieldText()
Text for a menu item allowing users to add a formula field
|
java.lang.Boolean |
getAutoFetchAsFilter()
If
DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData() |
java.lang.Boolean |
getAutoFetchData()
If true, when this component is first drawn, automatically call
DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on
DataBoundComponent.getAutoFetchAsFilter() . |
TextMatchStyle |
getAutoFetchTextMatchStyle()
If
autoFetchData is true , this attribute allows the developer to specify a textMatchStyle
for the initial DataBoundComponent.fetchData() call. |
IButton |
getBackButton()
When using
single-column mode , this is the
"Back" button that you see hovering above the column UI and that allows backward navigation. |
java.lang.String |
getBackButtonTitle()
When using
single-column mode , this i18n
property dictates the title for the button docked to
the top left which allows navigation back through the column tree. |
java.lang.Boolean |
getCanAddFormulaFields()
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
com.smartgwt.client..FormulaBuilder .
|
java.lang.Boolean |
getCanAddSummaryFields()
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
com.smartgwt.client..SummaryBuilder .
|
java.lang.Boolean |
getCanDragRecordsOut()
Indicates whether records can be dragged from this listGrid and dropped elsewhere.
|
java.lang.String |
getClosedIconSuffix()
This suffix will be appended to the
folderIcon for
closed folders. |
ListGrid |
getColumn()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
ListGrid |
getColumnProperties()
Standard set of properties to apply to each generated
column in this columnTree. |
void |
getColumnTitle(TreeNode node,
int colNum)
Returns the title to show for the header of indicated column.
|
java.lang.String[] |
getColumnTitles()
With
fixedColumns enabled, defines the header title
for each column. |
java.lang.String[] |
getColumnWidths()
With
fixedColumns enabled, defines the pixel or %
width per column. |
ListGrid |
getCustomColumnProperties(TreeNode node,
int colNum)
Additional properties to apply to the ListGrid that will show the indicated column.
|
java.lang.String |
getCustomIconOpenProperty()
This property allows the developer to rename the
default node.showOpenIcon property. |
java.lang.String |
getCustomIconProperty()
This property allows the developer to customize the icon displayed next to a node.
|
Tree |
getData()
|
com.google.gwt.core.client.JavaScriptObject |
getDataAsJSList() |
FetchMode |
getDataFetchMode()
How to fetch and manage records retrieve from the server.
|
int |
getDataPageSize()
When using
data
paging , how many records to fetch at a time. |
Tree |
getDataProperties()
For a
ColumnTree that uses a DataSource, these properties will be passed to the automatically-created
ResultTree. |
DataSource |
getDataSource()
The DataSource that this component should bind to for default fields and for performing
DataSource requests . |
java.lang.Boolean |
getDeepCloneOnEdit()
Before we start editing values in this DataBoundComponent, should we perform a deep clone
of the underlying values.
|
Record[] |
getDragData()
During a drag-and-drop interaction, this method returns the set of records being dragged out of the component.
|
DragDataAction |
getDragDataAction()
Indicates what to do with data dragged into another DataBoundComponent.
|
java.lang.String |
getDragTrackerStyle()
CSS Style to apply to the drag tracker when dragging occurs on this component.
|
java.lang.String |
getDropIconSuffix()
If
showDropIcons is true, this suffix will be
appended to the folderIcon when the user
drop-hovers over some folder. |
java.util.Map |
getDropValues()
When an item is dropped on this component, and
addDropValues 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. |
java.lang.String |
getDuplicateDragMessage()
Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled. |
java.lang.String |
getEditFormulaFieldText()
Text for a menu item allowing users to edit a formula field
|
java.lang.String |
getEditSummaryFieldText()
Text for a menu item allowing users to edit the formatter for a field
|
java.lang.String[] |
getEmptyColumnMessages()
With
fixedColumns enabled, defines each column's
ListGrid.emptyMessage . |
java.lang.Boolean |
getExportAll()
Setting exportAll to true prevents the component from passing its list of fields to the
export call.
|
java.lang.String[] |
getExportFields()
The list of field-names to export.
|
java.lang.Boolean |
getExportIncludeSummaries()
If Summary rows exist for this component, whether to include them when exporting client data.
|
java.lang.String |
getFetchOperation()
Operation ID this component should use when performing fetch operations.
|
Alignment[] |
getFieldAlignments()
Returna an array of field alignments for this grid
|
int |
getFieldCount()
Return the number of fields.
|
com.google.gwt.core.client.JavaScriptObject[] |
getFieldsAsJavaScriptObjects()
Return the fields as JavaScriptObjects rather than as SmartGWT Java wrappers of the field
class type
(e.g.
|
java.lang.String |
getFirstColumnTitle()
A title for the leftmost column if
showHeaders is set
(the remaining columns have their titles derived from the item selected in the column to the left). |
java.lang.Integer |
getFixedColumns()
Enables fixed columns mode.
|
java.lang.String |
getFolderIcon()
The URL of the base icon for all folder nodes in this columnTree.
|
java.lang.String |
getHiliteProperty()
Marker that can be set on a record to flag that record as hilited.
|
Hilite[] |
getHilites()
Return the set of hilite-objects currently applied to this DataBoundComponent.
|
java.lang.String |
getHiliteState()
Get the current hilites encoded as a String, for saving.
|
Criteria |
getImplicitCriteria()
Criteria that are never shown to or edited by the user and are cumulative with any
criteria provided via
DataBoundComponent.initialCriteria ,
DataBoundComponent.setCriteria() etc. |
Criteria |
getInitialCriteria()
Criteria to use when
DataBoundComponent.setAutoFetchData(Boolean) is used. |
java.lang.Boolean |
getLoadDataOnDemand()
For databound columnTree instances, should the entire tree of data be loaded on initial fetch, or should each column be
loaded as needed.
|
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure()
Getter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
java.lang.String |
getNodeIcon()
The filename of the default icon for all leaf nodes in this grid.
|
java.lang.String |
getOpenIconSuffix()
If
showOpenIcons is true, this suffix will be
appended to the folderIcon for open folders in this
grid. |
static ColumnTree |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.Boolean |
getPreventDuplicates()
If set, detect and prevent duplicate records from being transferred to this component, either via
drag and drop or via
DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent) . |
java.lang.Boolean |
getProgressiveLoading()
Indicates whether or not this component will load its data
progressively |
TreeNode |
getRecord(int index)
Retrieve a record by index.
|
TreeNode |
getRecord(int index,
java.lang.Integer colNum)
Retrieve a record by index.
|
int |
getRecordIndex(Record record)
Get the index of the provided record.
|
RecordList |
getRecordList()
Return the underlying data of this DataBoundComponent as a
RecordList . |
java.lang.String |
getRemoveOperation()
operationId this component
should use when performing remove operations. |
ResultSet |
getResultSet()
Return the underlying data of this DataBoundComponent as a
ResultSet . |
java.lang.String |
getSavedSearchId()
Optional identifier for saved searches that should be applied to this component.
|
Record |
getSelectedRecord()
Get the selected record, that is, the parent of the nodes in the rightmost visible column.
|
ListGridRecord[] |
getSelection(int colNum)
Returns the array of objects selected in the specified column of the columnTree
|
java.lang.Boolean |
getShowComplexFields()
Whether to show fields of non-atomic types when a DataBoundComponent is given a
DataSource but no
component.fields .
|
java.lang.Boolean |
getShowCustomIconOpen()
Should folder nodes showing custom icons (set via the
customIconProperty ), show open state images when the
folder is opened. |
java.lang.Boolean |
getShowDetailFields()
Whether to show fields marked
detail:true when a DataBoundComponent is given a DataSource but no
component.fields . |
java.lang.Boolean |
getShowDropIcons()
If true, when the user drags a droppable target over a folder in this TreeGrid, show a different icon folder
icon.
|
java.lang.Boolean |
getShowHeaders()
If set, each column in the ColumnTree will show a header with the title of the selected node from the column to the
left.
|
java.lang.Boolean |
getShowHiddenFields()
Whether to show fields marked
hidden:true when a DataBoundComponent is given a
DataSource but no component.fields .
|
java.lang.Boolean |
getShowMultipleColumns()
When set to false, only displays a single column at a time, showing a slide animation when moving between columns.
|
java.lang.Boolean |
getShowNodeCount()
If set, and
showHeaders is also set, each column's
header will show a count of the number of nodes in that column |
java.lang.Boolean |
getShowOpenIcons()
If true, show a different icon for
open folders than closed folders. |
boolean |
getShowSavedSearchesByDS()
Whether to associate saved searches by default with the current
DataSource
of a component when a
savedSearchId is
not provided. |
SortSpecifier[] |
getSort()
Returns the current
SortSpecifiers for
this component. |
java.lang.Boolean |
getSparseFieldState()
If true,
ListGrid.getFieldState() and
ListGrid.setFieldState(java.lang.String) will omit state
information for hidden fields by default. |
java.lang.String |
getTitleField()
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 check titleField for databound
components.For non databound components returns the first defined field name of "title" ,
"name" , or "id" . |
java.lang.String |
getTitleFieldValue(Record record)
Get the value of the titleField for the passed record
|
java.lang.String |
getUpdateOperation()
operationId this component
should use when performing update operations. |
java.lang.Boolean |
getUseAllDataSourceFields()
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.
|
java.lang.Boolean |
getUseFlatFields()
The
useFlatFields flag causes all simple type fields anywhere in a nested
set of DataSources to be exposed as a flat list for form binding. |
void |
invalidateCache()
Invalidate the current data cache for this databound component via a call to the dataset's
invalidateCache() method, for example,
ResultSet.invalidateCache() . |
void |
navigateBack()
Navigate to the previous column.
|
protected void |
onInit_ColumnTree() |
protected void |
onInit() |
void |
selectAllRecords()
Select all records
|
void |
selectAllRecords(int colNum)
Select all records in the supplied column (the first column if none is passed)
|
void |
selectRecord(int record)
Select/deselect a
Record passed in explicitly, or by index. |
void |
selectRecord(int record,
boolean newState)
Select/deselect a
Record passed in explicitly, or by index. |
void |
selectRecord(int record,
boolean newState,
int colNum)
Select/deselect a
Record passed in explicitly, or by index. |
void |
selectRecord(Record record)
Select/deselect a
Record passed in explicitly, or by index. |
void |
selectRecord(Record record,
boolean newState)
Select/deselect a
Record passed in explicitly, or by index. |
void |
selectRecord(Record record,
boolean newState,
int colNum)
Select/deselect a
Record passed in explicitly, or by index. |
void |
selectRecords(int[] records)
Select/deselect a list of
Record s passed in explicitly, or by index. |
void |
selectRecords(int[] records,
boolean newState)
Select/deselect a list of
Record s passed in explicitly, or by index. |
void |
selectRecords(int[] records,
boolean newState,
int colNum)
Select/deselect a list of
Record s passed in explicitly, or by index. |
void |
selectRecords(Record[] records)
Select/deselect a list of
Record s passed in explicitly, or by index. |
void |
selectRecords(Record[] records,
boolean newState)
Select/deselect a list of
Record s passed in explicitly, or by index. |
void |
selectRecords(Record[] records,
boolean newState,
int colNum)
Select/deselect a list of
Record s passed in explicitly, or by index. |
ColumnTree |
setAddDropValues(java.lang.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.
|
ColumnTree |
setAddFormulaFieldText(java.lang.String addFormulaFieldText)
Text for a menu item allowing users to add a formula field
|
ColumnTree |
setAddOperation(java.lang.String addOperation)
operationId this component
should use when performing add operations. |
ColumnTree |
setAddSummaryFieldText(java.lang.String addSummaryFieldText)
Text for a menu item allowing users to add a formula field
|
ColumnTree |
setAutoFetchAsFilter(java.lang.Boolean autoFetchAsFilter)
If
DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData() |
ColumnTree |
setAutoFetchData(java.lang.Boolean autoFetchData)
If true, when this component is first drawn, automatically call
DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on
DataBoundComponent.getAutoFetchAsFilter() . |
ColumnTree |
setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle)
If
autoFetchData is true , this attribute allows the developer to specify a textMatchStyle
for the initial DataBoundComponent.fetchData() call. |
ColumnTree |
setBackButtonTitle(java.lang.String backButtonTitle)
When using
single-column mode , this i18n
property dictates the title for the button docked to
the top left which allows navigation back through the column tree. |
ColumnTree |
setCanAddFormulaFields(java.lang.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
com.smartgwt.client..FormulaBuilder .
|
ColumnTree |
setCanAddSummaryFields(java.lang.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
com.smartgwt.client..SummaryBuilder .
|
ColumnTree |
setCanDragRecordsOut(java.lang.Boolean canDragRecordsOut)
Indicates whether records can be dragged from this listGrid and dropped elsewhere.
|
ColumnTree |
setClosedIconSuffix(java.lang.String closedIconSuffix)
This suffix will be appended to the
folderIcon for
closed folders. |
void |
setColumnProperties(ListGrid columnProperties)
Standard set of properties to apply to each generated
column in this columnTree. |
ColumnTree |
setColumnTitles(java.lang.String... columnTitles)
With
fixedColumns enabled, defines the header title
for each column. |
ColumnTree |
setColumnWidths(java.lang.String... columnWidths)
With
fixedColumns enabled, defines the pixel or %
width per column. |
ColumnTree |
setCustomIconOpenProperty(java.lang.String customIconOpenProperty)
This property allows the developer to rename the
default node.showOpenIcon property. |
ColumnTree |
setCustomIconProperty(java.lang.String customIconProperty)
This property allows the developer to customize the icon displayed next to a node.
|
ColumnTree |
setData(Tree data)
|
ColumnTree |
setDataFetchMode(FetchMode dataFetchMode)
How to fetch and manage records retrieve from the server.
|
ColumnTree |
setDataPageSize(int dataPageSize)
When using
data
paging , how many records to fetch at a time. |
void |
setDataProperties(Tree resultTreeProperties)
For databound ColumnTrees, this attribute can be used to customize the
ResultTree object created for this ColumnTree when data is fetched.
|
ColumnTree |
setDataSource(DataSource dataSource)
The DataSource that this component should bind to for default fields and for performing
DataSource requests . |
void |
setDataSource(DataSource dataSource,
ListGridField... fields)
Bind to a DataSource.
|
ColumnTree |
setDataSource(java.lang.String dataSource)
The DataSource that this component should bind to for default fields and for performing
DataSource requests . |
ColumnTree |
setDeepCloneOnEdit(java.lang.Boolean deepCloneOnEdit)
Before we start editing values in this DataBoundComponent, should we perform a deep clone
of the underlying values.
|
static void |
setDefaultProperties(ColumnTree columnTreeProperties)
Class level method to set the default properties of this class.
|
ColumnTree |
setDragDataAction(DragDataAction dragDataAction)
Indicates what to do with data dragged into another DataBoundComponent.
|
ColumnTree |
setDragDataCustomizer(DragDataCustomizer customizer)
During a drag-and-drop interaction, this method returns the set of records being dragged
out of the component.
|
ColumnTree |
setDragTrackerStyle(java.lang.String dragTrackerStyle)
CSS Style to apply to the drag tracker when dragging occurs on this component.
|
void |
setDropIconSuffix(java.lang.String dropIconSuffix)
If
showDropIcons is true, this suffix will be
appended to the folderIcon when the user
drop-hovers over some folder. |
ColumnTree |
setDropValues(java.util.Map dropValues)
When an item is dropped on this component, and
addDropValues 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. |
ColumnTree |
setDuplicateDragMessage(java.lang.String duplicateDragMessage)
Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled. |
ColumnTree |
setEditFormulaFieldText(java.lang.String editFormulaFieldText)
Text for a menu item allowing users to edit a formula field
|
ColumnTree |
setEditSummaryFieldText(java.lang.String editSummaryFieldText)
Text for a menu item allowing users to edit the formatter for a field
|
ColumnTree |
setEmptyColumnMessages(java.lang.String... emptyColumnMessages)
With
fixedColumns enabled, defines each column's
ListGrid.emptyMessage . |
ColumnTree |
setExportAll(java.lang.Boolean exportAll)
Setting exportAll to true prevents the component from passing its list of fields to the
export call.
|
ColumnTree |
setExportFields(java.lang.String[] exportFields)
The list of field-names to export.
|
ColumnTree |
setExportIncludeSummaries(java.lang.Boolean exportIncludeSummaries)
If Summary rows exist for this component, whether to include them when exporting client data.
|
ColumnTree |
setFetchOperation(java.lang.String fetchOperation)
Operation ID this component should use when performing fetch operations.
|
ColumnTree |
setFields(com.google.gwt.core.client.JavaScriptObject... fields)
Field setter variant (alternative to
setFields(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. |
ColumnTree |
setFields(ListGridField... fields)
An array of field objects, specifying the order, layout, dynamic calculation, and sorting behavior of each field in each
column in the columnTree object.
|
ColumnTree |
setFirstColumnTitle(java.lang.String firstColumnTitle)
A title for the leftmost column if
showHeaders is set
(the remaining columns have their titles derived from the item selected in the column to the left). |
ColumnTree |
setFixedColumns(java.lang.Integer fixedColumns)
Enables fixed columns mode.
|
ColumnTree |
setFolderIcon(java.lang.String folderIcon)
The URL of the base icon for all folder nodes in this columnTree.
|
ColumnTree |
setHiliteProperty(java.lang.String hiliteProperty)
Marker that can be set on a record to flag that record as hilited.
|
ColumnTree |
setHilites(Hilite[] hilites)
Accepts an array of hilite objects and applies them to this DataBoundComponent.
|
ColumnTree |
setHiliteState(java.lang.String hiliteState)
Set the current hilites based on a hiliteState String previously returned from getHilitesState.
|
ColumnTree |
setImplicitCriteria(Criteria implicitCriteria)
Criteria that are never shown to or edited by the user and are cumulative with any
criteria provided via
DataBoundComponent.initialCriteria ,
DataBoundComponent.setCriteria() etc. |
java.lang.Boolean |
setImplicitCriteria(Criteria implicitCriteria,
DSCallback callback) |
java.lang.Boolean |
setImplicitCriteria(Criteria criteria,
DSCallback callback,
java.lang.Boolean initialFetch) |
ColumnTree |
setInitialCriteria(Criteria initialCriteria)
Criteria to use when
DataBoundComponent.setAutoFetchData(Boolean) is used. |
ColumnTree |
setLoadDataOnDemand(java.lang.Boolean loadDataOnDemand)
For databound columnTree instances, should the entire tree of data be loaded on initial fetch, or should each column be
loaded as needed.
|
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.grid.ColumnTreeLogicalStructure s)
Setter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
ColumnTree |
setNodeIcon(java.lang.String nodeIcon)
The filename of the default icon for all leaf nodes in this grid.
|
ColumnTree |
setOpenIconSuffix(java.lang.String openIconSuffix)
If
showOpenIcons is true, this suffix will be
appended to the folderIcon for open folders in this
grid. |
ColumnTree |
setPreventDuplicates(java.lang.Boolean preventDuplicates)
If set, detect and prevent duplicate records from being transferred to this component, either via
drag and drop or via
DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent) . |
ColumnTree |
setProgressiveLoading(java.lang.Boolean progressiveLoading)
Indicates whether or not this component will load its data
progressively |
ColumnTree |
setRemoveOperation(java.lang.String removeOperation)
operationId this component
should use when performing remove operations. |
ColumnTree |
setSavedSearchId(java.lang.String savedSearchId)
Optional identifier for saved searches that should be applied to this component.
|
ColumnTree |
setShowComplexFields(java.lang.Boolean showComplexFields)
Whether to show fields of non-atomic types when a DataBoundComponent is given a
DataSource but no
component.fields .
|
ColumnTree |
setShowCustomIconOpen(java.lang.Boolean showCustomIconOpen)
Should folder nodes showing custom icons (set via the
customIconProperty ), show open state images when the
folder is opened. |
ColumnTree |
setShowDetailFields(java.lang.Boolean showDetailFields)
Whether to show fields marked
detail:true when a DataBoundComponent is given a DataSource but no
component.fields . |
void |
setShowDropIcons(java.lang.Boolean showDropIcons)
If true, when the user drags a droppable target over a folder in this TreeGrid, show a different icon folder
icon.
|
ColumnTree |
setShowHeaders(java.lang.Boolean showHeaders)
If set, each column in the ColumnTree will show a header with the title of the selected node from the column to the
left.
|
ColumnTree |
setShowHiddenFields(java.lang.Boolean showHiddenFields)
Whether to show fields marked
hidden:true when a DataBoundComponent is given a
DataSource but no component.fields .
|
ColumnTree |
setShowMultipleColumns(java.lang.Boolean showMultipleColumns)
When set to false, only displays a single column at a time, showing a slide animation when moving between columns.
|
ColumnTree |
setShowNodeCount(java.lang.Boolean showNodeCount)
If set, and
showHeaders is also set, each column's
header will show a count of the number of nodes in that column |
ColumnTree |
setShowOpenIcons(java.lang.Boolean showOpenIcons)
If true, show a different icon for
open folders than closed folders. |
ColumnTree |
setShowSavedSearchesByDS(boolean showSavedSearchesByDS)
Whether to associate saved searches by default with the current
DataSource
of a component when a
savedSearchId is
not provided. |
ColumnTree |
setSort(SortSpecifier... sortSpecifiers)
Sort the component on one or more fields.
|
ColumnTree |
setSparseFieldState(java.lang.Boolean sparseFieldState)
If true,
ListGrid.getFieldState() and
ListGrid.setFieldState(java.lang.String) will omit state
information for hidden fields by default. |
ColumnTree |
setTitleField(java.lang.String titleField)
Sets the best field to use for a user-visible title for an individual record from this component.
|
ColumnTree |
setUpdateOperation(java.lang.String updateOperation)
operationId this component
should use when performing update operations. |
ColumnTree |
setUseAllDataSourceFields(java.lang.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.
|
ColumnTree |
setUseFlatFields(java.lang.Boolean useFlatFields)
The
useFlatFields flag causes all simple type fields anywhere in a nested
set of DataSources to be exposed as a flat list for form binding. |
void |
shouldShowHeader(TreeNode node,
int colNum)
Whether the indicated column should show a header.
|
void |
transferNodes(TreeNode[] nodes,
TreeNode folder,
java.lang.Integer index,
Canvas sourceWidget)
Transfer a list of
TreeNode s within this treeGrid or from from some other
component (does not have to be a databound component) into this component. |
void |
transferNodes(TreeNode[] nodes,
TreeNode folder,
java.lang.Integer index,
Canvas sourceWidget,
java.lang.String callback)
Transfer a list of
TreeNode s within this treeGrid or from from some other
component (does not have to be a databound component) into this component. |
void |
transferRecords(Record[] records,
Record targetRecord,
java.lang.Integer index,
Canvas sourceWidget,
TransferRecordsCallback callback)
Transfer a list of
Record s from another component
(does not have to be a databound component) into this component. |
void |
transferSelectedData(DataBoundComponent source)
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.
|
addMember, addMember, addMember, addMember, addMemberPostCreate, addMemberPostCreate, addMemberPreCreate, addMemberPreCreate, addMembers, addMembers, addMembersChangedHandler, getAnimateMembers, getAnimateMemberTime, getCanDropComponents, getChildTabPosition, getDefaultResizeBars, getDropComponent, getDropLine, getDropLineThickness, getDropPosition, getEditProxyConstructor, getEnforcePolicy, getHPolicy, getLayoutBottomMargin, getLayoutEndMargin, getLayoutLeftMargin, getLayoutMargin, getLayoutRightMargin, getLayoutStartMargin, getLayoutTopMargin, getLeaveScrollbarGap, getLocateMembersBy, getLocateMembersType, getManagePercentBreadth, getMember, getMember, getMemberDefaultBreadth, getMemberNumber, getMemberNumber, getMemberOverlap, getMembers, getMembersLength, getMembersMargin, getMinMemberLength, getMinMemberSize, getOverflow, getPaddingAsLayoutMargin, getResizeBar, getResizeBarClass, getResizeBarSize, getReverseOrder, getShowDragPlaceHolder, getShowDropLines, getStackZIndex, getVertical, getVPolicy, hasMember, hideDropLine, hideMember, hideMember, layoutIsDirty, onInit_Layout, reflow, reflow, reflowNow, removeMember, removeMembers, removeMembers, reorderMember, reorderMembers, replaceMember, revealChild, revealChild, setAlign, setAlign, setAnimateMembers, setAnimateMemberTime, setCanDropComponents, setDefaultLayoutAlign, setDefaultLayoutAlign, setDefaultProperties, setDefaultResizeBars, setDropLineProperties, setDropLineThickness, setEditProxyConstructor, setEnforcePolicy, setHPolicy, setLayoutBottomMargin, setLayoutEndMargin, setLayoutLeftMargin, setLayoutMargin, setLayoutRightMargin, setLayoutStartMargin, setLayoutTopMargin, setLeaveScrollbarGap, setLocateMembersBy, setLocateMembersType, setLogicalStructure, setManagePercentBreadth, setMemberOverlap, setMembers, setMembersMargin, setMinBreadthMember, setMinBreadthMember, setMinBreadthMember, setMinMemberLength, setMinMemberSize, setOverflow, setPaddingAsLayoutMargin, setPlaceHolderDefaults, setPlaceHolderProperties, setResizeBarClass, setResizeBarSize, setReverseOrder, setShowDragPlaceHolder, setShowDropLines, setStackZIndex, setVertical, setVisibleMember, setVPolicy, showMember, showMember
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, 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, getStyleName, 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, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAdaptHeightByCustomizer, setAdaptiveHeightPriority, setAdaptiveWidthPriority, setAdaptWidthByCustomizer, 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, setStyleName, 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
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
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getOrCreateJsObj
public ColumnTree()
public ColumnTree(com.google.gwt.core.client.JavaScriptObject jsObj)
public static ColumnTree getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName, Canvas defaults)
autoChildName
.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, see SGWTProperties
.AutoChildUsage
public static void changeAutoChildDefaults(java.lang.String autoChildName, FormItem defaults)
autoChildName
.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, see SGWTProperties
.AutoChildUsage
protected com.google.gwt.core.client.JavaScriptObject create()
public IButton getBackButton() throws java.lang.IllegalStateException
single-column mode
, this is the
"Back" button that you see hovering above the column UI and that allows backward navigation.
This component is an AutoChild named "backButton". For an overview of how to use and
configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public ColumnTree setBackButtonTitle(java.lang.String backButtonTitle)
single-column mode
, this i18n
property dictates the title for the button
docked to
the top left which allows navigation back through the column tree.backButtonTitle
- New backButtonTitle value. Default value is "Back"ColumnTree
instance, for chaining setter callspublic java.lang.String getBackButtonTitle()
single-column mode
, this i18n
property dictates the title for the button
docked to
the top left which allows navigation back through the column tree.public ColumnTree setCanDragRecordsOut(java.lang.Boolean canDragRecordsOut)
NOTE: If
canDragRecordsOut
is initially enabled or might be dynamically enabled after the grid is created, it may be
desirable to disable touch scrolling
so that
touch-dragging a record starts a drag operation rather than a scroll, but see the discussion of drag handles
. If Canvas.disableTouchScrollingForDrag
is set to
true
, then touch scrolling will be disabled automatically. However, for accessibility
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 records out of the grid.
canDragRecordsOut
- New canDragRecordsOut value. Default value is falseColumnTree
instance, for chaining setter callsTreeNode.setCanDrag(java.lang.Boolean)
,
TreeNode.setCanAcceptDrop(java.lang.Boolean)
,
ListGrid.showDragHandles()
,
Drag and Drop
,
Drop Events Examplepublic java.lang.Boolean getCanDragRecordsOut()
NOTE: If
canDragRecordsOut
is initially enabled or might be dynamically enabled after the grid is created, it may be
desirable to disable touch scrolling
so that
touch-dragging a record starts a drag operation rather than a scroll, but see the discussion of drag handles
. If Canvas.disableTouchScrollingForDrag
is set to
true
, then touch scrolling will be disabled automatically. However, for accessibility
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 records out of the grid.
TreeNode.getCanDrag()
,
TreeNode.getCanAcceptDrop()
,
ListGrid.showDragHandles()
,
Drag and Drop
,
Drop Events Examplepublic ColumnTree setClosedIconSuffix(java.lang.String closedIconSuffix)
folderIcon
for
closed folders. If showOpenIcons
is set to
false
this suffix will also be appended to open folders' icons.closedIconSuffix
- New closedIconSuffix value. Default value is "closed"ColumnTree
instance, for chaining setter callspublic java.lang.String getClosedIconSuffix()
folderIcon
for
closed folders. If showOpenIcons
is set to
false
this suffix will also be appended to open folders' icons.public ListGrid getColumn()
Using AutoChildren
for details.
Instance of ListGrid used to display each column of the tree.
public ColumnTree setColumnTitles(java.lang.String... columnTitles) throws java.lang.IllegalStateException
fixedColumns
enabled, defines the header title
for each column.columnTitles
- New columnTitles value. Default value is nullColumnTree
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String[] getColumnTitles()
fixedColumns
enabled, defines the header title
for each column.public ColumnTree setColumnWidths(java.lang.String... columnWidths) throws java.lang.IllegalStateException
fixedColumns
enabled, defines the pixel or %
width per column.columnWidths
- New columnWidths value. Default value is nullColumnTree
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String[] getColumnWidths()
fixedColumns
enabled, defines the pixel or %
width per column.public ColumnTree setCustomIconOpenProperty(java.lang.String customIconOpenProperty)
default node.showOpenIcon
property.
Note : This is an advanced setting
customIconOpenProperty
- New customIconOpenProperty value. Default value is "showOpenIcon"ColumnTree
instance, for chaining setter callsTreeGrid.setCustomIconProperty(java.lang.String)
,
TreeGrid.setShowCustomIconOpen(java.lang.Boolean)
public java.lang.String getCustomIconOpenProperty()
default node.showOpenIcon
property.TreeGrid.getCustomIconProperty()
,
TreeGrid.getShowCustomIconOpen()
public ColumnTree setCustomIconProperty(java.lang.String customIconProperty)
node[grid.customIconProperty]
to the URL of the desired icon to display and it will be shown instead of the
standard nodeIcon
for this node.showCustomIconOpen
is true for this grid, customized
icons for folder nodes will be appended with the openIconSuffix
suffix on state change, as with the standard folderIcon
. Also note that for custom folder icons, the
closedIconSuffix
will never be appended.customIconProperty
- New customIconProperty value. Default value is "icon"ColumnTree
instance, for chaining setter callspublic java.lang.String getCustomIconProperty()
node[grid.customIconProperty]
to the URL of the desired icon to display and it will be shown instead of the
standard nodeIcon
for this node.showCustomIconOpen
is true for this grid, customized
icons for folder nodes will be appended with the openIconSuffix
suffix on state change, as with the standard folderIcon
. Also note that for custom folder icons, the
closedIconSuffix
will never be appended.public ColumnTree setData(Tree data)
Tree
object consisting of nested TreeNode
s to display in this ColumnTree. The data
property will
typically not be explicitly specified for databound ColumnTrees, where the data is returned from the server via
databound component methods such as fetchData()
Tree
object this ColumnTree will viewdata
- Tree to show. Default value is nullColumnTree
instance, for chaining setter callspublic Tree getData()
Tree
object consisting of nested TreeNode
s to display in this ColumnTree. The data
property will
typically not be explicitly specified for databound ColumnTrees, where the data is returned from the server via
databound component methods such as fetchData()
Tree
object this ColumnTree is viewing. Default value is nullpublic ColumnTree setDataFetchMode(FetchMode dataFetchMode)
FetchMode
. This
setting only applies to the ResultSet
automatically created by calling fetchData()
. If a pre-existing ResultSet is passed to setData()
instead, it's existing setting for ResultSet.fetchMode
applies.
setDataFetchMode
in interface DataBoundComponent
dataFetchMode
- New dataFetchMode value. Default value is "paged"ColumnTree
instance, for chaining setter callsDataBinding
public FetchMode getDataFetchMode()
FetchMode
. This
setting only applies to the ResultSet
automatically created by calling fetchData()
. If a pre-existing ResultSet is passed to setData()
instead, it's existing setting for ResultSet.fetchMode
applies.
getDataFetchMode
in interface DataBoundComponent
DataBinding
public Tree getDataProperties()
ColumnTree
that uses a DataSource, these properties will be passed to the automatically-created
ResultTree. This can be used for various customizations such as modifying the automatically-chosen Tree.parentIdField
.DataBinding
public ColumnTree setDataSource(DataSource dataSource)
DataSource requests
. Can be specified as either a DataSource instance or the String ID of a DataSource.
setDataSource
in interface DataBoundComponent
dataSource
- New dataSource value. Default value is nullColumnTree
instance, for chaining setter callsDataBinding
,
DataSource fields Examplepublic ColumnTree setDataSource(java.lang.String dataSource)
DataSource requests
. Can be specified as either a DataSource instance or the String ID of a DataSource.
setDataSource
in interface DataBoundComponent
dataSource
- New dataSource value. Default value is nullColumnTree
instance, for chaining setter callsDataBinding
,
DataSource fields Examplepublic ColumnTree setEmptyColumnMessages(java.lang.String... emptyColumnMessages) throws java.lang.IllegalStateException
fixedColumns
enabled, defines each column's
ListGrid.emptyMessage
.emptyColumnMessages
- New emptyColumnMessages value. Default value is nullColumnTree
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String[] getEmptyColumnMessages()
fixedColumns
enabled, defines each column's
ListGrid.emptyMessage
.public ColumnTree setFields(ListGridField... fields)
If dataSource
is also set, this value acts as a set of overrides
as explained in DataBoundComponent.fields
.
fields
- New fields value. Default value is nullColumnTree
instance, for chaining setter callsListGridField
,
DataBinding
public ColumnTree setFirstColumnTitle(java.lang.String firstColumnTitle) throws java.lang.IllegalStateException
showHeaders
is set
(the remaining columns have their titles derived from the item selected in the column to the left). Ignored if showHeaders
is not set.firstColumnTitle
- New firstColumnTitle value. Default value is " "ColumnTree
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getFirstColumnTitle()
showHeaders
is set
(the remaining columns have their titles derived from the item selected in the column to the left). Ignored if showHeaders
is not set.public ColumnTree setFixedColumns(java.lang.Integer fixedColumns) throws java.lang.IllegalStateException
fixedColumns
- New fixedColumns value. Default value is nullColumnTree
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Integer getFixedColumns()
public ColumnTree setFolderIcon(java.lang.String folderIcon)
openIconSuffix
or closedIconSuffix
appended to indicate state changes if
appropriate - see documentation on showOpenIcons
folderIcon
- New folderIcon value. Default value is "[SKIN]folder.png"ColumnTree
instance, for chaining setter callsSCImgURL
public java.lang.String getFolderIcon()
openIconSuffix
or closedIconSuffix
appended to indicate state changes if
appropriate - see documentation on showOpenIcons
SCImgURL
public ColumnTree setLoadDataOnDemand(java.lang.Boolean loadDataOnDemand) throws java.lang.IllegalStateException
loadDataOnDemand
- New loadDataOnDemand value. Default value is nullColumnTree
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDataBinding
public java.lang.Boolean getLoadDataOnDemand()
DataBinding
public ColumnTree setNodeIcon(java.lang.String nodeIcon)
customIconProperty
directly on the node.
See TreeGrid.showNodeIcons
and TreeGrid.showFolderIcons
for details on suppressing
display of icons
nodeIcon
- New nodeIcon value. Default value is "[SKIN]file.png"ColumnTree
instance, for chaining setter callsSCImgURL
,
Miller Columns Examplepublic java.lang.String getNodeIcon()
customIconProperty
directly on the node.
See TreeGrid.showNodeIcons
and TreeGrid.showFolderIcons
for details on suppressing
display of icons
SCImgURL
,
Miller Columns Examplepublic ColumnTree setOpenIconSuffix(java.lang.String openIconSuffix)
showOpenIcons
is true, this suffix will be
appended to the folderIcon
for open folders in this
grid.openIconSuffix
- New openIconSuffix value. Default value is "open"ColumnTree
instance, for chaining setter callspublic java.lang.String getOpenIconSuffix()
showOpenIcons
is true, this suffix will be
appended to the folderIcon
for open folders in this
grid.public ColumnTree setShowCustomIconOpen(java.lang.Boolean showCustomIconOpen)
customIconProperty
), show open state images when the
folder is opened. If true, the openIconSuffix
will
be appended to the image URL (so "customFolder.gif"
might be replaced with
"customFolder_open.gif"
).closedIconSuffix
is never appended to custom folder
icons.TreeNode.showOpenIcon
and that property can be renamed via
TreeGrid.customIconOpenProperty
.
Note : This is an advanced setting
showCustomIconOpen
- New showCustomIconOpen value. Default value is falseColumnTree
instance, for chaining setter callspublic java.lang.Boolean getShowCustomIconOpen()
customIconProperty
), show open state images when the
folder is opened. If true, the openIconSuffix
will
be appended to the image URL (so "customFolder.gif"
might be replaced with
"customFolder_open.gif"
).closedIconSuffix
is never appended to custom folder
icons.TreeNode.showOpenIcon
and that property can be renamed via
TreeGrid.customIconOpenProperty
.public ColumnTree setShowDetailFields(java.lang.Boolean showDetailFields) throws java.lang.IllegalStateException
detail:true
when a DataBoundComponent is given a DataSource but no
component.fields
. The detail
property is used on DataSource fields to mark fields that
shouldn't appear by default in a view that tries to show many records in a small space.
setShowDetailFields
in interface DataBoundComponent
showDetailFields
- New showDetailFields value. Default value is trueColumnTree
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDataBinding
public java.lang.Boolean getShowDetailFields()
detail:true
when a DataBoundComponent is given a DataSource but no
component.fields
. The detail
property is used on DataSource fields to mark fields that
shouldn't appear by default in a view that tries to show many records in a small space.
getShowDetailFields
in interface DataBoundComponent
DataBinding
public ColumnTree setShowHeaders(java.lang.Boolean showHeaders) throws java.lang.IllegalStateException
showHeaders
- New showHeaders value. Default value is falseColumnTree
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowHeaders()
public ColumnTree setShowMultipleColumns(java.lang.Boolean showMultipleColumns)
showMultipleColumns
- New showMultipleColumns value. Default value is nullColumnTree
instance, for chaining setter callspublic java.lang.Boolean getShowMultipleColumns()
public ColumnTree setShowNodeCount(java.lang.Boolean showNodeCount) throws java.lang.IllegalStateException
showHeaders
is also set, each column's
header will show a count of the number of nodes in that columnshowNodeCount
- New showNodeCount value. Default value is falseColumnTree
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowNodeCount()
showHeaders
is also set, each column's
header will show a count of the number of nodes in that columnpublic ColumnTree setShowOpenIcons(java.lang.Boolean showOpenIcons)
open
folders than closed folders. This is achieved by appending the
openIconSuffix
onto the folderIcon
URL [for example "[SKIN]/folder.gif"
might be replaced by "[SKIN]/folder_open.gif"
.false
the same icon is shown for open folders as for closed folders, unless a custom folder icon was
specified. This will be determined by folderIcon
plus
the closedIconSuffix
.showOpenIcons
- New showOpenIcons value. Default value is trueColumnTree
instance, for chaining setter callspublic java.lang.Boolean getShowOpenIcons()
open
folders than closed folders. This is achieved by appending the
openIconSuffix
onto the folderIcon
URL [for example "[SKIN]/folder.gif"
might be replaced by "[SKIN]/folder_open.gif"
.false
the same icon is shown for open folders as for closed folders, unless a custom folder icon was
specified. This will be determined by folderIcon
plus
the closedIconSuffix
.public void folderDrop(TreeNode[] nodes, TreeNode folder, int index, Canvas sourceWidget)
TreeGridDrop
for an overview of TreeGrid drag and drop behavior. Add logic in your drop handler to perform custom drop behaviors;
to suppress the built-in behavior described below, use event.cancel()
The default behavior is to
simply delegate to the transferNodes()
method; thus,
the correct way to perform a programmatic folder drop, with all the built-in behaviors described below, is to call
transferNodes()
If this is a self-drop, nodes are simply reordered. An "update" operation will be
submitted to update the parentId
field of the moved
node(s).
For a drop from another widget, TreeGrid.transferDragData()
is called which, depending on the dragDataAction
specified on the source widget, may either
remove the source nodes from the original list (dragDataAction:"move"
) or just provide a copy to this tree
(dragDataAction:"copy"
).
In either case the new row(s) appear in the folder
at the
index
specified by the arguments of the same name.
If this grid is databound, the new nodes will be
added to the dataset by calling DataSource.addData()
. Further, if
the new nodes were dragged from another databound component, and addDropValues
is true, getDropValues
will be called for every item being dropped.
As a special case, if the sourceWidget
is also databound and a foreignKey
relationship is declared from the
sourceWidget
's DataSource to this TreeGrid's DataSource, the interaction will be treated as a "drag
recategorization" use case such as files being placed in folders, employees being assigned to teams, etc. "update"
DSRequests will be submitted that change the foreignKey field in the dropped records to point to the tree folder that
was the target of the drop. In this case no change will be made to the Tree data as such, only to the dropped records.
For multi-record drops, Queuing is automatically used to combine all DSRequests into a single HTTP Request (see QuickStart Guide, Server Framework chapter). This allows the server to persist all changes caused by the drop in a single transaction (and this is automatically done when using the built-in server DataSources with Power Edition and above).
If these default persistence behaviors are undesirable, use event.cancel()
, then implement
your own behavior, typically by using grid.updateData() or addData() to add new records.
NOTE: the records
you receive in this event are the actual Records from the source component. Use DataSource.copyRecords()
to create a copy before modifying the records
or using them with updateData() or addData().
nodes
- List of nodes being droppedfolder
- The folder being dropped onindex
- Within the folder being dropped on, the index at which the drop is occurring. Only passed if canReorderRecords
is true.sourceWidget
- The component that is the source of the nodes (where the nodes were dragged from)transferNodes(com.smartgwt.client.widgets.tree.TreeNode[], com.smartgwt.client.widgets.tree.TreeNode, java.lang.Integer, com.smartgwt.client.widgets.Canvas)
,
Drag and Drop
,
Drop Events Examplepublic void getColumnTitle(TreeNode node, int colNum)
shouldShowHeader()
returns true for this column. By
default, returns firstColumnTitle
for the first
column, and for subsequent columns, the result of this.data.getTitle()
called on the node
passed to this function.
node
- parent node for the nodes to be shown in the columncolNum
- index of the columnpublic TreeNode getRecord(int index)
If colNum
is passed, returns the record found in that column at that
index, or null if the column doesn't exist or the index is too high.
With no colNum
parameter, a
record's index is it's position counting from the first record of the first column and including all records in each
column. Note that both index and colNum are zero-based - so the first column is column 0, not column 1.
index
- index of record to return.public TreeNode getRecord(int index, java.lang.Integer colNum)
If colNum
is passed, returns the record found in that column at that
index, or null if the column doesn't exist or the index is too high.
With no colNum
parameter, a
record's index is it's position counting from the first record of the first column and including all records in each
column. Note that both index and colNum are zero-based - so the first column is column 0, not column 1.
index
- index of record to return.colNum
- optional index of the columnpublic Record getSelectedRecord()
This is generally the most recently clicked node unless programmatic navigation has taken place.
If only the first column is showing, the
root node is returned (which can be detected via Tree.isRoot()
).
public void navigateBack()
public void shouldShowHeader(TreeNode node, int colNum)
node
- parent node for the nodes to be shown in the columncolNum
- index of the columnpublic void transferNodes(TreeNode[] nodes, TreeNode folder, java.lang.Integer index, Canvas sourceWidget)
TreeNode
s within this treeGrid or from from some other
component (does not have to be a databound component) into this component. This method is only applicable to
list-type components, such as listGrid
, treeGrid
or tileGrid
.
Please see the paragraph below for special rules concerning multi-link trees
. This method implements the automatic drag-copy and drag-move behavior and calling it is
equivalent to completing a drag and drop of the nodes
(the default folderDrop()
implementation simply calls
transferNodes()
)
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 the optional callback to this method or implement the DataBoundComponent.dropComplete()
method on this component.
For a TreeGrid, see also transferSelectedData()
.
Multi-link trees
If both the target treeGrid and the sourceWidget
for this transfer are multi-link treeGrids, the nodes
parameter must be an array of NodeLocator
s rather than TreeNodes. Likewise, if the target (this) component is a
multi-link treeGrid, the folder
parameter must be a NodeLocator.
You can obtain a NodeLocator for a
visible node occurence in a multi-link TreeGrid by calling its data model's getNodeLocator()
method.
nodes
- Nodes to transfer to this componentfolder
- The target folder (eg, of a drop interaction), for contextindex
- Insert point within the target folder data for the transferred nodessourceWidget
- The databound or non-databound component from which the nodes are to be transferred.Drag and Drop
,
Drop Events Examplepublic void transferNodes(TreeNode[] nodes, TreeNode folder, java.lang.Integer index, Canvas sourceWidget, java.lang.String callback)
TreeNode
s within this treeGrid or from from some other
component (does not have to be a databound component) into this component. This method is only applicable to
list-type components, such as listGrid
, treeGrid
or tileGrid
.
Please see the paragraph below for special rules concerning multi-link trees
. This method implements the automatic drag-copy and drag-move behavior and calling it is
equivalent to completing a drag and drop of the nodes
(the default folderDrop()
implementation simply calls
transferNodes()
)
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 the optional callback to this method or implement the DataBoundComponent.dropComplete()
method on this component.
For a TreeGrid, see also transferSelectedData()
.
Multi-link trees
If both the target treeGrid and the sourceWidget
for this transfer are multi-link treeGrids, the nodes
parameter must be an array of NodeLocator
s rather than TreeNodes. Likewise, if the target (this) component is a
multi-link treeGrid, the folder
parameter must be a NodeLocator.
You can obtain a NodeLocator for a
visible node occurence in a multi-link TreeGrid by calling its data model's getNodeLocator()
method.
nodes
- Nodes to transfer to this componentfolder
- The target folder (eg, of a drop interaction), for contextindex
- Insert point within the target folder data for the transferred nodessourceWidget
- The databound or non-databound component from which the nodes are to be transferred.callback
- optional callback to be fired when the transfer process has completed. The callback will be
passed a single parameter "records", the list of nodes actually transferred to this component (it
is called "records" because this is logic shared with ListGrid
).
See Callback
Drag and Drop
,
Drop Events Examplepublic static void setDefaultProperties(ColumnTree columnTreeProperties)
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.
columnTreeProperties
- properties that should be used as new defaults when instances of this class are createdSGWTProperties
protected void onInit_ColumnTree()
public void setDropIconSuffix(java.lang.String dropIconSuffix)
showDropIcons
is true, this suffix will be
appended to the folderIcon
when the user
drop-hovers over some folder.dropIconSuffix
- dropIconSuffix Default value is "drop"public java.lang.String getDropIconSuffix()
showDropIcons
is true, this suffix will be
appended to the folderIcon
when the user
drop-hovers over some folder.public void setShowDropIcons(java.lang.Boolean showDropIcons)
dropIconSuffix
onto the folderIcon
URL (for
example "[SKIN]/folder.gif"
may be replaced by "[SKIN]/folder_drop.gif"
).showDropIcons
- showDropIcons Default value is truepublic java.lang.Boolean getShowDropIcons()
dropIconSuffix
onto the folderIcon
URL (for
example "[SKIN]/folder.gif"
may be replaced by "[SKIN]/folder_drop.gif"
).public void deselectRecord(Record record, int colNum)
public void deselectRecord(int record, int colNum)
Record
passed in explicitly, or by index. Synonym for
selectRecord(record, false)
record
- row number to deselectcolNum
- the column numberpublic void deselectRecords(int[] records, int colNum)
Record
s passed in explicitly, or by index. Synonym
for selectRecords(records, false)
records
- records (or row numbers) to deselectcolNum
- the col numpublic void deselectRecord(Record[] records)
Record
s passed in explicitly, or by index. Synonym
for selectRecords(records, false)
records
- records (or row numbers) to deselectpublic void deselectRecords(Record[] records, int colNum)
Record
s passed in explicitly, or by index. Synonym
for selectRecords(records, false)
records
- records (or row numbers) to deselectcolNum
- the col numpublic void selectRecord(int record, boolean newState, int colNum)
Record
passed in explicitly, or by index.record
- record (or row number) to selectnewState
- new selection state (if null, defaults to true)colNum
- Column numberpublic void selectRecord(Record record, boolean newState, int colNum)
Record
passed in explicitly, or by index.record
- record (or row number) to selectnewState
- new selection state (if null, defaults to true)colNum
- Column numberpublic void selectRecords(int[] records, boolean newState, int colNum)
Record
s passed in explicitly, or by index.records
- records (or row numbers) to selectnewState
- new selection state (if null, defaults to true)colNum
- Column numberpublic void selectRecords(Record[] records, boolean newState, int colNum)
Record
s passed in explicitly, or by index.records
- records (or row numbers) to selectnewState
- new selection state (if null, defaults to true)colNum
- Column numberpublic ListGridRecord[] getSelection(int colNum)
colNum
- Column within the columnTree to return the selection forpublic void selectAllRecords(int colNum)
colNum
- Column numberpublic void deselectAllRecords(int colNum)
colNum
- Column numberpublic java.lang.Boolean anySelected(int colNum)
colNum
- Column numberpublic com.google.gwt.event.shared.HandlerRegistration addNodeSelectedHandler(NodeSelectedHandler handler)
addNodeSelectedHandler
in interface HasNodeSelectedHandlers
handler
- the onNodeSelected handlerHandlerRegistration
used to remove this handlerpublic void setColumnProperties(ListGrid columnProperties) throws java.lang.IllegalStateException
column
in this columnTree. Developers may also override ColumnTree.getCustomColumnProperties
to return dynamic
properties based on the node being displayed.
Note : This is an advanced setting
columnProperties
- columnProperties Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic ListGrid getColumnProperties()
column
in this columnTree. Developers may also override ColumnTree.getColumnProperties
to return dynamic
properties based on the node being displayed.public ListGrid getCustomColumnProperties(TreeNode node, int colNum)
node
- parent node for the nodes to be shown in the columncolNum
- index of the columnpublic void setDataSource(DataSource dataSource, ListGridField... fields)
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().
dataSource
- fields
- public void setDataProperties(Tree resultTreeProperties)
resultTreeProperties
- the data propertiespublic ColumnTree setDataPageSize(int dataPageSize)
DataBoundComponent
data
paging
, how many records to fetch at a time. If set to a positive integer,
dataPageSize
will override the default resultSize
for ResultSets
automatically created when you call fetchData()
(and similarly for
the resultSize
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 as showAllRecords:true
, drawAllMaxCells
and drawAheadRatio
can cause
more rows than the configured dataPageSize
to be fetched.
setDataPageSize
in interface DataBoundComponent
dataPageSize
- dataPageSize Default value is 0DataBoundComponent
instance, for chaining setter callsDatabinding overview and related methods
public int getDataPageSize()
DataBoundComponent
data
paging
, how many records to fetch at a time. If set to a positive integer,
dataPageSize
will override the default resultSize
for ResultSets
automatically created when you call fetchData()
(and similarly for
the resultSize
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 as showAllRecords:true
, drawAllMaxCells
and drawAheadRatio
can cause
more rows than the configured dataPageSize
to be fetched.
getDataPageSize
in interface DataBoundComponent
Databinding overview and related methods
public ColumnTree setUseAllDataSourceFields(java.lang.Boolean useAllDataSourceFields)
DataBoundComponent
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.
setUseAllDataSourceFields
in interface DataBoundComponent
useAllDataSourceFields
- useAllDataSourceFields Default value is falseDataBoundComponent
instance, for chaining setter callspublic java.lang.Boolean getUseAllDataSourceFields()
DataBoundComponent
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.
getUseAllDataSourceFields
in interface DataBoundComponent
public ColumnTree setSparseFieldState(java.lang.Boolean sparseFieldState)
DataBoundComponent
ListGrid.getFieldState()
and
ListGrid.setFieldState(java.lang.String)
will omit state
information for hidden fields by default.setSparseFieldState
in interface DataBoundComponent
sparseFieldState
- sparseFieldState Default value is falseDataBoundComponent
instance, for chaining setter callspublic java.lang.Boolean getSparseFieldState()
DataBoundComponent
ListGrid.getFieldState()
and
ListGrid.setFieldState(java.lang.String)
will omit state
information for hidden fields by default.getSparseFieldState
in interface DataBoundComponent
public ColumnTree setShowHiddenFields(java.lang.Boolean showHiddenFields)
DataBoundComponent
hidden:true
when a DataBoundComponent is given a
DataSource but no component.fields
.
The hidden
property is used on DataSource fields to mark fields that are
never of meaning to an end user.
setShowHiddenFields
in interface DataBoundComponent
showHiddenFields
- showHiddenFields Default value is falseDataBoundComponent
instance, for chaining setter callspublic java.lang.Boolean getShowHiddenFields()
DataBoundComponent
hidden:true
when a DataBoundComponent is given a
DataSource but no component.fields
.
The hidden
property is used on DataSource fields to mark fields that are
never of meaning to an end user.
getShowHiddenFields
in interface DataBoundComponent
public ColumnTree setShowComplexFields(java.lang.Boolean showComplexFields)
DataBoundComponent
component.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
setShowComplexFields
in interface DataBoundComponent
showComplexFields
- showComplexFields Default value is trueDataBoundComponent
instance, for chaining setter callspublic java.lang.Boolean getShowComplexFields()
DataBoundComponent
component.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.
getShowComplexFields
in interface DataBoundComponent
public ColumnTree setFetchOperation(java.lang.String fetchOperation)
DataBoundComponent
setFetchOperation
in interface DataBoundComponent
fetchOperation
- fetchOperation Default value is nullDataBoundComponent
instance, for chaining setter callspublic java.lang.String getFetchOperation()
DataBoundComponent
getFetchOperation
in interface DataBoundComponent
public ColumnTree setUpdateOperation(java.lang.String updateOperation)
DataBoundComponent
operationId
this component
should use when performing update operations.setUpdateOperation
in interface DataBoundComponent
updateOperation
- Default value is nullDataBoundComponent
instance, for chaining setter callsOperations overview and related methods
public java.lang.String getUpdateOperation()
DataBoundComponent
operationId
this component
should use when performing update operations.getUpdateOperation
in interface DataBoundComponent
Operations overview and related methods
public ColumnTree setAddOperation(java.lang.String addOperation)
DataBoundComponent
operationId
this component
should use when performing add operations.setAddOperation
in interface DataBoundComponent
addOperation
- Default value is nullDataBoundComponent
instance, for chaining setter callsOperations overview and related methods
public java.lang.String getAddOperation()
DataBoundComponent
operationId
this component
should use when performing add operations.getAddOperation
in interface DataBoundComponent
Operations overview and related methods
public ColumnTree setRemoveOperation(java.lang.String removeOperation)
DataBoundComponent
operationId
this component
should use when performing remove operations.setRemoveOperation
in interface DataBoundComponent
removeOperation
- Default value is nullDataBoundComponent
instance, for chaining setter callsOperations overview and related methods
public java.lang.String getRemoveOperation()
DataBoundComponent
operationId
this component
should use when performing remove operations.getRemoveOperation
in interface DataBoundComponent
Operations overview and related methods
public ColumnTree setExportFields(java.lang.String[] exportFields)
DataBoundComponent
If exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.
setExportFields
in interface DataBoundComponent
exportFields
- exportFields Default value is nullDataBoundComponent
instance, for chaining setter callspublic java.lang.String[] getExportFields()
DataBoundComponent
If exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.
getExportFields
in interface DataBoundComponent
public ColumnTree setExportAll(java.lang.Boolean exportAll)
DataBoundComponent
fields
.
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.
setExportAll
in interface DataBoundComponent
exportAll
- exportAll Default value is falseDataBoundComponent
instance, for chaining setter callspublic java.lang.Boolean getExportAll()
DataBoundComponent
fields
.
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.
getExportAll
in interface DataBoundComponent
public ColumnTree setExportIncludeSummaries(java.lang.Boolean exportIncludeSummaries)
DataBoundComponent
setExportIncludeSummaries
in interface DataBoundComponent
exportIncludeSummaries
- exportIncludeSummaries Default value is trueDataBoundComponent
instance, for chaining setter callspublic java.lang.Boolean getExportIncludeSummaries()
DataBoundComponent
getExportIncludeSummaries
in interface DataBoundComponent
public ColumnTree setPreventDuplicates(java.lang.Boolean preventDuplicates) throws java.lang.IllegalStateException
DataBoundComponent
DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
.
When a duplicate transfer is detected,
a dialog will appear showing the duplicateDragMessage
.
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.
setPreventDuplicates
in interface DataBoundComponent
preventDuplicates
- preventDuplicates Default value is nullDataBoundComponent
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getPreventDuplicates()
DataBoundComponent
DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
.
When a duplicate transfer is detected,
a dialog will appear showing the duplicateDragMessage
.
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.
getPreventDuplicates
in interface DataBoundComponent
public ColumnTree setDuplicateDragMessage(java.lang.String duplicateDragMessage) throws java.lang.IllegalStateException
DataBoundComponent
preventDuplicates
is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.setDuplicateDragMessage
in interface DataBoundComponent
duplicateDragMessage
- duplicateDragMessage Default value is "Duplicates not allowed"DataBoundComponent
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getDuplicateDragMessage()
DataBoundComponent
preventDuplicates
is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.getDuplicateDragMessage
in interface DataBoundComponent
public ColumnTree setAddDropValues(java.lang.Boolean addDropValues)
DataBoundComponent
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
setAddDropValues
in interface DataBoundComponent
addDropValues
- addDropValues Default value is trueDataBoundComponent
instance, for chaining setter callspublic java.lang.Boolean getAddDropValues()
DataBoundComponent
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
getAddDropValues
in interface DataBoundComponent
public ColumnTree setDropValues(java.util.Map dropValues)
DataBoundComponent
addDropValues
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
setDropValues
in interface DataBoundComponent
dropValues
- dropValues Default value is nullDataBoundComponent
instance, for chaining setter callspublic java.util.Map getDropValues()
DataBoundComponent
addDropValues
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
getDropValues
in interface DataBoundComponent
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:
addDropValues
is falseYou can override this method if you need more complex setting of drop values than can be provided by simply supplying a dropValues object.
public ColumnTree setProgressiveLoading(java.lang.Boolean progressiveLoading)
progressively
progressiveLoading
- DataBoundComponent
instance, for chaining setter callsProgressiveLoading
,
DataSource.setProgressiveLoading(java.lang.Boolean)
public java.lang.Boolean getProgressiveLoading()
progressively
ProgressiveLoading
,
DataSource.getProgressiveLoading()
public ColumnTree setUseFlatFields(java.lang.Boolean useFlatFields) throws java.lang.IllegalStateException
DataBoundComponent
useFlatFields
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>Setting
useFlatFields
on a DynamicForm
that is bound to this input
message schema would result in 5 FormItem
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 a
WebService
, these values can be automatically
mapped to the structure of the input message for a web service operation by setting
useFlatFields
(for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)
) or by setting
useFlatFields
(for use with a DataSource
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.
setUseFlatFields
in interface DataBoundComponent
useFlatFields
- useFlatFields Default value is nullDataBoundComponent
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getUseFlatFields()
DataBoundComponent
useFlatFields
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>Setting
useFlatFields
on a DynamicForm
that is bound to this input
message schema would result in 5 FormItem
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 a
WebService
, these values can be automatically
mapped to the structure of the input message for a web service operation by setting
useFlatFields
(for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)
) or by setting
useFlatFields
(for use with a DataSource
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.
getUseFlatFields
in interface DataBoundComponent
public ColumnTree setHiliteProperty(java.lang.String hiliteProperty)
DataBoundComponent
id
for a hilite defined on this component.setHiliteProperty
in interface DataBoundComponent
hiliteProperty
- hiliteProperty Default value is "_hilite"DataBoundComponent
instance, for chaining setter callspublic java.lang.String getHiliteProperty()
DataBoundComponent
id
for a hilite defined on this component.getHiliteProperty
in interface DataBoundComponent
public void editFields()
public void editHilites()
DataBoundComponent
editHilites
in interface DataBoundComponent
public java.lang.String getHiliteState()
DataBoundComponent
getHiliteState
in interface DataBoundComponent
public ColumnTree setHiliteState(java.lang.String hiliteState)
DataBoundComponent
setHiliteState
in interface DataBoundComponent
hiliteState
- hilites state encoded as a StringDataBoundComponent
instance, for chaining setter callspublic ColumnTree setHilites(Hilite[] hilites)
DataBoundComponent
getHilites
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.
setHilites
in interface DataBoundComponent
hilites
- array of hilite objectsDataBoundComponent
instance, for chaining setter callspublic Hilite[] getHilites()
DataBoundComponent
getHilites
in interface DataBoundComponent
public ColumnTree setDragDataAction(DragDataAction dragDataAction)
DataBoundComponent
setDragDataAction
in interface DataBoundComponent
dragDataAction
- dragDataAction Default value is Canvas.MOVEDataBoundComponent
instance, for chaining setter callspublic DragDataAction getDragDataAction()
DataBoundComponent
getDragDataAction
in interface DataBoundComponent
public ColumnTree setDragTrackerStyle(java.lang.String dragTrackerStyle)
DataBoundComponent
setDragTrackerStyle
in interface DataBoundComponent
dragTrackerStyle
- dragTrackerStyle Default value is "gridDragTracker"DataBoundComponent
instance, for chaining setter callspublic java.lang.String getDragTrackerStyle()
DataBoundComponent
getDragTrackerStyle
in interface DataBoundComponent
public ColumnTree setCanAddFormulaFields(java.lang.Boolean canAddFormulaFields)
DataBoundComponent
com.smartgwt.client..FormulaBuilder
.
User-added formula fields can be persisted via ListGrid.getFieldState()
and
ListGrid.setFieldState(java.lang.String)
.
setCanAddFormulaFields
in interface DataBoundComponent
canAddFormulaFields
- canAddFormulaFields Default value is falseDataBoundComponent
instance, for chaining setter callspublic void addSummaryField()
DataBoundComponent
com.smartgwt.client..SummaryBuilder
to create a new Summary Field. This
is equivalent to calling DataBoundComponentGen#editSummaryField
with
no parameter.
addSummaryField
in interface DataBoundComponent
public void addFormulaField()
DataBoundComponent
com.smartgwt.client..FormulaBuilder
to create a new Formula Field. This
is equivalent to calling DataBoundComponentGen#editFormulaField
with
no parameter.
addFormulaField
in interface DataBoundComponent
public java.lang.Boolean getCanAddFormulaFields()
DataBoundComponent
com.smartgwt.client..FormulaBuilder
.
User-added formula fields can be persisted via ListGrid.getFieldState()
and
ListGrid.setFieldState(java.lang.String)
.
getCanAddFormulaFields
in interface DataBoundComponent
public ColumnTree setAddFormulaFieldText(java.lang.String addFormulaFieldText)
DataBoundComponent
setAddFormulaFieldText
in interface DataBoundComponent
addFormulaFieldText
- addFormulaFieldText Default value is "Add formula column..."DataBoundComponent
instance, for chaining setter callspublic java.lang.String getAddFormulaFieldText()
DataBoundComponent
getAddFormulaFieldText
in interface DataBoundComponent
public ColumnTree setEditFormulaFieldText(java.lang.String editFormulaFieldText)
DataBoundComponent
setEditFormulaFieldText
in interface DataBoundComponent
editFormulaFieldText
- editFormulaFieldText Default value is "Edit formula..."DataBoundComponent
instance, for chaining setter callspublic java.lang.String getEditFormulaFieldText()
DataBoundComponent
getEditFormulaFieldText
in interface DataBoundComponent
public ColumnTree setCanAddSummaryFields(java.lang.Boolean canAddSummaryFields)
DataBoundComponent
com.smartgwt.client..SummaryBuilder
.
User-added summary fields can be persisted via ListGrid.getFieldState()
and
ListGrid.setFieldState(java.lang.String)
.
setCanAddSummaryFields
in interface DataBoundComponent
canAddSummaryFields
- canAddSummaryFields Default value is falseDataBoundComponent
instance, for chaining setter callspublic java.lang.Boolean getCanAddSummaryFields()
DataBoundComponent
com.smartgwt.client..SummaryBuilder
.
User-added summary fields can be persisted via ListGrid.getFieldState()
and
ListGrid.setFieldState(java.lang.String)
.
getCanAddSummaryFields
in interface DataBoundComponent
public ColumnTree setAddSummaryFieldText(java.lang.String addSummaryFieldText)
DataBoundComponent
setAddSummaryFieldText
in interface DataBoundComponent
addSummaryFieldText
- addSummaryFieldText Default value is "Add summary column..."DataBoundComponent
instance, for chaining setter callspublic java.lang.String getAddSummaryFieldText()
DataBoundComponent
getAddSummaryFieldText
in interface DataBoundComponent
public ColumnTree setEditSummaryFieldText(java.lang.String editSummaryFieldText)
DataBoundComponent
setEditSummaryFieldText
in interface DataBoundComponent
editSummaryFieldText
- editSummaryFieldText Default value is "Edit summary format..."DataBoundComponent
instance, for chaining setter callspublic java.lang.String getEditSummaryFieldText()
DataBoundComponent
getEditSummaryFieldText
in interface DataBoundComponent
public ColumnTree setSavedSearchId(java.lang.String savedSearchId)
DataBoundComponent
By default
SavedSearches
are associated with a component via its
local ID
and
DataSource 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 explicit
Canvas.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.
setSavedSearchId
in interface DataBoundComponent
savedSearchId
- New savedSearchId value. Default value is nullDataBoundComponent
instance, for chaining setter callspublic java.lang.String getSavedSearchId()
DataBoundComponent
By default
SavedSearches
are associated with a component via its
local ID
and
DataSource 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 explicit
Canvas.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.
getSavedSearchId
in interface DataBoundComponent
public ColumnTree setShowSavedSearchesByDS(boolean showSavedSearchesByDS) throws java.lang.IllegalStateException
DataBoundComponent
DataSource
of a component when a
savedSearchId
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
setShowSavedSearchesByDS
in interface DataBoundComponent
showSavedSearchesByDS
- New showSavedSearchesByDS value. Default value is trueDataBoundComponent
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has
been createdpublic boolean getShowSavedSearchesByDS()
DataBoundComponent
DataSource
of a component when a
savedSearchId
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.
getShowSavedSearchesByDS
in interface DataBoundComponent
public Record[] findAll(AdvancedCriteria adCriteria)
adCriteria
- AdvancedCriteria to use to filter resultspublic Record find(AdvancedCriteria adCriteria)
adCriteria
- AdvancedCriteria to use to filter resultspublic int findIndex(AdvancedCriteria adCriteria)
adCriteria
- AdvancedCriteria to use to filter resultspublic int findNextIndex(int startIndex, AdvancedCriteria adCriteria, int endIndex)
RecordList.findIndex(java.util.Map)
, but considering the startIndex and endIndex parameters.startIndex
- first index to consideradCriteria
- AdvancedCriteria to use to filter resultsendIndex
- last index to considerpublic int findNextIndex(int startIndex, AdvancedCriteria adCriteria)
RecordList.findIndex(java.util.Map)
, but considering the startIndex parameter.startIndex
- first index to consideradCriteria
- AdvancedCriteria to use to filter resultspublic void selectRecord(Record record)
DataBoundComponent
Record
passed in explicitly, or by index.selectRecord
in interface DataBoundComponent
record
- record (or row number) to selectpublic void selectRecord(int record)
DataBoundComponent
Record
passed in explicitly, or by index.selectRecord
in interface DataBoundComponent
record
- record (or row number) to selectpublic void selectRecord(int record, boolean newState)
DataBoundComponent
Record
passed in explicitly, or by index.selectRecord
in interface DataBoundComponent
record
- record (or row number) to selectnewState
- new selection state (if null, defaults to true)public void selectRecord(Record record, boolean newState)
DataBoundComponent
Record
passed in explicitly, or by index.selectRecord
in interface DataBoundComponent
record
- record (or row number) to selectnewState
- new selection state (if null, defaults to true)public void selectRecords(int[] records)
DataBoundComponent
Record
s passed in explicitly, or by index.selectRecords
in interface DataBoundComponent
records
- records (or row numbers) to selectpublic void selectRecords(int[] records, boolean newState)
DataBoundComponent
Record
s passed in explicitly, or by index.selectRecords
in interface DataBoundComponent
records
- records (or row numbers) to selectnewState
- new selection statepublic void selectRecords(Record[] records)
DataBoundComponent
Record
s passed in explicitly, or by index.selectRecords
in interface DataBoundComponent
records
- records (or row numbers) to selectpublic void selectRecords(Record[] records, boolean newState)
DataBoundComponent
Record
s passed in explicitly, or by index.selectRecords
in interface DataBoundComponent
records
- records (or row numbers) to selectnewState
- new selection state (if null, defaults to true)public void deselectRecord(Record record)
DataBoundComponent
Record
passed in explicitly, or by index. Synonym for
selectRecord(record, false)
deselectRecord
in interface DataBoundComponent
record
- record (or row number) to deselectpublic void deselectRecord(int record)
DataBoundComponent
Record
passed in explicitly, or by index. Synonym for
selectRecord(record, false)
deselectRecord
in interface DataBoundComponent
record
- record (or row number) to deselectpublic void deselectRecords(int[] records)
DataBoundComponent
Record
s passed in explicitly, or by index. Synonym
for selectRecords(records, false)
deselectRecords
in interface DataBoundComponent
records
- records (or row numbers) to deselectpublic void deselectRecords(Record[] records)
DataBoundComponent
Record
s passed in explicitly, or by index. Synonym
for selectRecords(records, false)
deselectRecords
in interface DataBoundComponent
records
- records (or row numbers) to deselectpublic void selectAllRecords()
DataBoundComponent
selectAllRecords
in interface DataBoundComponent
public void deselectAllRecords()
DataBoundComponent
deselectAllRecords
in interface DataBoundComponent
public java.lang.Boolean anySelected()
DataBoundComponent
anySelected
in interface DataBoundComponent
public void enableHilite(java.lang.String hiliteID)
DataBoundComponent
hilites
enableHilite
in interface DataBoundComponent
hiliteID
- ID of hilite to enablepublic void enableHilite(java.lang.String hiliteID, boolean enable)
DataBoundComponent
hilites
enableHilite
in interface DataBoundComponent
hiliteID
- ID of hilite to enableenable
- new enabled state to apply - if null, defaults to truepublic void disableHilite(java.lang.String hiliteID)
DataBoundComponent
disableHilite
in interface DataBoundComponent
hiliteID
- ID of hilite to disablepublic void enableHiliting()
DataBoundComponent
enableHiliting
in interface DataBoundComponent
public void enableHiliting(boolean enable)
DataBoundComponent
enableHiliting
in interface DataBoundComponent
enable
- new enabled state to apply - if null, defaults to truepublic void disableHiliting()
DataBoundComponent
disableHiliting
in interface DataBoundComponent
public Record[] getDragData()
DataBoundComponent
This method is consulted by
ListGrid.willAcceptDrop()
.
getDragData
in interface DataBoundComponent
Record
s that are currently selected.public void transferSelectedData(DataBoundComponent source)
DataBoundComponent
DataBoundComponent.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 the drop()
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, use addDropCompleteHandler
.
See the Dragging
documentation for an overview of list grid drag/drop data transfer.
transferSelectedData
in interface DataBoundComponent
source
- source component from which the records will be tranferredpublic void transferSelectedData(DataBoundComponent source, int index)
DataBoundComponent
DataBoundComponent.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 the drop()
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, use addDropCompleteHandler
.
See the Dragging
documentation for an overview of list grid drag/drop data transfer.
transferSelectedData
in interface DataBoundComponent
source
- source component from which the records will be transferredindex
- target index (drop position) of the rows within this grid.public int getRecordIndex(Record record)
DataBoundComponent
Override in subclasses to provide more specific behaviour, for instance, when data holds a large number of records
getRecordIndex
in interface DataBoundComponent
record
- the record whose index is to be retrievedpublic java.lang.String getTitleFieldValue(Record record)
DataBoundComponent
Override in subclasses
getTitleFieldValue
in interface DataBoundComponent
record
- the record whose index is to be retrievedpublic ColumnTree setTitleField(java.lang.String titleField)
DataBoundComponent
setTitleField
in interface DataBoundComponent
DataBoundComponent
instance, for chaining setter callspublic java.lang.String getTitleField()
DataBoundComponent
titleField
for databound
components."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.
getTitleField
in interface DataBoundComponent
public DataSource getDataSource()
DataBoundComponent
DataSource requests
.getDataSource
in interface DataBoundComponent
public ColumnTree setAutoFetchData(java.lang.Boolean autoFetchData) throws java.lang.IllegalStateException
DataBoundComponent
DataBoundComponent.fetchData()
or DataBoundComponent.filterData()
depending on
DataBoundComponent.getAutoFetchAsFilter()
. Criteria for this fetch may be picked up from initialCriteria
and textMatchStyle may be specified via DataBoundComponent.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.
setAutoFetchData
in interface DataBoundComponent
autoFetchData
- autoFetchDataDataBoundComponent
instance, for chaining setter callsjava.lang.IllegalStateException
public java.lang.Boolean getAutoFetchData()
DataBoundComponent
DataBoundComponent.fetchData()
or DataBoundComponent.filterData()
depending on
DataBoundComponent.getAutoFetchAsFilter()
. Criteria for this fetch may be picked up from initialCriteria
and textMatchStyle may be specified via DataBoundComponent.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.
getAutoFetchData
in interface DataBoundComponent
public ColumnTree setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle) throws java.lang.IllegalStateException
DataBoundComponent
autoFetchData
is true
, this attribute allows the developer to specify a textMatchStyle
for the initial DataBoundComponent.fetchData()
call.setAutoFetchTextMatchStyle
in interface DataBoundComponent
DataBoundComponent
instance, for chaining setter callsjava.lang.IllegalStateException
public TextMatchStyle getAutoFetchTextMatchStyle()
DataBoundComponent
autoFetchData
is true
, this attribute allows the developer to specify a textMatchStyle
for the initial DataBoundComponent.fetchData()
call.getAutoFetchTextMatchStyle
in interface DataBoundComponent
public ColumnTree setAutoFetchAsFilter(java.lang.Boolean autoFetchAsFilter) throws java.lang.IllegalStateException
DataBoundComponent
DataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData()
or DataBoundComponent.filterData()
setAutoFetchAsFilter
in interface DataBoundComponent
autoFetchAsFilter
- autoFetchAsFilterDataBoundComponent
instance, for chaining setter callsjava.lang.IllegalStateException
public java.lang.Boolean getAutoFetchAsFilter()
DataBoundComponent
DataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData()
or DataBoundComponent.filterData()
getAutoFetchAsFilter
in interface DataBoundComponent
public ColumnTree setInitialCriteria(Criteria initialCriteria) throws java.lang.IllegalStateException
DataBoundComponent
DataBoundComponent.setAutoFetchData(Boolean)
is used.setInitialCriteria
in interface DataBoundComponent
initialCriteria
- the initial criteriaDataBoundComponent
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic Criteria getInitialCriteria()
DataBoundComponent
DataBoundComponent.setAutoFetchData(Boolean)
is used.getInitialCriteria
in interface DataBoundComponent
public ColumnTree setImplicitCriteria(Criteria implicitCriteria)
DataBoundComponent
DataBoundComponent.initialCriteria
,
DataBoundComponent.setCriteria()
etc.setImplicitCriteria
in interface DataBoundComponent
implicitCriteria
- New implicitCriteria value. Default value is nullDataBoundComponent
instance, for chaining setter callspublic java.lang.Boolean setImplicitCriteria(Criteria implicitCriteria, DSCallback callback)
public java.lang.Boolean setImplicitCriteria(Criteria criteria, DSCallback callback, java.lang.Boolean initialFetch)
public Criteria getImplicitCriteria()
DataBoundComponent
DataBoundComponent.initialCriteria
,
DataBoundComponent.setCriteria()
etc.getImplicitCriteria
in interface DataBoundComponent
public void fetchData()
DataBoundComponent
When fetchData()
is first called, if data has not already been provided via
setData()
, this method will create a ResultSet
, which will be
configured based on component settings such as fetchOperation
and dataPageSize
, as well
as the general purpose dataProperties
. 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 to fetchData()
- this may result in two DSRequests to fetch data. Use
either autoFetchData
and setAutoFetchCriteria()
or a manual call to fetchData()
passing criteria.
Whether a ResultSet was automatically created or provided via setData()
, subsequent
calls to fetchData() will simply call resultSet.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 using invalidateCache()
there is no need to also call fetchData()
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 use
resultSet.willFetchData()
to determine whether or not a server
fetch will occur when fetchData()
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.
fetchData
in interface DataBoundComponent
public void fetchData(Criteria criteria)
DataBoundComponent
When fetchData()
is first called, if data has not already been provided via
setData()
, this method will create a ResultSet
, which will be
configured based on component settings such as fetchOperation
and dataPageSize
, as well
as the general purpose dataProperties
. 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 to fetchData()
- this may result in two DSRequests to fetch data. Use
either autoFetchData
and setAutoFetchCriteria()
or a manual call to fetchData()
passing criteria.
Whether a ResultSet was automatically created or provided via setData()
, subsequent
calls to fetchData() will simply call resultSet.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 using invalidateCache()
there is no need to also call fetchData()
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 use
resultSet.willFetchData()
to determine whether or not a server
fetch will occur when fetchData()
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.
fetchData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object, will be
derived by calling DynamicForm.getValuesAsCriteria()
public void fetchData(Criteria criteria, DSCallback callback)
DataBoundComponent
When fetchData()
is first called, if data has not already been provided via
setData()
, this method will create a ResultSet
, which will be
configured based on component settings such as fetchOperation
and dataPageSize
, as well
as the general purpose dataProperties
. 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 to fetchData()
- this may result in two DSRequests to fetch data. Use
either autoFetchData
and setAutoFetchCriteria()
or a manual call to fetchData()
passing criteria.
Whether a ResultSet was automatically created or provided via setData()
, subsequent
calls to fetchData() will simply call resultSet.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 using invalidateCache()
there is no need to also call fetchData()
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 use
resultSet.willFetchData()
to determine whether or not a server
fetch will occur when fetchData()
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.
fetchData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object, will be
derived by calling DynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires only
if server contact was requiredpublic void fetchData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
DataBoundComponent
When fetchData()
is first called, if data has not already been provided via
setData()
, this method will create a ResultSet
, which will be
configured based on component settings such as fetchOperation
and dataPageSize
, as well
as the general purpose dataProperties
. 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 to fetchData()
- this may result in two DSRequests to fetch data. Use
either autoFetchData
and setAutoFetchCriteria()
or a manual call to fetchData()
passing criteria.
Whether a ResultSet was automatically created or provided via setData()
, subsequent
calls to fetchData() will simply call resultSet.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 using invalidateCache()
there is no need to also call fetchData()
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 use
resultSet.willFetchData()
to determine whether or not a server
fetch will occur when fetchData()
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.
fetchData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object,
will be derived by calling DynamicForm.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 issuedpublic void filterData()
DataBoundComponent
This
method behaves exactly like ListGrid.fetchData()
except that textMatchStyle
is automatically set to "substring" so that
String-valued fields are matched by case-insensitive substring comparison.
filterData
in interface DataBoundComponent
public void filterData(Criteria criteria)
DataBoundComponent
This
method behaves exactly like ListGrid.fetchData()
except that textMatchStyle
is automatically set to "substring" so that
String-valued fields are matched by case-insensitive substring comparison.
filterData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object, will be
derived by calling DynamicForm.getValuesAsCriteria()
public void filterData(Criteria criteria, DSCallback callback)
DataBoundComponent
This
method behaves exactly like ListGrid.fetchData()
except that textMatchStyle
is automatically set to "substring" so that
String-valued fields are matched by case-insensitive substring comparison.
filterData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object,
will be derived by calling DynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires
only if server contact was required; see
DataBoundComponent.fetchData()
for detailspublic void filterData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
DataBoundComponent
This
method behaves exactly like ListGrid.fetchData()
except that textMatchStyle
is automatically set to "substring" so that
String-valued fields are matched by case-insensitive substring comparison.
filterData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object,
will be derived by calling DynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires
only if server contact was required; see
DataBoundComponent.fetchData()
for detailsrequestProperties
- for databound components only - optional additional
properties to set on the DSRequest that will be issuedpublic void invalidateCache()
DataBoundComponent
invalidateCache()
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 - see ResultSet
for details. If automatic
cache synchronization isn't working, troubleshoot the problem using the steps suggested
in the FAQ rather than just calling invalidateCache(). Calling
invalidateCache()
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, call
ResultSet.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.
invalidateCache
in interface DataBoundComponent
ListGrid.refreshData()
,
DataBoundComponentMethods
overview and related methods
public ResultSet getResultSet()
DataBoundComponent
ResultSet
.
Note that this method should only be called after initial data has been fetched by this DataBoundComponent.
getResultSet
in interface DataBoundComponent
DataBoundComponent.fetchData()
public RecordList getRecordList()
DataBoundComponent
RecordList
.
Depending on the component configuration, the actual JavaScript instance of the returned RecordList may be one of several types:
DataSource
,
the instance is generally an Array of Record
.ResultSet
.Tree
.
To access the ungrouped record list regardless of grouping status, use
isGrouped() ? getOriginalRecordList() : getRecordList()
TreeGrid
,
the instance is a ResultTree.getRecordList
in interface DataBoundComponent
public com.google.gwt.core.client.JavaScriptObject getDataAsJSList()
getDataAsJSList
in interface DataBoundComponent
public void exportData()
DataBoundComponent
exportData
in interface DataBoundComponent
public void exportData(DSRequest requestProperties)
DataBoundComponent
exportData
in interface DataBoundComponent
public void exportData(DSRequest requestProperties, RPCCallback callback)
DataBoundComponent
DataSource
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
and
exportFilename
, affect the
exporting process: see
exportResults
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
.
exportData
in interface DataBoundComponent
requestProperties
- additional properties to set on DSRequest that will be issuedcallback
- Optional callback. Note that this parameter only applies if you specify
exportToClient
: false in
the request properties, because file downloads don't provide ordinary framework callbacksDataBoundComponentMethods
overview and related methods
public com.google.gwt.event.shared.HandlerRegistration addFetchDataHandler(FetchDataHandler handler)
Notification function fired on fetchData() or filterData()
addFetchDataHandler
in interface HasFetchDataHandlers
handler
- the filterData handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDropCompleteHandler(DropCompleteHandler handler)
com.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
).addDropCompleteHandler
in interface HasDropCompleteHandlers
handler
- the DropCompleteHandlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragCompleteHandler(DragCompleteHandler handler)
com.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
).addDragCompleteHandler
in interface HasDragCompleteHandlers
handler
- the DropCompleteHandlerHandlerRegistration
used to remove this handlerpublic Alignment[] getFieldAlignments()
DataBoundComponent
getFieldAlignments
in interface DataBoundComponent
public java.lang.Boolean getDeepCloneOnEdit()
DataBoundComponent
DataSource.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 with DataSourceField.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, using Canvas.setDataPath(java.lang.String)
getDeepCloneOnEdit
in interface DataBoundComponent
public ColumnTree setDeepCloneOnEdit(java.lang.Boolean deepCloneOnEdit)
DataBoundComponent
DataSource.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 with DataSourceField.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, using Canvas.setDataPath(java.lang.String)
setDeepCloneOnEdit
in interface DataBoundComponent
DataBoundComponent
instance, for chaining setter callspublic ColumnTree setFields(com.google.gwt.core.client.JavaScriptObject... fields)
DataBoundComponent
setFields(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.
setFields
in interface DataBoundComponent
fields
- the component fieldsDataBoundComponent
instance, for chaining setter callspublic com.google.gwt.core.client.JavaScriptObject[] getFieldsAsJavaScriptObjects()
DataBoundComponent
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 the DynamicForm
has been
created.getFieldsAsJavaScriptObjects
in interface DataBoundComponent
public int getFieldCount()
DataBoundComponent
getFieldCount
in interface DataBoundComponent
public void transferRecords(Record[] records, Record targetRecord, java.lang.Integer index, Canvas sourceWidget, TransferRecordsCallback callback)
DataBoundComponent
Record
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 as ListGrid
or com.smartgwt.client.widgets.tile.TileGridTileGrid
. Notably, it does not apply to
TreeGrid
; the equivalent for treeGrids is
transferNodes
.
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 the
dropRecords
(the default record drop behavior is simply to call
transferRecords()
, 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()
transferRecords
in interface DataBoundComponent
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 componentpublic ColumnTree setDragDataCustomizer(DragDataCustomizer customizer)
This method is consulted by
willAcceptDrop()
.
DragDataCustomizer
- customizerDataBoundComponent
instance, for chaining setter callspublic SortSpecifier[] getSort()
DataBoundComponent
SortSpecifiers
for
this component. Will return null if this component has never been sorted, or the
underlying SmartClient widget does not exist.getSort
in interface DataBoundComponent
public ColumnTree setSort(SortSpecifier... sortSpecifiers)
DataBoundComponent
Pass in an array of SortSpecifier
s to have the
component's data sorted by the fields in each
specifier.property
and
in the directions specified. The component can be sorted by any combination of fields,
including fields specified in the fields array and
unused 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 a
DataSource
has been set, this will result in data being fetched.
setSort
in interface DataBoundComponent
sortSpecifiers
- Array of SortSpecifier
objectspublic com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.grid.ColumnTreeLogicalStructure s)
LogicalStructure
interface,
which supports Eclipse's logical structure debugging facility.public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
LogicalStructure
interface,
which supports Eclipse's logical structure debugging facility.getLogicalStructure
in interface LogicalStructure
getLogicalStructure
in class Layout