public class DetailViewer extends Canvas implements DataBoundComponent
config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Constructor and Description |
---|
DetailViewer() |
DetailViewer(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. |
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
|
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 |
deselectRecord(int record)
Deselect a
Record passed in explicitly, or by index. |
void |
deselectRecord(Record record)
Deselect a
Record passed in explicitly, or by index. |
void |
deselectRecords(int[] records)
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 |
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.
|
java.lang.String |
emptyMessageHTML()
Return the message to show if the component has no data.
|
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 |
exportClientData()
Exports this component's data with client-side formatters applied, so is suitable for direct display to users.
|
void |
exportClientData(DSRequest requestProperties) |
void |
exportClientData(DSRequest requestProperties,
RPCCallback callback)
Exports this component's data with client-side formatters applied, so is suitable for direct display to users.
|
void |
exportData()
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 |
exportData(DSRequest requestProperties)
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 |
fetchRelatedData(ListGridRecord record,
Canvas schema)
Based on the relationship between the DataSource this component is bound to and the DataSource specified as the "schema"
argument, call fetchData() to retrieve records in this data set that are related to the passed-in record.
|
void |
fetchRelatedData(ListGridRecord record,
Canvas schema,
DSCallback callback) |
void |
fetchRelatedData(ListGridRecord record,
Canvas schema,
DSCallback callback,
DSRequest requestProperties)
Based on the relationship between the DataSource this component is bound to and the DataSource specified as the "schema"
argument, call fetchData() to retrieve records in this data set that are related to the passed-in record.
|
boolean |
fieldIsVisible(java.lang.String field)
Check whether a field is currently visible
|
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. |
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. |
java.lang.String |
getBlockSeparator()
A string (HTML acceptable) that will be written to a page to separate blocks.
|
java.lang.String |
getBlockStyle()
CSS style for each block (one record's worth of data).
|
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 |
getCanPickFields()
If set, right-clicking on the DetailViewer will show a context menu that offers to bring up a
FieldPicker for configuring which fields are displayed and their order. |
java.lang.String |
getCellStyle()
CSS style for a normal value
|
java.lang.String |
getConfigureFieldsText()
The title for the Configure Fields menu item.
|
DetailViewerRecord[] |
getData()
A single record object or an array of them, specifying data.
|
com.google.gwt.core.client.JavaScriptObject |
getDataAsJSList() |
Record[] |
getDataAsRecord()
A single record object or an array of them, specifying data.
|
RecordList |
getDataAsRecordList()
A single record object or an array of them, specifying data.
|
FetchMode |
getDataFetchMode()
DetailViewers do not yet support paging, and will fetch and render all available records.
|
int |
getDataPageSize()
When using
data
paging , how many records to fetch at a time. |
DataSource |
getDataSource()
The DataSource that this component should bind to for default fields and for performing
DataSource requests . |
DateDisplayFormat |
getDateFormatter()
How should Date type values be displayed in this DetailViewer by default?
|
DateDisplayFormat |
getDatetimeFormatter()
Display format to use for fields specified as type 'datetime'.
|
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.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 |
getEditProxyConstructor()
Default class used to construct the
EditProxy for this component when the component is
first placed into edit mode . |
java.lang.String |
getEditSummaryFieldText()
Text for a menu item allowing users to edit the formatter for a field
|
java.lang.String |
getEmptyCellValue()
Text to show for an empty cell
|
java.lang.String |
getEmptyMessage()
The string to display in the body of a detailViewer with no records.
|
java.lang.String |
getEmptyMessageStyle()
CSS style to display this message in
|
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.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.
|
java.lang.String |
getFieldIdProperty()
Name of the field in the DetailViewerRecord which specifies the data property for that record.
|
java.lang.String[] |
getFieldPickerFieldProperties()
Names of properties on
DetailViewerField for which the FieldPicker should show an editing interface, for convenience. |
FieldPickerWindow |
getFieldPickerWindow()
Instance of
FieldPickerWindow used if canPickFields is set. |
DetailViewerField[] |
getFields()
An array of field objects, specifying the order and type of fields to display in this DetailViewer.
|
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 |
getHeaderStyle()
CSS style for a header
|
java.lang.Integer |
getHiliteIconHeight()
Height for hilite icons for this listGrid.
|
int |
getHiliteIconLeftPadding()
How much padding should there be on the left of
hilite icons by default? Can be overridden at the field level |
HiliteIconPosition |
getHiliteIconPosition()
When
hiliteIcons are present, where the hilite
icon will be placed relative to the field value. |
int |
getHiliteIconRightPadding()
How much padding should there be on the right of
hilite icons by default? Can be overridden at the field level |
java.lang.String[] |
getHiliteIcons()
Specifies a list of icons that can be used in
hilites . |
int |
getHiliteIconSize()
Default width and height of
hilite icons for this
component. |
java.lang.Integer |
getHiliteIconWidth()
Width for hilite icons for this component.
|
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 |
getInitialCriteria()
Criteria to use when
DataBoundComponent.setAutoFetchData(Boolean) is used. |
Alignment |
getLabelAlign()
Horizontal alignment of value-labels in this viewer.
|
java.lang.String |
getLabelPrefix()
text to put before a label
|
java.lang.String |
getLabelStyle()
CSS style for a normal detail label
|
java.lang.String |
getLabelSuffix()
text to put after a label
|
java.lang.String |
getLinkTextProperty()
Property name on a record that will hold the link text for that record.
|
java.lang.String |
getLoadingMessage()
The string to display in the body of a detailViewer which is loading records.
|
java.lang.String |
getLoadingMessageStyle()
CSS style to use for the
loadingMessage . |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure()
Getter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
static DetailViewer |
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.String |
getPrintCellStyle()
Optional CSS style for a cell in printable HTML for this component.
|
java.lang.String |
getPrintHeaderStyle()
Optional CSS style for a header in printable HTML for this component.
|
java.lang.String |
getPrintLabelStyle()
Optional CSS style for a label cell in printable HTML for this component.
|
java.lang.Boolean |
getProgressiveLoading()
Indicates whether or not this component will load its data
progressively |
int |
getRecordIndex(Record record)
Get the index of the provided record.
|
RecordList |
getRecordList()
Return the underlying data of this DataBoundComponent as a
RecordList . |
int |
getRecordsPerBlock()
The number of records to display in a block.
|
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 |
getSeparatorStyle()
CSS style for a separator
|
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 |
getShowDetailFields()
Whether to show fields marked
detail:true when a DataBoundComponent is given a DataSource but no
component.fields . |
java.lang.Boolean |
getShowEmptyField()
Whether to show the field when the value is null
|
java.lang.Boolean |
getShowEmptyMessage()
Show
emptyMessage when there is no data to
display? |
java.lang.Boolean |
getShowHiddenFields()
Whether to show fields marked
hidden:true when a DataBoundComponent is given a
DataSource but no component.fields .
|
java.lang.String |
getStyleName()
CSS style for the component as a whole.
|
TimeDisplayFormat |
getTimeFormatter()
Display format to use for fields specified as type 'time'.
|
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. |
Alignment |
getValueAlign()
Horizontal alignment of values in this viewer.
|
java.lang.String |
getViewState()
Returns a snapshot of the current view state of this DetailViewer.
This includes the field, sort and hilite state of the grid, returned as a DetailViewerViewState object.This object can be passed to setViewState() to reset this detail viewer's view
state to the current state (assuming the same data / fields are present in the detail viewer). |
java.lang.Boolean |
getWrapLabel()
Should the label be allowed to wrap, or be fixed to one line no matter how long
|
java.lang.Boolean |
getWrapValues()
Whether values should be allowed to wrap by default, or should be shown on one line regardless of length.
|
void |
invalidateCache()
Invalidate the current data cache for this databound component via a call to the dataset's
invalidateCache() method, for example,
ResultSet.invalidateCache() . |
boolean |
isExportingClientData()
Returns true if this component is currently
exporting client data . |
void |
selectAllRecords()
Select all records
|
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(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 |
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(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 |
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.
|
void |
setAddFormulaFieldText(java.lang.String addFormulaFieldText)
Text for a menu item allowing users to add a formula field
|
void |
setAddOperation(java.lang.String addOperation)
operationId this component
should use when performing add operations. |
void |
setAddSummaryFieldText(java.lang.String addSummaryFieldText)
Text for a menu item allowing users to add a formula field
|
void |
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() |
void |
setAutoFetchData(java.lang.Boolean autoFetchData)
If true, when this component is first drawn, automatically call
DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on
DataBoundComponent.getAutoFetchAsFilter() . |
void |
setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle)
If
autoFetchData is true , this attribute allows the developer to specify a textMatchStyle
for the initial DataBoundComponent.fetchData() call. |
void |
setBlockSeparator(java.lang.String blockSeparator)
A string (HTML acceptable) that will be written to a page to separate blocks.
|
void |
setBlockStyle(java.lang.String blockStyle)
CSS style for each block (one record's worth of data).
|
void |
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 .
|
void |
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 .
|
void |
setCanPickFields(java.lang.Boolean canPickFields)
If set, right-clicking on the DetailViewer will show a context menu that offers to bring up a
FieldPicker for configuring which fields are displayed and their order. |
void |
setCellStyle(java.lang.String cellStyle)
CSS style for a normal value
|
void |
setConfigureFieldsText(java.lang.String configureFieldsText)
The title for the Configure Fields menu item.
|
void |
setData(DetailViewerRecord[] data)
A single record object or an array of them, specifying data.
|
void |
setData(Record[] data)
A single record object or an array of them, specifying data.
|
void |
setData(RecordList data)
A single record object or an array of them, specifying data.
|
void |
setDataFetchMode(FetchMode dataFetchMode)
DetailViewers do not yet support paging, and will fetch and render all available records.
|
void |
setDataPageSize(int dataPageSize)
When using
data
paging , how many records to fetch at a time. |
void |
setDataSource(DataSource dataSource)
The DataSource that this component should bind to for default fields and for performing
DataSource requests . |
void |
setDataSource(DataSource dataSource,
DetailViewerField... fields)
Bind to a DataSource.
|
void |
setDataSource(java.lang.String dataSource)
The DataSource that this component should bind to for default fields and for performing
DataSource requests . |
void |
setDateFormatter(DateDisplayFormat dateFormatter)
How should Date type values be displayed in this DetailViewer by default?
|
void |
setDatetimeFormatter(DateDisplayFormat datetimeFormatter)
Display format to use for fields specified as type 'datetime'.
|
void |
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(DetailViewer detailViewerProperties)
Class level method to set the default properties of this class.
|
void |
setDragDataAction(DragDataAction dragDataAction)
Indicates what to do with data dragged into another DataBoundComponent.
|
void |
setDragTrackerStyle(java.lang.String dragTrackerStyle)
CSS Style to apply to the drag tracker when dragging occurs on this component.
|
void |
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. |
void |
setDuplicateDragMessage(java.lang.String duplicateDragMessage)
Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled. |
void |
setEditFormulaFieldText(java.lang.String editFormulaFieldText)
Text for a menu item allowing users to edit a formula field
|
void |
setEditProxyConstructor(java.lang.String editProxyConstructor)
Default class used to construct the
EditProxy for this component when the component is
first placed into edit mode . |
void |
setEditSummaryFieldText(java.lang.String editSummaryFieldText)
Text for a menu item allowing users to edit the formatter for a field
|
void |
setEmptyCellValue(java.lang.String emptyCellValue)
Text to show for an empty cell
|
void |
setEmptyMessage(java.lang.String emptyMessage)
The string to display in the body of a detailViewer with no records.
|
void |
setEmptyMessageStyle(java.lang.String emptyMessageStyle)
CSS style to display this message in
|
void |
setExportAll(java.lang.Boolean exportAll)
Setting exportAll to true prevents the component from passing its list of fields to the
export call.
|
void |
setExportFields(java.lang.String[] exportFields)
The list of field-names to export.
|
void |
setFetchOperation(java.lang.String fetchOperation)
Operation ID this component should use when performing fetch operations.
|
void |
setFieldIdProperty(java.lang.String fieldIdProperty)
Name of the field in the DetailViewerRecord which specifies the data property for that record.
|
void |
setFieldPickerFieldProperties(java.lang.String... fieldPickerFieldProperties)
Names of properties on
DetailViewerField for which the FieldPicker should show an editing interface, for convenience. |
void |
setFields(DetailViewerField... fields)
An array of field objects, specifying the order and type of fields to display in this DetailViewer.
|
void |
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. |
void |
setHeaderStyle(java.lang.String headerStyle)
CSS style for a header
|
void |
setHiliteIconHeight(java.lang.Integer hiliteIconHeight)
Height for hilite icons for this listGrid.
|
void |
setHiliteIconLeftPadding(int hiliteIconLeftPadding)
How much padding should there be on the left of
hilite icons by default? Can be overridden at the field level |
void |
setHiliteIconPosition(HiliteIconPosition hiliteIconPosition)
When
hiliteIcons are present, where the hilite
icon will be placed relative to the field value. |
void |
setHiliteIconRightPadding(int hiliteIconRightPadding)
How much padding should there be on the right of
hilite icons by default? Can be overridden at the field level |
void |
setHiliteIcons(java.lang.String... hiliteIcons)
Specifies a list of icons that can be used in
hilites . |
void |
setHiliteIconSize(int hiliteIconSize)
Default width and height of
hilite icons for this
component. |
void |
setHiliteIconWidth(java.lang.Integer hiliteIconWidth)
Width for hilite icons for this component.
|
void |
setHiliteProperty(java.lang.String hiliteProperty)
Marker that can be set on a record to flag that record as hilited.
|
void |
setHilites(Hilite[] hilites)
Accepts an array of hilite objects and applies them to this DataBoundComponent.
|
void |
setHiliteState(java.lang.String hiliteState)
Set the current hilites based on a hiliteState String previously returned from getHilitesState.
|
void |
setInitialCriteria(Criteria initialCriteria)
Criteria to use when
DataBoundComponent.setAutoFetchData(Boolean) is used. |
void |
setLabelAlign(Alignment labelAlign)
Horizontal alignment of value-labels in this viewer.
|
void |
setLabelPrefix(java.lang.String labelPrefix)
text to put before a label
|
void |
setLabelStyle(java.lang.String labelStyle)
CSS style for a normal detail label
|
void |
setLabelSuffix(java.lang.String labelSuffix)
text to put after a label
|
void |
setLinkTextProperty(java.lang.String linkTextProperty)
Property name on a record that will hold the link text for that record.
|
void |
setLoadingMessage(java.lang.String loadingMessage)
The string to display in the body of a detailViewer which is loading records.
|
void |
setLoadingMessageStyle(java.lang.String loadingMessageStyle)
CSS style to use for the
loadingMessage . |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.viewer.DetailViewerLogicalStructure s)
Setter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
void |
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) . |
void |
setPrintCellStyle(java.lang.String printCellStyle)
Optional CSS style for a cell in printable HTML for this component.
|
void |
setPrintHeaderStyle(java.lang.String printHeaderStyle)
Optional CSS style for a header in printable HTML for this component.
|
void |
setPrintLabelStyle(java.lang.String printLabelStyle)
Optional CSS style for a label cell in printable HTML for this component.
|
void |
setProgressiveLoading(java.lang.Boolean progressiveLoading)
Indicates whether or not this component will load its data
progressively |
void |
setRecordsPerBlock(int recordsPerBlock)
The number of records to display in a block.
|
void |
setRemoveOperation(java.lang.String removeOperation)
operationId this component
should use when performing remove operations. |
void |
setSeparatorStyle(java.lang.String separatorStyle)
CSS style for a separator
|
void |
setShowComplexFields(java.lang.Boolean showComplexFields)
Whether to show fields of non-atomic types when a DataBoundComponent is given a
DataSource but no
component.fields .
|
void |
setShowDetailFields(java.lang.Boolean showDetailFields)
Whether to show fields marked
detail:true when a DataBoundComponent is given a DataSource but no
component.fields . |
void |
setShowEmptyField(java.lang.Boolean showEmptyField)
Whether to show the field when the value is null
|
void |
setShowEmptyMessage(java.lang.Boolean showEmptyMessage)
Show
emptyMessage when there is no data to
display? |
void |
setShowHiddenFields(java.lang.Boolean showHiddenFields)
Whether to show fields marked
hidden:true when a DataBoundComponent is given a
DataSource but no component.fields .
|
void |
setStyleName(java.lang.String styleName)
CSS style for the component as a whole.
|
void |
setTimeFormatter(TimeDisplayFormat timeFormatter)
Display format to use for fields specified as type 'time'.
|
void |
setTitleField(java.lang.String titleField)
Sets the best field to use for a user-visible title for an individual record from this component.
|
void |
setUpdateOperation(java.lang.String updateOperation)
operationId this component
should use when performing update operations. |
void |
setUseAllDataSourceFields(boolean useAllDataSourceFields)
If true, the set of fields given by the "default binding" (see 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.
|
void |
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.
|
void |
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 |
setValueAlign(Alignment valueAlign)
Horizontal alignment of values in this viewer.
|
void |
setViewState(java.lang.String viewState)
Reset this detail viewer's view state to match the
DetailViewerViewState object passed
in.Used to restore previous state retrieved from the detail viewer by a call to getViewState() . |
void |
setWrapLabel(java.lang.Boolean wrapLabel)
Should the label be allowed to wrap, or be fixed to one line no matter how long
|
void |
setWrapValues(java.lang.Boolean wrapValues)
Whether values should be allowed to wrap by default, or should be shown on one line regardless of length.
|
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.
|
void |
viewSelectedData(ListGrid selectionComponent)
Displays the currently selected record(s) of the ListGrid in the detailViewer.
|
void |
viewSelectedData(java.lang.String selectionComponentID)
Displays the currently selected record(s) of the ListGrid in the detailViewer.
|
addChild, addChild, addChild, addChild, addChild, 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, addScrolledHandler, addShowContextMenuHandler, addSnapAlignCandidate, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, 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, asSGWTComponent, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, deparent, depeer, disable, enable, encloses, focus, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoDraw, getAutoMaskComponents, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenResizeSnapAlign, getChildrenSnapAlign, getChildrenSnapCenterAlign, getChildrenSnapEdgeAlign, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getElement, getElement, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFormItemAutoChild, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeavePageSpace, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPanelContainer, getParentCanvas, getParentElement, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSkinImgDir, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getTabIndex, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUseBackMask, getUseDragMask, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, onInit, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, printComponents, provideRuleContext, redraw, redraw, removeChild, removeChild, removePeer, removePeer, removeSnapAlignCandidate, resizeBy, resizeTo, resizeTo, revealChild, revealChild, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAllowExternalFilters, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoDraw, setAutoHeight, setAutoMaskComponents, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenResizeSnapAlign, setChildrenSnapAlign, setChildrenSnapCenterAlign, setChildrenSnapEdgeAlign, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setElement, setExtraSpace, setFacetId, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeavePageSpace, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setParentCanvas, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setScrollbarConstructor, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSkinImgDir, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseBackMask, setUseDragMask, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateEditNode, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
addDrawHandler, applyFactoryProperties, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, 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, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, 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 DetailViewer()
public DetailViewer(com.google.gwt.core.client.JavaScriptObject jsObj)
public static DetailViewer 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 void setBlockSeparator(java.lang.String blockSeparator)
blockSeparator
- See HTMLString
. Default value is "<br><br>"Appearance overview and related methods
public java.lang.String getBlockSeparator()
HTMLString
Appearance overview and related methods
public void setBlockStyle(java.lang.String blockStyle)
blockStyle
- See CSSStyleName
. Default value is "detailBlock"Appearance overview and related methods
public java.lang.String getBlockStyle()
CSSStyleName
Appearance overview and related methods
public void setCanPickFields(java.lang.Boolean canPickFields) throws java.lang.IllegalStateException
FieldPicker
for configuring which fields are displayed and their order.canPickFields
- Default value is falsejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getCanPickFields()
FieldPicker
for configuring which fields are displayed and their order.public void setCellStyle(java.lang.String cellStyle)
cellStyle
- See CSSStyleName
. Default value is "detail"Appearance overview and related methods
public java.lang.String getCellStyle()
getCellStyle()
on the field if defined, otherwise
returns this.cellStyle
See CSSStyleName
Appearance overview and related methods
public void setConfigureFieldsText(java.lang.String configureFieldsText) throws java.lang.IllegalStateException
configureFieldsText
- Default value is "Configure Fields..."java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getConfigureFieldsText()
public void setData(DetailViewerRecord[] data)
data
- new data to be displayed. Default value is nullBasics overview and related methods
public DetailViewerRecord[] getData()
Basics overview and related methods
public void setData(Record[] data)
data
- new data to be displayed. Default value is nullBasics overview and related methods
public Record[] getDataAsRecord()
Basics overview and related methods
public void setData(RecordList data)
data
- new data to be displayed. Default value is nullBasics overview and related methods
public RecordList getDataAsRecordList()
Basics overview and related methods
public void setDataFetchMode(FetchMode dataFetchMode)
setDataFetchMode
in interface DataBoundComponent
dataFetchMode
- Default value is "basic"Databinding overview and related methods
public FetchMode getDataFetchMode()
getDataFetchMode
in interface DataBoundComponent
Databinding overview and related methods
public void 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
- Default value is nullDatabinding overview and related methods
,
DataSource fields Examplepublic void 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
- Default value is nullDatabinding overview and related methods
,
DataSource fields Examplepublic void setDateFormatter(DateDisplayFormat dateFormatter)
This property specifies the default
DateDisplayFormat to apply to Date values displayed in this grid for all fields except those of type "time"
(See also timeFormatter
).
If datetimeFormatter
is specified, that will be
applied by default to fields of type "datetime"
.
Note that if DetailViewerField.dateFormatter
or DetailViewerField.timeFormatter
are specified
those properties will take precedence over the component level settings.
If unset, date values will be formatted
according to the system wide normal display format
.
dateFormatter
- Default value is nullpublic DateDisplayFormat getDateFormatter()
This property specifies the default
DateDisplayFormat to apply to Date values displayed in this grid for all fields except those of type "time"
(See also timeFormatter
).
If datetimeFormatter
is specified, that will be
applied by default to fields of type "datetime"
.
Note that if DetailViewerField.dateFormatter
or DetailViewerField.timeFormatter
are specified
those properties will take precedence over the component level settings.
If unset, date values will be formatted
according to the system wide normal display format
.
public void setDatetimeFormatter(DateDisplayFormat datetimeFormatter)
Date.setNormalDatetimeDisplayFormat()
. Specify any valid DateDisplayFormat
to change
the display format for datetimes used by this viewer. May also be specified at the field level via DetailViewerField.dateFormatter
datetimeFormatter
- Default value is nullListGridField.setDateFormatter(com.smartgwt.client.types.DateDisplayFormat)
,
Appearance overview and related methods
public DateDisplayFormat getDatetimeFormatter()
Date.setNormalDatetimeDisplayFormat()
. Specify any valid DateDisplayFormat
to change
the display format for datetimes used by this viewer. May also be specified at the field level via DetailViewerField.dateFormatter
ListGridField.getDateFormatter()
,
Appearance overview and related methods
public void setEditProxyConstructor(java.lang.String editProxyConstructor) throws java.lang.IllegalStateException
EditProxy
for this component when the component is
first placed into edit mode
.setEditProxyConstructor
in class Canvas
editProxyConstructor
- See SCClassName
. Default value is "DetailViewerEditProxy"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getEditProxyConstructor()
EditProxy
for this component when the component is
first placed into edit mode
.getEditProxyConstructor
in class Canvas
SCClassName
public void setEmptyCellValue(java.lang.String emptyCellValue)
Note : This is an advanced setting
emptyCellValue
- See HTMLString
. Default value is " "Appearance overview and related methods
public java.lang.String getEmptyCellValue()
HTMLString
Appearance overview and related methods
public void setEmptyMessage(java.lang.String emptyMessage)
emptyMessage
- See HTMLString
. Default value is "No items to display."public java.lang.String getEmptyMessage()
HTMLString
public void setEmptyMessageStyle(java.lang.String emptyMessageStyle)
Note : This is an advanced setting
emptyMessageStyle
- See CSSStyleName
. Default value is "normal"public java.lang.String getEmptyMessageStyle()
CSSStyleName
public void setFieldIdProperty(java.lang.String fieldIdProperty)
Note : This is an advanced setting
fieldIdProperty
- Default value is "name"public java.lang.String getFieldIdProperty()
public void setFieldPickerFieldProperties(java.lang.String... fieldPickerFieldProperties) throws java.lang.IllegalStateException
DetailViewerField
for which the FieldPicker
should show an editing interface, for convenience. For example, specify
["decimalPad", "decimalPrecision"] to allow end users to modify DetailViewerField.decimalPad
and DetailViewerField.decimalPrecision
respectively.
fieldPickerFieldProperties
- Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String[] getFieldPickerFieldProperties()
DetailViewerField
for which the FieldPicker
should show an editing interface, for convenience. For example, specify
["decimalPad", "decimalPrecision"] to allow end users to modify DetailViewerField.decimalPad
and DetailViewerField.decimalPrecision
respectively.
public FieldPickerWindow getFieldPickerWindow() throws java.lang.IllegalStateException
FieldPickerWindow
used if canPickFields
is set.
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 void setFields(DetailViewerField... fields)
fields
- Default value is nullpublic DetailViewerField[] getFields()
public void setHeaderStyle(java.lang.String headerStyle)
headerStyle
- See CSSStyleName
. Default value is "detailHeader"Appearance overview and related methods
public java.lang.String getHeaderStyle()
CSSStyleName
Appearance overview and related methods
public void setHiliteIconHeight(java.lang.Integer hiliteIconHeight)
hiliteIconSize
. Can be overridden at the field levelhiliteIconHeight
- Default value is nullHiliting overview and related methods
public java.lang.Integer getHiliteIconHeight()
hiliteIconSize
. Can be overridden at the field levelHiliting overview and related methods
public void setHiliteIconLeftPadding(int hiliteIconLeftPadding)
hilite icons
by default? Can be overridden at the field levelhiliteIconLeftPadding
- Default value is 2Hiliting overview and related methods
public int getHiliteIconLeftPadding()
hilite icons
by default? Can be overridden at the field levelHiliting overview and related methods
public void setHiliteIconPosition(HiliteIconPosition hiliteIconPosition) throws java.lang.IllegalStateException
hiliteIcons
are present, where the hilite
icon will be placed relative to the field value. See HiliteIconPosition
. Can be
overridden at the field level.hiliteIconPosition
- Default value is "before"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdHiliting overview and related methods
public HiliteIconPosition getHiliteIconPosition()
hiliteIcons
are present, where the hilite
icon will be placed relative to the field value. See HiliteIconPosition
. Can be
overridden at the field level.Hiliting overview and related methods
public void setHiliteIconRightPadding(int hiliteIconRightPadding)
hilite icons
by default? Can be overridden at the field levelhiliteIconRightPadding
- Default value is 2Hiliting overview and related methods
public int getHiliteIconRightPadding()
hilite icons
by default? Can be overridden at the field levelHiliting overview and related methods
public void setHiliteIcons(java.lang.String... hiliteIcons) throws java.lang.IllegalStateException
hilites
. hiliteIcons
should be specified as an Array of SCImgURL
.
When present, the hilite editing interface shown when DataBoundComponent.editHilites()
is called will offer the user a drop down for picking one of these icons when
defining either a simple or advanced hilite rule.
If the user picks an icon, the created hiliting rule will have
Hilite.icon
set to the chosen icon. DataBoundComponent.hiliteIconPosition
controls
where the icon will appear for that field -- the default is that it appears in front of the normal cell content. This
can also be overridden at the field level.
hiliteIcons
- Default value is ["[SKINIMG]/Dialog/notify.png", "[SKINIMG]/Dialog/warn.png", "[SKINIMG]/actions/approve.png"]java.lang.IllegalStateException
- this property cannot be changed after the component has been createdHiliting overview and related methods
public java.lang.String[] getHiliteIcons()
hilites
. hiliteIcons
should be specified as an Array of SCImgURL
.
When present, the hilite editing interface shown when DataBoundComponent.editHilites()
is called will offer the user a drop down for picking one of these icons when
defining either a simple or advanced hilite rule.
If the user picks an icon, the created hiliting rule will have
Hilite.icon
set to the chosen icon. DataBoundComponent.hiliteIconPosition
controls
where the icon will appear for that field -- the default is that it appears in front of the normal cell content. This
can also be overridden at the field level.
Hiliting overview and related methods
public void setHiliteIconSize(int hiliteIconSize)
hilite icons
for this
component. Can be overridden at the component level via explicit hiliteIconWidth
and hiliteIconHeight
, or at the field level via hiliteIconSize
, hiliteIconWidth
and hiliteIconHeight
hiliteIconSize
- Default value is 12setHiliteIconWidth(java.lang.Integer)
,
setHiliteIconHeight(java.lang.Integer)
,
DetailViewerField.setHiliteIconSize(java.lang.Integer)
,
Hiliting overview and related methods
public int getHiliteIconSize()
hilite icons
for this
component. Can be overridden at the component level via explicit hiliteIconWidth
and hiliteIconHeight
, or at the field level via hiliteIconSize
, hiliteIconWidth
and hiliteIconHeight
getHiliteIconWidth()
,
getHiliteIconHeight()
,
DetailViewerField.getHiliteIconSize()
,
Hiliting overview and related methods
public void setHiliteIconWidth(java.lang.Integer hiliteIconWidth)
hiliteIconSize
. Can be overridden at the field level.hiliteIconWidth
- Default value is nullHiliting overview and related methods
public java.lang.Integer getHiliteIconWidth()
hiliteIconSize
. Can be overridden at the field level.Hiliting overview and related methods
public void setLabelAlign(Alignment labelAlign)
"left"
when in RTL mode
and "right"
otherwise.labelAlign
- Default value is nullpublic Alignment getLabelAlign()
"left"
when in RTL mode
and "right"
otherwise.public void setLabelPrefix(java.lang.String labelPrefix)
labelPrefix
- See HTMLString
. Default value is ""public java.lang.String getLabelPrefix()
HTMLString
public void setLabelStyle(java.lang.String labelStyle)
labelStyle
- See CSSStyleName
. Default value is "detailLabel"Appearance overview and related methods
public java.lang.String getLabelStyle()
CSSStyleName
Appearance overview and related methods
public void setLabelSuffix(java.lang.String labelSuffix)
labelSuffix
- See HTMLString
. Default value is ":"public java.lang.String getLabelSuffix()
HTMLString
public void setLinkTextProperty(java.lang.String linkTextProperty)
This property is configurable to avoid possible collision with data values in the record.
Use DetailViewerField.linkTextProperty
if you have
more than one link field and the fields' records do not use the same property to store the linkText.
linkTextProperty
- Default value is "linkText"DetailViewerField.setLinkText(java.lang.String)
,
DetailViewerField.setLinkTextProperty(java.lang.String)
public java.lang.String getLinkTextProperty()
This property is configurable to avoid possible collision with data values in the record.
Use DetailViewerField.linkTextProperty
if you have
more than one link field and the fields' records do not use the same property to store the linkText.
DetailViewerField.getLinkText()
,
DetailViewerField.getLinkTextProperty()
public void setLoadingMessage(java.lang.String loadingMessage)
"${loadingImage}"
to
include a loading image
.loadingMessage
- See HTMLString
. Default value is " ${loadingImage}"public java.lang.String getLoadingMessage()
"${loadingImage}"
to
include a loading image
.HTMLString
public void setLoadingMessageStyle(java.lang.String loadingMessageStyle)
loadingMessage
.
Note : This is an advanced setting
loadingMessageStyle
- See CSSStyleName
. Default value is "normal"public java.lang.String getLoadingMessageStyle()
loadingMessage
.CSSStyleName
public void setPrintCellStyle(java.lang.String printCellStyle)
cellStyle
will be used for printing as well as normal
presentation.printCellStyle
- See CSSStyleName
. Default value is nullPrinting overview and related methods
public java.lang.String getPrintCellStyle()
cellStyle
will be used for printing as well as normal
presentation.CSSStyleName
Printing overview and related methods
public void setPrintHeaderStyle(java.lang.String printHeaderStyle)
headerStyle
will be used for printing as well as normal
presentation.printHeaderStyle
- See CSSStyleName
. Default value is nullPrinting overview and related methods
public java.lang.String getPrintHeaderStyle()
headerStyle
will be used for printing as well as normal
presentation.CSSStyleName
Printing overview and related methods
public void setPrintLabelStyle(java.lang.String printLabelStyle)
labelStyle
will be used for printing as well as normal
presentation.printLabelStyle
- See CSSStyleName
. Default value is nullPrinting overview and related methods
public java.lang.String getPrintLabelStyle()
labelStyle
will be used for printing as well as normal
presentation.CSSStyleName
Printing overview and related methods
public void setRecordsPerBlock(int recordsPerBlock)
recordsPerBlock
- Default value is 1Appearance overview and related methods
public int getRecordsPerBlock()
Appearance overview and related methods
public void setSeparatorStyle(java.lang.String separatorStyle)
separatorStyle
- See CSSStyleName
. Default value is "detail"Appearance overview and related methods
public java.lang.String getSeparatorStyle()
CSSStyleName
Appearance overview and related methods
public void 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
- Default value is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDatabinding overview and related methods
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 overview and related methods
public void setShowEmptyField(java.lang.Boolean showEmptyField)
Note : This is an advanced setting
showEmptyField
- Default value is trueAppearance overview and related methods
public java.lang.Boolean getShowEmptyField()
Appearance overview and related methods
public void setShowEmptyMessage(java.lang.Boolean showEmptyMessage)
emptyMessage
when there is no data to
display?
Note : This is an advanced setting
showEmptyMessage
- Default value is truesetEmptyMessage(java.lang.String)
public java.lang.Boolean getShowEmptyMessage()
emptyMessage
when there is no data to
display?getEmptyMessage()
public void setStyleName(java.lang.String styleName)
setStyleName
in class Canvas
styleName
- See CSSStyleName
. Default value is "detailViewer"Appearance overview and related methods
public java.lang.String getStyleName()
getStyleName
in class Canvas
CSSStyleName
Appearance overview and related methods
public void setTimeFormatter(TimeDisplayFormat timeFormatter)
DetailViewerField.timeFormatter
.timeFormatter
- Default value is nullAppearance overview and related methods
public TimeDisplayFormat getTimeFormatter()
DetailViewerField.timeFormatter
.Appearance overview and related methods
public void setValueAlign(Alignment valueAlign)
"right"
when in RTL mode and
"left"
otherwise.valueAlign
- Default value is nullpublic Alignment getValueAlign()
"right"
when in RTL mode and
"left"
otherwise.public void setWrapLabel(java.lang.Boolean wrapLabel)
wrapLabel
- Default value is falsepublic java.lang.Boolean getWrapLabel()
public void setWrapValues(java.lang.Boolean wrapValues) throws java.lang.IllegalStateException
wrapValues
- Default value is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getWrapValues()
public java.lang.String emptyMessageHTML()
emptyMessage
or " " if showEmptyMessage is
false. If the component has no data because the browser is offline, we instead display the DataBoundComponent.offlineMessage
or " " if
showOfflineMessage is falsepublic void exportClientData()
ListGrid.exportClientData()
for details of the
general requirements and restrictions when exporting client data. The following notes apply when exporting client data from DetailViewers:
If your detailViewer has custom formatters, formatted values will be exported by default, with HTML normalized to text where possible. Since some levels of HTML normalizing aren't possible, this may result in missing or incorrect export values. In this case, you have two possible approaches:
exportRawValues
on the field. This will export
the raw underlying value of the field; your formatter will not be calledisExportingClientData()
and perform whatever
alternative formatting you require if that method returns trueListGrid.exportClientData()
public void exportClientData(DSRequest requestProperties)
exportClientData()
public void exportClientData(DSRequest requestProperties, RPCCallback callback)
ListGrid.exportClientData()
for details of the
general requirements and restrictions when exporting client data. The following notes apply when exporting client data from DetailViewers:
If your detailViewer has custom formatters, formatted values will be exported by default, with HTML normalized to text where possible. Since some levels of HTML normalizing aren't possible, this may result in missing or incorrect export values. In this case, you have two possible approaches:
exportRawValues
on the field. This will export
the raw underlying value of the field; your formatter will not be calledisExportingClientData()
and perform whatever
alternative formatting you require if that method returns truerequestProperties
- Request properties for the export. Note that specifying exportData
on the request properties allows the developer to pass in an explicit data set to export.callback
- Optional callback. If you specify exportToClient
: false
in the request properties, this callback will fire after export completes. Otherwise the callback will fire right
before the download request is made to the server.ListGrid.exportClientData()
public void fetchRelatedData(ListGridRecord record, Canvas schema)
Relationships between DataSources are declared via DataSourceField.foreignKey
.
For example, given two related DataSources "orders" and "orderItems", where we want to
fetch the "orderItems" that belong to a given "order". "orderItems" should declare a field that is a foreignKey
to the "orders" table (for example, it might be named
"orderId" with foreignKey="orders.id"). Then, to load the records related to a given "order", call fetchRelatedData()
on the component bound to "orderItems", pass the "orders" DataSource as the "schema" and pass a record from the "orders"
DataSource as the "record" argument.
Note: When you expect a large number of records to be returned it is not
recommended to display these in the DetailViewer as it doesn't have the same level of support for large datasets as the
ListGrid
.
record
- DataSource recordschema
- schema of the DataSource record, or DataBoundComponent already bound to that schemaDataBoundComponentMethods overview and related methods
public void fetchRelatedData(ListGridRecord record, Canvas schema, DSCallback callback)
public void fetchRelatedData(ListGridRecord record, Canvas schema, DSCallback callback, DSRequest requestProperties)
Relationships between DataSources are declared via DataSourceField.foreignKey
.
For example, given two related DataSources "orders" and "orderItems", where we want to
fetch the "orderItems" that belong to a given "order". "orderItems" should declare a field that is a foreignKey
to the "orders" table (for example, it might be named
"orderId" with foreignKey="orders.id"). Then, to load the records related to a given "order", call fetchRelatedData()
on the component bound to "orderItems", pass the "orders" DataSource as the "schema" and pass a record from the "orders"
DataSource as the "record" argument.
Note: When you expect a large number of records to be returned it is not
recommended to display these in the DetailViewer as it doesn't have the same level of support for large datasets as the
ListGrid
.
record
- DataSource recordschema
- schema of the DataSource record, or DataBoundComponent already bound to that schemacallback
- callback to invoke on completionrequestProperties
- additional properties to set on the DSRequest that will be issuedDataBoundComponentMethods overview and related methods
public boolean fieldIsVisible(java.lang.String field)
field
- field to be checkedpublic java.lang.String getViewState()
DetailViewerViewState
object.setViewState()
to reset this detail viewer's view
state to the current state (assuming the same data / fields are present in the detail viewer).DetailViewerViewState
,
setViewState(java.lang.String)
public boolean isExportingClientData()
exporting client data
. This method can be called from custom cell formatters if you need to return a different
formatted value for an export than for a live detailViewerListGrid.exportClientData()
public void setViewState(java.lang.String viewState)
DetailViewerViewState
object passed
in.getViewState()
.viewState
- Object describing the desired view state for the detail viewer. See DetailViewerViewState
getViewState()
public static void setDefaultProperties(DetailViewer detailViewerProperties)
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.
detailViewerProperties
- properties that should be used as new defaults when instances of this class are createdSGWTProperties
public void setUseAllDataSourceFields(boolean useAllDataSourceFields)
useAllDataSourceFields
- useAllDataSourceFieldspublic void viewSelectedData(ListGrid selectionComponent)
selectionComponent
- the ListGrid whose currently selected record(s) is/are to be editedpublic void viewSelectedData(java.lang.String selectionComponentID)
selectionComponentID
- the ID of a ListGrid whose currently selected record(s) is/are to be editedpublic void setDataSource(DataSource dataSource, DetailViewerField... 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 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 0Databinding 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 void 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 falsepublic 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 void 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 falsepublic 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 void 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 truepublic 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 void setFetchOperation(java.lang.String fetchOperation)
DataBoundComponent
setFetchOperation
in interface DataBoundComponent
fetchOperation
- fetchOperation Default value is nullpublic java.lang.String getFetchOperation()
DataBoundComponent
getFetchOperation
in interface DataBoundComponent
public void setUpdateOperation(java.lang.String updateOperation)
DataBoundComponent
operationId
this component
should use when performing update operations.setUpdateOperation
in interface DataBoundComponent
updateOperation
- Default value is nullOperations 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 void setAddOperation(java.lang.String addOperation)
DataBoundComponent
operationId
this component
should use when performing add operations.setAddOperation
in interface DataBoundComponent
addOperation
- Default value is nullOperations 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 void setRemoveOperation(java.lang.String removeOperation)
DataBoundComponent
operationId
this component
should use when performing remove operations.setRemoveOperation
in interface DataBoundComponent
removeOperation
- Default value is nullOperations 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 void 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 nullpublic 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 void 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 falsepublic 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 void 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 nulljava.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 void 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"java.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 void 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 truepublic 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 void 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 nullpublic 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 void setProgressiveLoading(java.lang.Boolean progressiveLoading)
progressively
progressiveLoading
- ProgressiveLoading
,
DataSource.setProgressiveLoading(java.lang.Boolean)
public java.lang.Boolean getProgressiveLoading()
progressively
ProgressiveLoading
,
DataSource.getProgressiveLoading()
public void 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 nulljava.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 void setHiliteProperty(java.lang.String hiliteProperty)
DataBoundComponent
id
for a hilite defined on this component.setHiliteProperty
in interface DataBoundComponent
hiliteProperty
- hiliteProperty Default value is "_hilite"public java.lang.String getHiliteProperty()
DataBoundComponent
id
for a hilite defined on this component.getHiliteProperty
in interface DataBoundComponent
public void editFields()
public void editHilites()
editHilites
in interface DataBoundComponent
public java.lang.String getHiliteState()
getHiliteState
in interface DataBoundComponent
public void setHiliteState(java.lang.String hiliteState)
setHiliteState
in interface DataBoundComponent
hiliteState
- hilites state encoded as a Stringpublic void setHilites(Hilite[] hilites)
getHilites
for a method of
retrieving the hilite array for storage, including hilites manually added by the user.setHilites
in interface DataBoundComponent
hilites
- array of hilite objectspublic Hilite[] getHilites()
getHilites
in interface DataBoundComponent
public void setDragDataAction(DragDataAction dragDataAction)
DataBoundComponent
setDragDataAction
in interface DataBoundComponent
dragDataAction
- dragDataAction Default value is Canvas.MOVEpublic DragDataAction getDragDataAction()
DataBoundComponent
getDragDataAction
in interface DataBoundComponent
public void setDragTrackerStyle(java.lang.String dragTrackerStyle)
DataBoundComponent
setDragTrackerStyle
in interface DataBoundComponent
dragTrackerStyle
- dragTrackerStyle Default value is "gridDragTracker"public java.lang.String getDragTrackerStyle()
DataBoundComponent
getDragTrackerStyle
in interface DataBoundComponent
public void 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 falsepublic 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 void setAddFormulaFieldText(java.lang.String addFormulaFieldText)
DataBoundComponent
setAddFormulaFieldText
in interface DataBoundComponent
addFormulaFieldText
- addFormulaFieldText Default value is "Add formula column..."public java.lang.String getAddFormulaFieldText()
DataBoundComponent
getAddFormulaFieldText
in interface DataBoundComponent
public void setEditFormulaFieldText(java.lang.String editFormulaFieldText)
DataBoundComponent
setEditFormulaFieldText
in interface DataBoundComponent
editFormulaFieldText
- editFormulaFieldText Default value is "Edit formula..."public java.lang.String getEditFormulaFieldText()
DataBoundComponent
getEditFormulaFieldText
in interface DataBoundComponent
public void 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 falsepublic 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 void setAddSummaryFieldText(java.lang.String addSummaryFieldText)
DataBoundComponent
setAddSummaryFieldText
in interface DataBoundComponent
addSummaryFieldText
- addSummaryFieldText Default value is "Add summary column..."public java.lang.String getAddSummaryFieldText()
DataBoundComponent
getAddSummaryFieldText
in interface DataBoundComponent
public void setEditSummaryFieldText(java.lang.String editSummaryFieldText)
DataBoundComponent
setEditSummaryFieldText
in interface DataBoundComponent
editSummaryFieldText
- editSummaryFieldText Default value is "Edit summary format..."public java.lang.String getEditSummaryFieldText()
DataBoundComponent
getEditSummaryFieldText
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 void setTitleField(java.lang.String titleField)
DataBoundComponent
setTitleField
in interface DataBoundComponent
public 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 void 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
- autoFetchDatajava.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 void 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
java.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 void 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
- autoFetchAsFilterjava.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 void setInitialCriteria(Criteria initialCriteria) throws java.lang.IllegalStateException
DataBoundComponent
DataBoundComponent.setAutoFetchData(Boolean)
is used.setInitialCriteria
in interface DataBoundComponent
initialCriteria
- the initial criteriajava.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 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
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
DataBoundComponentMethods overview and related methods
public void exportData(DSRequest requestProperties)
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 the DSRequest that will be issuedDataBoundComponentMethods 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 void 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
public void 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 fieldspublic 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 com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.viewer.DetailViewerLogicalStructure 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 Canvas