|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.viewer.DetailViewer
public class DetailViewer
Displays one or more records "horizontally" with one property per line.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
|---|
config, configOnly, id, isElementSet, nativeObject, scClassName |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
DetailViewer()
|
|
DetailViewer(JavaScriptObject jsObj)
|
|
| Method Summary | |
|---|---|
HandlerRegistration |
addDragCompleteHandler(DragCompleteHandler handler)
Add a com.smartgwt.client.widgets.DragCompleteHandler. |
HandlerRegistration |
addDropCompleteHandler(DropCompleteHandler handler)
Add a com.smartgwt.client.widgets.DropCompleteHandler. |
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. |
Boolean |
anySelected()
Whether at least one item is selected |
protected 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 Records passed in explicitly, or by index. |
void |
deselectRecords(Record[] records)
Deselect a list of Records passed in explicitly, or by index. |
void |
disableHilite(String hiliteID)
Disable a hilite |
void |
disableHiliting()
Disable all hilites. |
void |
editHilites()
Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent. |
String |
emptyMessageHTML()
Return the message to show if the component has no data. |
void |
enableHilite(String hiliteID)
Enable / disable a hilites
|
void |
enableHilite(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)
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 |
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. |
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. |
String |
getAddFormulaFieldText()
Text for a menu item allowing users to add a formula field |
String |
getAddOperation()
Operation ID this component should use when performing add operations. |
String |
getAddSummaryFieldText()
Text for a menu item allowing users to add a formula field |
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() |
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. |
String |
getBlockSeparator()
A string (HTML acceptable) that will be written to a page to separate blocks. |
String |
getBlockStyle()
CSS style for each block (one record's worth of data). |
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.
|
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.
|
String |
getCellStyle()
CSS style for a normal value |
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'. |
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. |
String |
getDragTrackerStyle()
CSS Style to apply to the drag tracker when dragging occurs on this component. |
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. |
String |
getDuplicateDragMessage()
Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates
is enabled. |
String |
getEditFormulaFieldText()
Text for a menu item allowing users to edit a formula field |
String |
getEditSummaryFieldText()
Text for a menu item allowing users to edit the formatter for a field |
String |
getEmptyCellValue()
Text to show for an empty cell |
String |
getEmptyMessage()
The string to display in the body of a detailViewer with no records. |
String |
getEmptyMessageStyle()
CSS style to display this message in |
Boolean |
getExportAll()
Setting exportAll to true prevents the component from passing its list of fields to the export call. |
String[] |
getExportFields()
The list of field-names to export. |
String |
getFetchOperation()
Operation ID this component should use when performing fetch operations. |
String |
getFieldIdProperty()
Name of the field in the DetailViewerRecord which specifies the data property for that record. |
String |
getHeaderStyle()
CSS style for a header |
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 |
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. |
Integer |
getHiliteIconWidth()
Width for hilite icons for this component. |
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. |
String |
getHiliteState()
Get the current hilites encoded as a String, for saving. |
Criteria |
getInitialCriteria()
Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used. |
String |
getLabelPrefix()
text to put before a label |
String |
getLabelStyle()
CSS style for a normal detail label |
String |
getLabelSuffix()
text to put after a label |
String |
getLinkTextProperty()
Property name on a record that will hold the link text for that record. |
String |
getLoadingMessage()
The string to display in the body of a detailViewer which is loading records. |
String |
getLoadingMessageStyle()
CSS style to use for the loadingMessage. |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure()
|
static DetailViewer |
getOrCreateRef(JavaScriptObject jsObj)
|
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). |
String |
getPrintCellStyle()
Optional CSS style for a cell in printable HTML for this component. |
String |
getPrintHeaderStyle()
Optional CSS style for a header in printable HTML for this component. |
String |
getPrintLabelStyle()
Optional CSS style for a label cell in printable HTML for this component. |
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. |
String |
getRemoveOperation()
Operation ID this component should use when performing remove operations. |
ResultSet |
getResultSet()
Return the underlying data of this DataBoundComponent as a ResultSet. |
String |
getSeparatorStyle()
CSS style for a separator |
Boolean |
getShowComplexFields()
Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.
|
Boolean |
getShowDetailFields()
Whether to show fields marked detail:true when a DataBoundComponent is given a DataSource but no
component.fields. |
Boolean |
getShowEmptyField()
Whether to show the field when the value is null |
Boolean |
getShowEmptyMessage()
Show emptyMessage when there is no data to
display? |
Boolean |
getShowHiddenFields()
Whether to show fields marked hidden:true when a DataBoundComponent is given a
DataSource but no component.fields.
|
String |
getStyleName()
CSS style for the component as a whole. |
TimeDisplayFormat |
getTimeFormatter()
Display format to use for fields specified as type 'time'. |
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". |
String |
getTitleFieldValue(Record record)
Get the value of the titleField for the passed record |
String |
getUpdateOperation()
Operation ID this component should use when performing update operations. |
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.
|
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. |
Boolean |
getWrapLabel()
Should the label be allowed to wrap, or be fixed to one line no matter how long |
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 this.data.invalidateCache(). |
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 Records passed in explicitly, or by index. |
void |
selectRecords(int[] records,
boolean newState)
Select/deselect a list of Records passed in explicitly, or by index. |
void |
selectRecords(Record[] records)
Select/deselect a list of Records passed in explicitly, or by index. |
void |
selectRecords(Record[] records,
boolean newState)
Select/deselect a list of Records passed in explicitly, or by index. |
void |
setAddDropValues(Boolean addDropValues)
Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. |
void |
setAddFormulaFieldText(String addFormulaFieldText)
Text for a menu item allowing users to add a formula field |
void |
setAddOperation(String addOperation)
Operation ID this component should use when performing add operations. |
void |
setAddSummaryFieldText(String addSummaryFieldText)
Text for a menu item allowing users to add a formula field |
void |
setAutoFetchAsFilter(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(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(String blockSeparator)
A string (HTML acceptable) that will be written to a page to separate blocks. |
void |
setBlockStyle(String blockStyle)
CSS style for each block (one record's worth of data). |
void |
setCanAddFormulaFields(Boolean canAddFormulaFields)
Adds an item to the header context menu allowing users to launch a dialog to define a new field based on values present in other fields, using the com.smartgwt.client..FormulaBuilder.
|
void |
setCanAddSummaryFields(Boolean canAddSummaryFields)
Adds an item to the header context menu allowing users to launch a dialog to define a new text field that can contain both user-defined text and the formatted values present in other fields, using the com.smartgwt.client..SummaryBuilder.
|
void |
setCellStyle(String cellStyle)
CSS style for a normal value |
void |
setData(DetailViewerRecord[] data)
An array of records, specifying data. |
void |
setData(Record[] data)
An array of Record objects, specifying the data to be used to populate the DataBoundComponent. |
void |
setData(RecordList data)
An List of Record objects, specifying the data to be used to populate the DataBoundComponent. |
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)
Bind to a DataSource. |
void |
setDataSource(DataSource dataSource,
DetailViewerField... fields)
Bind to a DataSource. |
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'. |
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(String dragTrackerStyle)
CSS Style to apply to the drag tracker when dragging occurs on this component. |
void |
setDropValues(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(String duplicateDragMessage)
Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates
is enabled. |
void |
setEditFormulaFieldText(String editFormulaFieldText)
Text for a menu item allowing users to edit a formula field |
void |
setEditSummaryFieldText(String editSummaryFieldText)
Text for a menu item allowing users to edit the formatter for a field |
void |
setEmptyCellValue(String emptyCellValue)
Text to show for an empty cell |
void |
setEmptyMessage(String emptyMessage)
The string to display in the body of a detailViewer with no records. |
void |
setEmptyMessageStyle(String emptyMessageStyle)
CSS style to display this message in |
void |
setExportAll(Boolean exportAll)
Setting exportAll to true prevents the component from passing its list of fields to the export call. |
void |
setExportFields(String[] exportFields)
The list of field-names to export. |
void |
setFetchOperation(String fetchOperation)
Operation ID this component should use when performing fetch operations. |
void |
setFieldIdProperty(String fieldIdProperty)
Name of the field in the DetailViewerRecord which specifies the data property for that record. |
void |
setFields(DetailViewerField... fields)
An array of field objects, specifying the order and type of fields to display in this DetailViewer. |
void |
setHeaderStyle(String headerStyle)
CSS style for a header |
void |
setHiliteIconHeight(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(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(Integer hiliteIconWidth)
Width for hilite icons for this component. |
void |
setHiliteProperty(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(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 |
setJavaScriptObject(JavaScriptObject jsObj)
|
void |
setLabelPrefix(String labelPrefix)
text to put before a label |
void |
setLabelStyle(String labelStyle)
CSS style for a normal detail label |
void |
setLabelSuffix(String labelSuffix)
text to put after a label |
void |
setLinkTextProperty(String linkTextProperty)
Property name on a record that will hold the link text for that record. |
void |
setLoadingMessage(String loadingMessage)
The string to display in the body of a detailViewer which is loading records. |
void |
setLoadingMessageStyle(String loadingMessageStyle)
CSS style to use for the loadingMessage. |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.viewer.DetailViewerLogicalStructure s)
|
void |
setPreventDuplicates(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(String printCellStyle)
Optional CSS style for a cell in printable HTML for this component. |
void |
setPrintHeaderStyle(String printHeaderStyle)
Optional CSS style for a header in printable HTML for this component. |
void |
setPrintLabelStyle(String printLabelStyle)
Optional CSS style for a label cell in printable HTML for this component. |
void |
setRecordsPerBlock(int recordsPerBlock)
The number of records to display in a block. |
void |
setRemoveOperation(String removeOperation)
Operation ID this component should use when performing remove operations. |
void |
setSeparatorStyle(String separatorStyle)
CSS style for a separator |
void |
setShowComplexFields(Boolean showComplexFields)
Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.
|
void |
setShowDetailFields(Boolean showDetailFields)
Whether to show fields marked detail:true when a DataBoundComponent is given a DataSource but no
component.fields. |
void |
setShowEmptyField(Boolean showEmptyField)
Whether to show the field when the value is null |
void |
setShowEmptyMessage(Boolean showEmptyMessage)
Show emptyMessage when there is no data to
display? |
void |
setShowHiddenFields(Boolean showHiddenFields)
Whether to show fields marked hidden:true when a DataBoundComponent is given a
DataSource but no component.fields.
|
void |
setStyleName(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(String titleField)
Sets the best field to use for a user-visible title for an individual record from this component. |
void |
setUpdateOperation(String updateOperation)
Operation ID 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(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(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 |
setWrapLabel(Boolean wrapLabel)
Should the label be allowed to wrap, or be fixed to one line no matter how long |
void |
setWrapValues(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(String selectionComponentID)
Displays the currently selected record(s) of the ListGrid in the detailViewer. |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.smartgwt.client.widgets.DataBoundComponent |
|---|
getOrCreateJsObj |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public DetailViewer()
public DetailViewer(JavaScriptObject jsObj)
| Method Detail |
|---|
public static DetailViewer getOrCreateRef(JavaScriptObject jsObj)
public void setJavaScriptObject(JavaScriptObject jsObj)
setJavaScriptObject in class Canvasprotected JavaScriptObject create()
create in class Canvaspublic void setBlockSeparator(String blockSeparator)
blockSeparator - . See HTMLString. Default value is "Appearance overview and related methodspublic String getBlockSeparator()
HTMLStringAppearance overview and related methodspublic void setBlockStyle(String blockStyle)
blockStyle - . See CSSStyleName. Default value is "detailBlock"Appearance overview and related methodspublic String getBlockStyle()
CSSStyleNameAppearance overview and related methodspublic void setCellStyle(String cellStyle)
cellStyle - . See CSSStyleName. Default value is "detail"Appearance overview and related methodspublic String getCellStyle()
getCellStyle() on the field if defined, otherwise
returns this.cellStyle. See CSSStyleNameAppearance overview and related methodspublic void setDataFetchMode(FetchMode dataFetchMode)
setDataFetchMode in interface DataBoundComponentdataFetchMode - dataFetchMode Default value is "basic"Databinding overview and related methodspublic FetchMode getDataFetchMode()
getDataFetchMode in interface DataBoundComponentDatabinding overview and related methodspublic 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 dateFormatter or 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 - 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 dateFormatter or 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)
DateDisplayFormat to change the display format for datetimes used by this viewer. May
also be specified at the field level via dateFormatter
datetimeFormatter - datetimeFormatter Default value is nullListGridField.setDateFormatter(com.smartgwt.client.types.DateDisplayFormat),
Appearance overview and related methodspublic DateDisplayFormat getDatetimeFormatter()
DateDisplayFormat to change the display format for datetimes used by this viewer. May
also be specified at the field level via dateFormatter
ListGridField.getDateFormatter(),
Appearance overview and related methodspublic void setEmptyCellValue(String emptyCellValue)
Note : This is an advanced setting
emptyCellValue - . See HTMLString. Default value is " "Appearance overview and related methodspublic String getEmptyCellValue()
HTMLStringAppearance overview and related methodspublic void setEmptyMessage(String emptyMessage)
emptyMessage - . See HTMLString. Default value is "No items to display."public String getEmptyMessage()
HTMLStringpublic void setEmptyMessageStyle(String emptyMessageStyle)
Note : This is an advanced setting
emptyMessageStyle - . See CSSStyleName. Default value is "normal"public String getEmptyMessageStyle()
CSSStyleNamepublic void setFieldIdProperty(String fieldIdProperty)
Note : This is an advanced setting
fieldIdProperty - . See String. Default value is "name"public String getFieldIdProperty()
Stringpublic void setHeaderStyle(String headerStyle)
headerStyle - . See CSSStyleName. Default value is "detailHeader"Appearance overview and related methodspublic String getHeaderStyle()
CSSStyleNameAppearance overview and related methodspublic void setHiliteIconHeight(Integer hiliteIconHeight)
hiliteIconSize. Can be overridden at the field level
hiliteIconHeight - hiliteIconHeight Default value is nullHiliting overview and related methodspublic Integer getHiliteIconHeight()
hiliteIconSize. Can be overridden at the field level
Hiliting overview and related methodspublic void setHiliteIconLeftPadding(int hiliteIconLeftPadding)
hilite icons by default? Can be overridden at the field level
hiliteIconLeftPadding - hiliteIconLeftPadding Default value is 2Hiliting overview and related methodspublic int getHiliteIconLeftPadding()
hilite icons by default? Can be overridden at the field level
Hiliting overview and related methods
public void setHiliteIconPosition(HiliteIconPosition hiliteIconPosition)
throws IllegalStateException
hiliteIcons are present, where the hilite
icon will be placed relative to the field value. See HiliteIconPosition. Can be
overriden at the field level.
hiliteIconPosition - hiliteIconPosition Default value is "before"
IllegalStateException - this property cannot be changed after the component has been createdHiliting overview and related methodspublic HiliteIconPosition getHiliteIconPosition()
hiliteIcons are present, where the hilite
icon will be placed relative to the field value. See HiliteIconPosition. Can be
overriden at the field level.
Hiliting overview and related methodspublic void setHiliteIconRightPadding(int hiliteIconRightPadding)
hilite icons by default? Can be overridden at the field level
hiliteIconRightPadding - hiliteIconRightPadding Default value is 2Hiliting overview and related methodspublic int getHiliteIconRightPadding()
hilite icons by default? Can be overridden at the field level
Hiliting overview and related methods
public void setHiliteIcons(String... hiliteIcons)
throws 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 icon set to the chosen icon. 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 overriden
at the field level.
hiliteIcons - . See String. Default value is ["[SKINIMG]/Dialog/notify.png", "[SKINIMG]/Dialog/warn.png", "[SKINIMG]/actions/approve.png"]
IllegalStateException - this property cannot be changed after the component has been createdHiliting overview and related methodspublic 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 icon set to the chosen icon. 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 overriden
at the field level.
StringHiliting overview and related methodspublic 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 - hiliteIconSize Default value is 12setHiliteIconWidth(java.lang.Integer),
setHiliteIconHeight(java.lang.Integer),
DetailViewerField.setHiliteIconSize(java.lang.Integer),
Hiliting overview and related methodspublic 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 methodspublic void setHiliteIconWidth(Integer hiliteIconWidth)
hiliteIconSize. Can be overridden at the field level.
hiliteIconWidth - hiliteIconWidth Default value is nullHiliting overview and related methodspublic Integer getHiliteIconWidth()
hiliteIconSize. Can be overridden at the field level.
Hiliting overview and related methodspublic void setLabelPrefix(String labelPrefix)
labelPrefix - . See HTMLString. Default value is ""public String getLabelPrefix()
HTMLStringpublic void setLabelStyle(String labelStyle)
labelStyle - . See CSSStyleName. Default value is "detailLabel"Appearance overview and related methodspublic String getLabelStyle()
CSSStyleNameAppearance overview and related methodspublic void setLabelSuffix(String labelSuffix)
labelSuffix - . See HTMLString. Default value is ":"public String getLabelSuffix()
HTMLStringpublic void setLinkTextProperty(String linkTextProperty)
This property is configurable to avoid possible collision with data values in the record.
Use linkTextProperty if you have more than one
link field and the fields' records do not use the same property to store the linkText.
linkTextProperty - . See String. Default value is "linkText"DetailViewerField.setLinkText(java.lang.String),
DetailViewerField.setLinkTextProperty(java.lang.String)public String getLinkTextProperty()
This property is configurable to avoid possible collision with data values in the record.
Use linkTextProperty if you have more than one
link field and the fields' records do not use the same property to store the linkText.
StringDetailViewerField.getLinkText(),
DetailViewerField.getLinkTextProperty()public void setLoadingMessage(String loadingMessage)
"\${loadingImage}" to
include a loading image.
loadingMessage - . See HTMLString. Default value is " \${loadingImage}"public String getLoadingMessage()
"\${loadingImage}" to
include a loading image.
HTMLStringpublic void setLoadingMessageStyle(String loadingMessageStyle)
loadingMessage.
Note : This is an advanced setting
loadingMessageStyle - . See CSSStyleName. Default value is "normal"public String getLoadingMessageStyle()
loadingMessage.
CSSStyleNamepublic void setPrintCellStyle(String printCellStyle)
cellStyle will be used for printing as well as normal
presentation.
printCellStyle - . See CSSStyleName. Default value is nullPrinting overview and related methodspublic String getPrintCellStyle()
cellStyle will be used for printing as well as normal
presentation.
CSSStyleNamePrinting overview and related methodspublic void setPrintHeaderStyle(String printHeaderStyle)
headerStyle will be used for printing as well as normal
presentation.
printHeaderStyle - . See CSSStyleName. Default value is nullPrinting overview and related methodspublic String getPrintHeaderStyle()
headerStyle will be used for printing as well as normal
presentation.
CSSStyleNamePrinting overview and related methodspublic void setPrintLabelStyle(String printLabelStyle)
labelStyle will be used for printing as well as normal
presentation.
printLabelStyle - . See CSSStyleName. Default value is nullPrinting overview and related methodspublic String getPrintLabelStyle()
labelStyle will be used for printing as well as normal
presentation.
CSSStyleNamePrinting overview and related methodspublic void setRecordsPerBlock(int recordsPerBlock)
recordsPerBlock - recordsPerBlock Default value is 1Appearance overview and related methodspublic int getRecordsPerBlock()
Appearance overview and related methodspublic void setSeparatorStyle(String separatorStyle)
separatorStyle - . See CSSStyleName. Default value is "detail"Appearance overview and related methodspublic String getSeparatorStyle()
CSSStyleNameAppearance overview and related methods
public void setShowDetailFields(Boolean showDetailFields)
throws 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 DataBoundComponentshowDetailFields - showDetailFields Default value is true
IllegalStateException - this property cannot be changed after the component has been createdDatabinding overview and related methodspublic 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 DataBoundComponentDatabinding overview and related methodspublic void setShowEmptyField(Boolean showEmptyField)
Note : This is an advanced setting
showEmptyField - showEmptyField Default value is trueAppearance overview and related methodspublic Boolean getShowEmptyField()
Appearance overview and related methodspublic void setShowEmptyMessage(Boolean showEmptyMessage)
emptyMessage when there is no data to
display?
Note : This is an advanced setting
showEmptyMessage - showEmptyMessage Default value is truesetEmptyMessage(java.lang.String)public Boolean getShowEmptyMessage()
emptyMessage when there is no data to
display?
getEmptyMessage()public void setStyleName(String styleName)
setStyleName in class CanvasstyleName - . See CSSStyleName. Default value is "detailViewer"Appearance overview and related methodspublic String getStyleName()
getStyleName in class CanvasCSSStyleNameAppearance overview and related methodspublic void setTimeFormatter(TimeDisplayFormat timeFormatter)
timeFormatter.
timeFormatter - timeFormatter Default value is nullAppearance overview and related methodspublic TimeDisplayFormat getTimeFormatter()
timeFormatter.
Appearance overview and related methodspublic void setWrapLabel(Boolean wrapLabel)
wrapLabel - wrapLabel Default value is falsepublic Boolean getWrapLabel()
public void setWrapValues(Boolean wrapValues)
throws IllegalStateException
wrapValues - wrapValues Default value is true
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getWrapValues()
public String emptyMessageHTML()
emptyMessage or " " if showEmptyMessage is
false. If the component has no data because the browser is offline, we instead display the offlineMessage or " " if showOfflineMessage
is false
public static void setDefaultProperties(DetailViewer detailViewerProperties)
Note: This method is intended for setting default attributes only and will effect 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.
detailViewerProperties - properties that should be used as new defaults when instances of this class are createdpublic void setData(DetailViewerRecord[] data)
data - the datapublic void setData(Record[] data)
data - array of Record objects.setData(DetailViewerRecord[])public void setData(RecordList data)
data - List of Recordspublic void setFields(DetailViewerField... fields)
fields - the fieldspublic 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(String selectionComponentID)
selectionComponentID - the ID of a ListGrid whose currently selected record(s) is/are to be edited
public 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)
DataBoundComponentResultSet object for this
component. In effect, this gives you control over the resultSize
attribute for this component.
Note that regardless of the dataPageSize setting, a component will always fetch
all of data that it needs to draw. Settings such as
showAllRecords,
drawAllMaxCells and
drawAheadRatio can cause more rows than the configured
dataPageSize to be fetched.
setDataPageSize in interface DataBoundComponentdataPageSize - dataPageSize Default value is 75public int getDataPageSize()
DataBoundComponentResultSet object for this
component. In effect, this gives you control over the resultSize
attribute for this component.
Note that regardless of the dataPageSize setting, a component will always fetch
all of data that it needs to draw. Settings such as
showAllRecords,
drawAllMaxCells and
drawAheadRatio can cause more rows than the configured
dataPageSize to be fetched.
getDataPageSize in interface DataBoundComponentpublic void setUseAllDataSourceFields(Boolean useAllDataSourceFields)
DataBoundComponentfields) 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 DataBoundComponentuseAllDataSourceFields - useAllDataSourceFields Default value is falsepublic Boolean getUseAllDataSourceFields()
DataBoundComponentfields) 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 DataBoundComponentpublic void setShowHiddenFields(Boolean showHiddenFields)
DataBoundComponenthidden: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 DataBoundComponentshowHiddenFields - showHiddenFields Default value is falsepublic Boolean getShowHiddenFields()
DataBoundComponenthidden: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 DataBoundComponentpublic void setShowComplexFields(Boolean showComplexFields)
DataBoundComponentcomponent.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 DataBoundComponentshowComplexFields - showComplexFields Default value is truepublic Boolean getShowComplexFields()
DataBoundComponentcomponent.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 DataBoundComponentpublic void setFetchOperation(String fetchOperation)
DataBoundComponent
setFetchOperation in interface DataBoundComponentfetchOperation - fetchOperation Default value is nullpublic String getFetchOperation()
DataBoundComponent
getFetchOperation in interface DataBoundComponentpublic void setUpdateOperation(String updateOperation)
DataBoundComponent
setUpdateOperation in interface DataBoundComponentupdateOperation - updateOperation Default value is nullpublic String getUpdateOperation()
DataBoundComponent
getUpdateOperation in interface DataBoundComponentpublic void setAddOperation(String addOperation)
DataBoundComponent
setAddOperation in interface DataBoundComponentaddOperation - addOperation Default value is nullpublic String getAddOperation()
DataBoundComponent
getAddOperation in interface DataBoundComponentpublic void setRemoveOperation(String removeOperation)
DataBoundComponent
setRemoveOperation in interface DataBoundComponentremoveOperation - removeOperation Default value is nullpublic String getRemoveOperation()
DataBoundComponent
getRemoveOperation in interface DataBoundComponentpublic void setExportFields(String[] exportFields)
DataBoundComponentIf exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.
setExportFields in interface DataBoundComponentexportFields - exportFields Default value is nullpublic String[] getExportFields()
DataBoundComponentIf exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.
getExportFields in interface DataBoundComponentpublic void setExportAll(Boolean exportAll)
DataBoundComponentfields.
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 DataBoundComponentexportAll - exportAll Default value is falsepublic Boolean getExportAll()
DataBoundComponentfields.
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(Boolean preventDuplicates)
throws IllegalStateException
DataBoundComponentDataBoundComponent.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 DataBoundComponentpreventDuplicates - preventDuplicates Default value is null
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getPreventDuplicates()
DataBoundComponentDataBoundComponent.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(String duplicateDragMessage)
throws IllegalStateException
DataBoundComponentpreventDuplicates
is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.
setDuplicateDragMessage in interface DataBoundComponentduplicateDragMessage - duplicateDragMessage Default value is "Duplicates not allowed"
IllegalStateException - this property cannot be changed after the component has been createdpublic String getDuplicateDragMessage()
DataBoundComponentpreventDuplicates
is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.
getDuplicateDragMessage in interface DataBoundComponentpublic void setAddDropValues(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 DataBoundComponentaddDropValues - addDropValues Default value is truepublic 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 DataBoundComponentpublic void setDropValues(Map dropValues)
DataBoundComponentaddDropValues 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 DataBoundComponentdropValues - dropValues Default value is nullpublic Map getDropValues()
DataBoundComponentaddDropValues 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 DataBoundComponentdropValues 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 setUseFlatFields(Boolean useFlatFields)
throws IllegalStateException
DataBoundComponentuseFlatFields 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 DataBoundComponentuseFlatFields - useFlatFields Default value is null
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getUseFlatFields()
DataBoundComponentuseFlatFields 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 DataBoundComponentpublic void setHiliteProperty(String hiliteProperty)
DataBoundComponentid for a hilite defined on this component.
setHiliteProperty in interface DataBoundComponenthiliteProperty - hiliteProperty Default value is "_hilite"public String getHiliteProperty()
DataBoundComponentid for a hilite defined on this component.
getHiliteProperty in interface DataBoundComponentpublic void editHilites()
editHilites in interface DataBoundComponentpublic String getHiliteState()
getHiliteState in interface DataBoundComponentpublic void setHiliteState(String hiliteState)
setHiliteState in interface DataBoundComponenthiliteState - 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 DataBoundComponenthilites - array of hilite objectspublic Hilite[] getHilites()
getHilites in interface DataBoundComponentpublic void setDragDataAction(DragDataAction dragDataAction)
DataBoundComponent
setDragDataAction in interface DataBoundComponentdragDataAction - dragDataAction Default value is Canvas.MOVEpublic DragDataAction getDragDataAction()
DataBoundComponent
getDragDataAction in interface DataBoundComponentpublic void setDragTrackerStyle(String dragTrackerStyle)
DataBoundComponent
setDragTrackerStyle in interface DataBoundComponentdragTrackerStyle - dragTrackerStyle Default value is "gridDragTracker"public String getDragTrackerStyle()
DataBoundComponent
getDragTrackerStyle in interface DataBoundComponentpublic void setCanAddFormulaFields(Boolean canAddFormulaFields)
DataBoundComponentcom.smartgwt.client..FormulaBuilder.
User-added formula fields can be persisted via ListGrid.getFieldState() and
ListGrid.setFieldState(java.lang.String).
setCanAddFormulaFields in interface DataBoundComponentcanAddFormulaFields - canAddFormulaFields Default value is falsepublic void addSummaryField()
DataBoundComponentcom.smartgwt.client..SummaryBuilder to create a new Summary Field. This
is equivalent to calling DataBoundComponentGen#editSummaryField with
no parameter.
addSummaryField in interface DataBoundComponentpublic void addFormulaField()
DataBoundComponentcom.smartgwt.client..FormulaBuilder to create a new Formula Field. This
is equivalent to calling DataBoundComponentGen#editFormulaField with
no parameter.
addFormulaField in interface DataBoundComponentpublic Boolean getCanAddFormulaFields()
DataBoundComponentcom.smartgwt.client..FormulaBuilder.
User-added formula fields can be persisted via ListGrid.getFieldState() and
ListGrid.setFieldState(java.lang.String).
getCanAddFormulaFields in interface DataBoundComponentpublic void setAddFormulaFieldText(String addFormulaFieldText)
DataBoundComponent
setAddFormulaFieldText in interface DataBoundComponentaddFormulaFieldText - addFormulaFieldText Default value is "Add formula column..."public String getAddFormulaFieldText()
DataBoundComponent
getAddFormulaFieldText in interface DataBoundComponentpublic void setEditFormulaFieldText(String editFormulaFieldText)
DataBoundComponent
setEditFormulaFieldText in interface DataBoundComponenteditFormulaFieldText - editFormulaFieldText Default value is "Edit formula..."public String getEditFormulaFieldText()
DataBoundComponent
getEditFormulaFieldText in interface DataBoundComponentpublic void setCanAddSummaryFields(Boolean canAddSummaryFields)
DataBoundComponentcom.smartgwt.client..SummaryBuilder.
User-added summary fields can be persisted via ListGrid.getFieldState() and
ListGrid.setFieldState(java.lang.String).
setCanAddSummaryFields in interface DataBoundComponentcanAddSummaryFields - canAddSummaryFields Default value is falsepublic Boolean getCanAddSummaryFields()
DataBoundComponentcom.smartgwt.client..SummaryBuilder.
User-added summary fields can be persisted via ListGrid.getFieldState() and
ListGrid.setFieldState(java.lang.String).
getCanAddSummaryFields in interface DataBoundComponentpublic void setAddSummaryFieldText(String addSummaryFieldText)
DataBoundComponent
setAddSummaryFieldText in interface DataBoundComponentaddSummaryFieldText - addSummaryFieldText Default value is "Add summary column..."public String getAddSummaryFieldText()
DataBoundComponent
getAddSummaryFieldText in interface DataBoundComponentpublic void setEditSummaryFieldText(String editSummaryFieldText)
DataBoundComponent
setEditSummaryFieldText in interface DataBoundComponenteditSummaryFieldText - editSummaryFieldText Default value is "Edit summary format..."public String getEditSummaryFieldText()
DataBoundComponent
getEditSummaryFieldText in interface DataBoundComponentpublic void selectRecord(Record record)
DataBoundComponentRecord passed in explicitly, or by index.
selectRecord in interface DataBoundComponentrecord - record (or row number) to selectpublic void selectRecord(int record)
DataBoundComponentRecord passed in explicitly, or by index.
selectRecord in interface DataBoundComponentrecord - record (or row number) to select
public void selectRecord(int record,
boolean newState)
DataBoundComponentRecord passed in explicitly, or by index.
selectRecord in interface DataBoundComponentrecord - record (or row number) to selectnewState - new selection state (if null, defaults to true)
public void selectRecord(Record record,
boolean newState)
DataBoundComponentRecord passed in explicitly, or by index.
selectRecord in interface DataBoundComponentrecord - record (or row number) to selectnewState - new selection state (if null, defaults to true)public void selectRecords(int[] records)
DataBoundComponentRecords passed in explicitly, or by index.
selectRecords in interface DataBoundComponentrecords - records (or row numbers) to select
public void selectRecords(int[] records,
boolean newState)
DataBoundComponentRecords passed in explicitly, or by index.
selectRecords in interface DataBoundComponentrecords - records (or row numbers) to selectnewState - new selection statepublic void selectRecords(Record[] records)
DataBoundComponentRecords passed in explicitly, or by index.
selectRecords in interface DataBoundComponentrecords - records (or row numbers) to select
public void selectRecords(Record[] records,
boolean newState)
DataBoundComponentRecords passed in explicitly, or by index.
selectRecords in interface DataBoundComponentrecords - records (or row numbers) to selectnewState - new selection state (if null, defaults to true)public void deselectRecord(Record record)
DataBoundComponentRecord passed in explicitly, or by index. Synonym for
selectRecord(record, false)
deselectRecord in interface DataBoundComponentrecord - record (or row number) to deselectpublic void deselectRecord(int record)
DataBoundComponentRecord passed in explicitly, or by index. Synonym for
selectRecord(record, false)
deselectRecord in interface DataBoundComponentrecord - record (or row number) to deselectpublic void deselectRecords(int[] records)
DataBoundComponentRecords passed in explicitly, or by index. Synonym
for selectRecords(records, false)
deselectRecords in interface DataBoundComponentrecords - records (or row numbers) to deselectpublic void deselectRecords(Record[] records)
DataBoundComponentRecords passed in explicitly, or by index. Synonym
for selectRecords(records, false)
deselectRecords in interface DataBoundComponentrecords - records (or row numbers) to deselectpublic void selectAllRecords()
DataBoundComponent
selectAllRecords in interface DataBoundComponentpublic void deselectAllRecords()
DataBoundComponent
deselectAllRecords in interface DataBoundComponentpublic Boolean anySelected()
DataBoundComponent
anySelected in interface DataBoundComponentpublic void enableHilite(String hiliteID)
DataBoundComponenthilites
enableHilite in interface DataBoundComponenthiliteID - ID of hilite to enable
public void enableHilite(String hiliteID,
boolean enable)
DataBoundComponenthilites
enableHilite in interface DataBoundComponenthiliteID - ID of hilite to enableenable - new enabled state to apply - if null, defaults to truepublic void disableHilite(String hiliteID)
DataBoundComponent
disableHilite in interface DataBoundComponenthiliteID - ID of hilite to disablepublic void enableHiliting()
DataBoundComponent
enableHiliting in interface DataBoundComponentpublic void enableHiliting(boolean enable)
DataBoundComponent
enableHiliting in interface DataBoundComponentenable - new enabled state to apply - if null, defaults to truepublic void disableHiliting()
DataBoundComponent
disableHiliting in interface DataBoundComponentpublic Record[] getDragData()
DataBoundComponent
This method is consulted by
ListGrid.willAcceptDrop().
getDragData in interface DataBoundComponentRecords that are currently selected.public void transferSelectedData(DataBoundComponent source)
DataBoundComponentDataBoundComponent.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 DataBoundComponentsource - source component from which the records will be tranferred
public void transferSelectedData(DataBoundComponent source,
int index)
DataBoundComponentDataBoundComponent.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 DataBoundComponentsource - source component from which the records will be tranferredindex - target index (drop position) of the rows within this grid.public int getRecordIndex(Record record)
DataBoundComponentOverride in subclasses to provide more specific behaviour, for instance, when data holds a large number of records
getRecordIndex in interface DataBoundComponentrecord - the record whose index is to be retrieved
public String getTitleFieldValue(Record record)
DataBoundComponentOverride in subclasses
getTitleFieldValue in interface DataBoundComponentrecord - the record whose index is to be retrieved
public void setTitleField(String titleField)
DataBoundComponent
setTitleField in interface DataBoundComponentpublic String getTitleField()
DataBoundComponenttitleField 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 DataBoundComponentpublic void setDataSource(DataSource dataSource)
DataBoundComponentWhen binding a previously-bound componenet 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, you may be able to refer to setDataSource(dataSource, fields) as an alternative method if the widget has an implementation of it.
setDataSource in interface DataBoundComponentdataSource - DataSource to bind to. Default value is nullpublic DataSource getDataSource()
DataBoundComponentDataSource requests.
getDataSource in interface DataBoundComponent
public void setAutoFetchData(Boolean autoFetchData)
throws IllegalStateException
DataBoundComponentDataBoundComponent.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 DataBoundComponentautoFetchData - autoFetchData
IllegalStateExceptionpublic Boolean getAutoFetchData()
DataBoundComponentDataBoundComponent.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 IllegalStateException
DataBoundComponentautoFetchData is true, this attribute allows the developer to specify a textMatchStyle
for the initial DataBoundComponent.fetchData() call.
setAutoFetchTextMatchStyle in interface DataBoundComponentIllegalStateExceptionpublic TextMatchStyle getAutoFetchTextMatchStyle()
DataBoundComponentautoFetchData is true, this attribute allows the developer to specify a textMatchStyle
for the initial DataBoundComponent.fetchData() call.
getAutoFetchTextMatchStyle in interface DataBoundComponent
public void setAutoFetchAsFilter(Boolean autoFetchAsFilter)
throws IllegalStateException
DataBoundComponentDataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
setAutoFetchAsFilter in interface DataBoundComponentautoFetchAsFilter - autoFetchAsFilter
IllegalStateExceptionpublic Boolean getAutoFetchAsFilter()
DataBoundComponentDataBoundComponent.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 IllegalStateException
DataBoundComponentDataBoundComponent.setAutoFetchData(Boolean) is used.
setInitialCriteria in interface DataBoundComponentinitialCriteria - the initial criteria
IllegalStateException - this property cannot be changed after the component has been createdpublic Criteria getInitialCriteria()
DataBoundComponentDataBoundComponent.setAutoFetchData(Boolean) is used.
getInitialCriteria in interface DataBoundComponentpublic 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 DataBoundComponentpublic 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 DataBoundComponentcriteria - 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 DataBoundComponentcriteria - 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
public 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 DataBoundComponentcriteria - 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 DataBoundComponentpublic 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 DataBoundComponentcriteria - 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 DataBoundComponentcriteria - 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 details
public 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 DataBoundComponentcriteria - 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()
DataBoundComponentthis.data.invalidateCache(). If necessary, this will cause a new fetch to
be performed with the current set of criteria for this component.
Has no effect if this component is not showing a set of filtered data.
invalidateCache in interface DataBoundComponentpublic ResultSet getResultSet()
DataBoundComponentResultSet.
Note that this method should only be called after initial data has been fetched by this DataBoundComponent.
getResultSet in interface DataBoundComponentDataBoundComponent.fetchData()public RecordList getRecordList()
DataBoundComponentRecordList.
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 DataBoundComponentpublic void exportData()
DataBoundComponentDataSource
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 DataBoundComponentDataBoundComponentMethods overview and related methodspublic void exportData(DSRequest requestProperties)
DataBoundComponentDataSource
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 DataBoundComponentrequestProperties - additional properties to set on the DSRequest that will be issuedDataBoundComponentMethods overview and related methodspublic void exportClientData()
DataBoundComponentTo export unformatted data from this component's dataSource, see
exportData
which does not include client-side formatters,
but relies on both the SmartClient server and server-side DataSources.
exportClientData in interface DataBoundComponentDataSource.exportClientData(java.lang.Object[], com.smartgwt.client.data.DSRequest)public void exportClientData(DSRequest requestProperties)
DataBoundComponentTo export unformatted data from this component's dataSource, see
exportData
which does not include client-side formatters,
but relies on both the SmartClient server and server-side DataSources.
exportClientData in interface DataBoundComponentrequestProperties - Request properties for the exportDataSource.exportClientData(java.lang.Object[], com.smartgwt.client.data.DSRequest)public HandlerRegistration addFetchDataHandler(FetchDataHandler handler)
Notification function fired on fetchData() or filterData()
addFetchDataHandler in interface HasFetchDataHandlershandler - the filterData handler
HandlerRegistration used to remove this handlerpublic 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 HasDropCompleteHandlershandler - the DropCompleteHandler
HandlerRegistration used to remove this handlerpublic 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 HasDragCompleteHandlershandler - the DropCompleteHandler
HandlerRegistration used to remove this handlerpublic com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.viewer.DetailViewerLogicalStructure s)
public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
getLogicalStructure in interface LogicalStructuregetLogicalStructure in class Canvas
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||