public class ListGridField extends DBCField implements HasCellSavedHandlers, HasChangedHandlers, HasChangeHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasRecordClickHandlers, HasValueIconClickHandlers
ListGrid
.id
factoryCreated, factoryProperties
Constructor and Description |
---|
ListGridField() |
ListGridField(com.google.gwt.core.client.JavaScriptObject jsObj) |
ListGridField(java.lang.String name) |
ListGridField(java.lang.String name,
int width) |
ListGridField(java.lang.String name,
java.lang.String title) |
ListGridField(java.lang.String name,
java.lang.String title,
int width) |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addCellSavedHandler(CellSavedHandler handler)
Add a cellSaved handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addChangedHandler(ChangedHandler handler)
Add a changed handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addChangeHandler(ChangeHandler handler)
Add a change handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addEditorEnterHandler(EditorEnterHandler handler)
Add a editorEnter handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addEditorExitHandler(EditorExitHandler handler)
Add a editorExit handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addRecordClickHandler(RecordClickHandler handler)
Add a recordClick handler.
|
void |
addSummaryFunction(SummaryFunction summaryFunction)
If
showGridSummary or showGroupSummary is true,
this method can be used to specify a SummaryFunction
for calculating the summary value to display. |
void |
addSummaryFunction(SummaryFunctionType summaryFunction)
If
showGridSummary or showGroupSummary is true,
this method can be used to specify a SummaryFunctionType
for calculating the summary value to display. |
com.google.gwt.event.shared.HandlerRegistration |
addValueIconClickHandler(ValueIconClickHandler handler)
Add a valueIconClick handler.
|
java.lang.String |
formatCellValue(java.lang.Object value,
ListGridRecord record,
int rowNum,
int colNum,
ListGrid grid)
Deprecated.
Use
setCellFormatter() or ListGrid.setCellFormatter() to install a CellFormatter . This method is not a valid override point for the default behavior. |
AIFieldRequest |
getAIFieldRequest()
The settings that configure requests to AI to generate the values for this field.
|
java.lang.String |
getAiHoverContentsPrefix()
If set to a non-
null value, override of ListGrid.aiHoverContentsPrefix for this field. |
AIHoverRequest |
getAIHoverRequest()
If set and AI is
enabled , the settings that configure requests to AI to
generate the contents of the hover displayed when the user hovers the mouse pointer over a cell of the field. |
Alignment |
getAlign()
Horizontal alignment for field's column header: "left", "right" or "center".
|
java.lang.Boolean |
getAllowFilterExpressions()
Field-level setting for
ListGrid.allowFilterExpressions :true - controls whether search expressions can be entered directly into the filter
item for this field. |
java.lang.Boolean |
getAllowFilterOperators()
Per-field setting for
ListGrid.allowFilterOperators . |
java.lang.Boolean |
getAlwaysShowOperatorIcon()
Per-field setting for
ListGrid.alwaysShowOperatorIcon . |
java.lang.Boolean |
getApplyAfterSummary()
If
userFormula is set for this field, and this
grid is showing group summaries or a grid summary , this property determines what field value
should be present in those summary rows. |
ArrowKeyEditAction |
getArrowKeyEditAction()
What to do when a user hits arrow key while editing this field?
See ListGrid.getArrowKeyEditAction() . |
java.lang.String |
getAsyncErrorCellValue()
A field-specific value to display for cells when an error occurred during asynchronous generation.
|
java.lang.String |
getAsyncMissingCellValue()
A field-specific value to display for cells whose value was not generated by the previous asynchronous operation to
generate it, or will not be generated by an asynchronous operation due to currently being disabled.
|
AutoComplete |
getAutoComplete()
Whether to allow browser autoComplete when editing this field.
|
java.lang.Boolean |
getAutoFetchDisplayMap()
If true, automatically fetches records and derives a valueMap from
optionDataSource . |
AutoFitWidthApproach |
getAutoFit()
When set, this attribute causes this field to be auto-sized directly by effectively setting
autoFitWidth to true and applying an autoFitWidthApproach . |
java.lang.Boolean |
getAutoFitWidth()
Should this listGrid field autofit its width to either titles or content?
|
AutoFitWidthApproach |
getAutoFitWidthApproach()
When a user requests column autofitting via the
header contextMenu or via a mouse gesture , what autofit approach is used. |
java.lang.Boolean |
getAutoFreeze()
Whether this field should be automatically frozen when other fields are frozen.
|
int |
getAutoFreezePosition()
When a field has
autoFreeze set to true, developers
can implement this method to indicate where in the frozen-fields array this field should appear. |
java.lang.String |
getBaseStyle()
Custom base style to apply to all cells in this field instead of
ListGrid.baseStyle To override the baseStyle at the row level,
use record[listGrid.recordBaseStyleProperty] instead. |
java.lang.Boolean |
getCanAutoFitWidth()
Should the user be allowed to perform one-time autofitting of this field via a header context-menu option?
|
java.lang.Boolean |
getCanDragResize()
Whether this field can be dragResized using the mouse.
|
java.lang.Boolean |
getCanEdit()
This property establishes default editability for the field.
|
java.lang.Boolean |
getCanEditAISummary()
Can this AI summary or sort field be edited from the header context menu? Setting this property to
false
prevents editing by the user. |
java.lang.Boolean |
getCanEditFormula()
Can formula be edited from header context menu? Setting attribute to
false prevents editing. |
java.lang.Boolean |
getCanEditSummary()
Can summary be edited from header context menu? Setting attribute to
false prevents editing. |
java.lang.Boolean |
getCanExport()
Dictates whether the data in this field be exported.
|
java.lang.Boolean |
getCanFilter()
If showing a filter row for this ListGrid, should the filter criteria for this field be editable
|
java.lang.Boolean |
getCanFreeze()
Whether this field should display freezing/unfreezing options in its header context menu.
|
java.lang.Boolean |
getCanGroupBy()
Determines whether this field will be groupable in the header context menu.
|
java.lang.Boolean |
getCanHide()
If set to false, this field will be omitted from the column picker that appears in the header context menu when
ListGrid.canPickFields is enabled. |
java.lang.Boolean |
getCanHilite()
Determines whether this field can be hilited.
|
java.lang.Boolean |
getCanReorder()
Whether this field can be reordered using the mouse.
|
java.lang.Boolean |
getCanSort()
Enables or disables sorting by this column.
|
java.lang.Boolean |
getCanSortClientOnly()
When true, this field can only be used for sorting if the data is entirely client-side.
|
java.lang.Boolean |
getCanToggle()
Allows a boolean or
valueMapped field to be edited without going into edit
mode. |
Alignment |
getCellAlign()
Horizontal alignment for cells in this field's column: "left", "right" or "center".
If null, alignment is derived from align . |
java.lang.String |
getCellIcon()
For a field of type:"icon" only, set the icon that appears in body cells.
|
java.lang.String |
getCellPrompt()
HTML to show in a hover over cells in this field.
|
java.lang.String |
getDataPath()
dataPath for this field.
|
DateDisplayFormat |
getDateFormatter()
Display format to use for date type values within this field.
|
java.lang.Integer |
getDecimalPad()
Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.
|
java.lang.Integer |
getDecimalPrecision()
Applies only to fields of type "float" and affects how many significant digits are shown.
|
java.lang.String |
getDefaultGroupingMode()
Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and
field.groupingMode is unset. |
java.lang.String |
getDefaultIconSrc()
If this field is editable, this property will be passed to editors displayed for cells within this field as
FormItem.defaultIconSrc . |
java.lang.Integer |
getDefaultWidth()
Optional "default width" for this field.
|
java.lang.String |
getDisplayField()
Specifies the
optionDataSource field used to
retrieve the display values that are to be mapped from the internal values specified by valueField . |
java.lang.Boolean |
getDisplayValueFromRecord()
If a
displayField is set, should this field show
record values from the displayField ? |
UserFormula |
getEditorFormula()
|
java.lang.Integer |
getEditorIconHeight()
If this field is editable, this property will be passed to editors displayed for cells within this field as
FormItem.iconHeight .If this property unset, the iconHeight property from the editor can be picked up from iconHeight instead. |
java.lang.Integer |
getEditorIconWidth()
If this field is editable, this property will be passed to editors displayed for cells within this field as
FormItem.iconWidth .If this property unset, the iconWidth property from the editor can be picked up from iconWidth instead. |
java.lang.String |
getEditorImageURLPrefix()
When some cell in this field is being edited, this property can be used to apply an explicit
FormItem.imageURLPrefix to the editor in question. |
java.lang.String |
getEditorImageURLSuffix()
When some cell in this field is being edited, this property can be used to apply an explicit
FormItem.imageURLSuffix to the editor in question. |
UserSummary |
getEditorTextFormula()
|
java.lang.Integer |
getEditorValueIconHeight()
When some cell in this field is being edited, setting this property will specify the height for value icons in the
cell's editor.
|
java.lang.Integer |
getEditorValueIconWidth()
When some cell in this field is being edited, setting this property will specify the width for value icons in the cell's
editor.
|
java.lang.String |
getEmptyCellValue()
The value to display for a cell whose value is null or the empty string after applying
formatting and valueMap (if any). |
Criteria |
getEnableWhen()
Criteria to be evaluated to determine whether this field should be enabled.
|
EnterKeyEditAction |
getEnterKeyEditAction()
What to do when a user hits enter while editing this field?
Overrides the enterKeyEditAction as
specified at the listGrid level while focus is in this field. |
java.lang.Boolean |
getEscapeHTML()
By default HTML values in ListGrid cells will be interpreted by the browser.
|
EscapeKeyEditAction |
getEscapeKeyEditAction()
What to do when a user hits escape while editing this field?
Overrides the escapeKeyEditAction as
specified at the listGrid level while focus is in this field. |
java.lang.Boolean |
getExcludeFromState()
If true, then this field is excluded from the bound component's view state.
|
boolean |
getExportFieldWidth()
When exporting data to Excel/OpenOffice format using
ListGrid.exportData() or ListGrid.exportClientData()
with ListGrid.exportFieldWidths set, set this
flag false to cause this field to "opt out" of width export. |
java.lang.String |
getExportFormat()
FormatString used during exports for numeric or date formatting. |
java.lang.Boolean |
getExportRawNumbers()
Dictates whether numeric values should be exported as raw numbers instead of formatted values when using
exportClientData() . |
java.lang.Boolean |
getExportRawValues()
Dictates whether the data in this field should be exported raw by
exportClientData() . |
java.lang.Boolean |
getFilterOnKeypress()
If set this will override the
filterOnKeypress
setting at the grid level |
OperatorId |
getFilterOperator()
With the
FilterEditor showing, the default Operator to use when matching values for this field. |
java.lang.String |
getFormat()
FormatString for numeric or date formatting. |
java.lang.Boolean |
getFrozen()
Whether this field should be "frozen" for the purposes of horizontal scrolling.
|
java.lang.Integer |
getGroupGranularity()
Granularity of grouping for numeric fields.
|
java.lang.String |
getGroupingMode()
For a field that allows multiple
grouping modes ,
the current grouping mode. |
java.util.Map |
getGroupingModes()
If this field can be grouped, this attribute represents the set of grouping styles that are available.
|
java.lang.Integer |
getGroupPrecision()
For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping.
|
java.lang.String |
getHeaderBaseStyle()
Custom base style to apply to this field's header button instead of
ListGrid.headerBaseStyle .Note that depending on the header button constructor, you may have to override headerTitleStyle as well. |
java.lang.String |
getHeaderButtonAriaRole()
Aria role for the header button for this field. |
java.util.Map |
getHeaderButtonAriaState()
Aria state for the header button for this field. |
java.lang.Integer |
getHeaderHoverDelay()
Delay in ms for hovers shown over this field's header.
|
java.lang.String |
getHeaderTitle()
Optional title for the header button for this field.
|
java.lang.String |
getHeaderTitleStyle()
Custom titleStyle to apply to this field's header button instead of
ListGrid.headerTitleStyle .Note that this will typically only have an effect if ListGrid.headerButtonConstructor is set to StretchImgButton or a subclass thereof. |
java.lang.Boolean |
getHidden()
Marks field as initially hidden.
The user will still be able to show the field via a context menu. |
java.lang.Boolean |
getHideOnPhone()
Set this property to true to suppress showing this field on mobile phones (handset-sized devices).
|
java.lang.Boolean |
getHideOnTablet()
Set this property to true to suppress showing this field on tablets (tablet-sized devices).
|
java.lang.Boolean |
getHiliteHTMLAfterFormat()
If set to true, custom HTML applied as part of hiliting will be applied after
formatting for each cell in this column. |
java.lang.Integer |
getHiliteIconHeight()
Height for hilite icons for this field.
|
java.lang.Integer |
getHiliteIconLeftPadding()
How much padding should there be on the left of
hilite icons for this field? Overrides ListGrid.hiliteIconLeftPadding |
HiliteIconPosition |
getHiliteIconPosition()
When
ListGrid.hiliteIcons are present, where the hilite
icon will be placed relative to the field value. |
java.lang.Integer |
getHiliteIconRightPadding()
How much padding should there be on the right of
hilite icons for this field? Overrides ListGrid.hiliteIconRightPadding |
java.lang.Integer |
getHiliteIconSize()
Default width and height of
hilite icons in this field. |
java.lang.Integer |
getHiliteIconWidth()
Width for hilite icons for this field.
|
java.lang.Integer |
getHoverDelay()
Delay in ms for hovers shown for cells in this field.
|
java.lang.Integer |
getHoverWidth()
Specifies the width of the canvas shown when the mouse hovers over cells in this field.
|
java.lang.Boolean |
getHoverWrap()
This property may be set to customize the
wrap attribute for the canvas shown when the mouse hovers over
cells in this field. |
java.lang.String |
getIcon()
Optional icon to show next to the title for this field.
|
Cursor |
getIconCursor()
Specifies the cursor to display when the mouse pointer is over an icon image in a cell for either a field of type
icon or a valueIcon . |
java.lang.Integer |
getIconHeight()
If
icon is specified, this property can be used to
specify the height of the icon to be displayed in the ListGrid header button. |
java.lang.String |
getIconOrientation()
If this field is showing an icon, should it appear to the left or right of the title?
Valid options are "left" or "right" |
java.lang.Integer |
getIconSize()
If
icon is specified, this property can be used to
specify the size of the icon to be displayed in the ListGrid header button. |
int |
getIconSpacing()
Pixels between icon and title text.
|
java.lang.String |
getIconVAlign()
If this field is editable, this property will be passed to editors displayed for cells within this field as
FormItem.iconVAlign . |
java.lang.Integer |
getIconWidth()
If
icon is specified, this property can be used to
specify the width of the icon to be displayed in the ListGrid header button. |
java.lang.Boolean |
getIgnoreKeyboardClicks()
If the user is navigating through the grid using the keyboard, record click or double click events may be generated via
keyboard interactions (see
ListGrid.generateClickOnSpace , ListGrid.generateClickOnEnter , ListGrid.generateDoubleClickOnSpace , ListGrid.generateDoubleClickOnEnter and ListGrid.arrowKeyAction ). |
int |
getImageHeight()
Height of image shown for fieldTypes image and imageFile in this field.
|
int |
getImageSize()
Size of images shown for fieldTypes image and imageFile in this field.
|
java.lang.String |
getImageURLPrefix()
If this field has type [
ListGridFieldType ] set to "image" and the URL for
the image displayed is not absolute, the path of the URL will be relative to this stringAlternatively, if this field displays any valueIcons, this prefix will be applied to the beginning of any valueIcons when determining the URL for the image. |
java.lang.String |
getImageURLSuffix()
If any cells in this field are showing a value icon (see:
valueIcons ) or this is has ListGridFieldType set to "image" , the value of this property will be appended to
the end of the URL for the icon displayed.Typical usage might be to append a file type such as ".gif"
to the filename of the image.For editable fields, this property will also be passed through to any editors as FormItem.imageURLSuffix . |
int |
getImageWidth()
Width of images shown for fieldTypes image and imageFile in this field.
|
java.lang.String |
getIncludeFrom()
Indicates this field's values should be fetched from another, related DataSource.
|
java.lang.Boolean |
getIncludeInRecordSummary()
If a listGrid is showing a field of type summary, should this field be passed to the recordSummaryFunction when
calculating the summary value to display.
|
java.lang.String[] |
getIncludeInRecordSummaryFields()
If this listGrid has any fields of type
"summary" and this field will be included in summary calculations by default,
this attribute provides an opportunity to explicitly specify which summary fields the record should be displayed in. |
java.lang.Object |
getInitialValue()
In an editable ListGrid, initial value for this field when the user begins editing a new record.
|
java.lang.Boolean |
getIsRemoveField()
If set to true and
ListGrid.canRemoveRecords is
true, this field will be rendered as the remove-field for this grid. |
java.lang.String |
getLinkText()
The HTML to display in cells of this field if the fieldType is set to link.
|
java.lang.String |
getLinkTextProperty()
Name of the property in a ListGridRecord that holds the HTML to display in cells of this field if the fieldType is set
to "link".
|
java.lang.String |
getLinkURLPrefix()
If this field has type [
ListGridFieldType ] set to "link" , setting this
property will apply a standard prefix to the link URL for cells in this field. |
java.lang.String |
getLinkURLSuffix()
If this field has type [
ListGridFieldType ] set to "link" , setting this
property will apply a standard suffix to the link URL for cells in this field. |
ListGrid |
getListGrid()
Return the live ListGrid instance to which this ListGridField is assigned.
|
java.lang.Integer |
getMaxWidth()
When
ListGrid.showHeader is false and a field is subject
to autofitting (see ListGrid.autoFitFieldWidths ), sets the maximum width of the field. |
java.lang.Integer |
getMinWidth()
When a field is subject to autofitting (see
ListGrid.autoFitFieldWidths ), sets the minimum width of the field. |
java.lang.Boolean |
getMultiple()
Indicates that this field should always be Array-valued.
|
java.lang.String |
getName()
Name of this field.
|
java.lang.String |
getOperator()
This value is managed by the menu item titled
"Filter using"
in the headerContextMenu that appears when
allowFilterOperators has been set to true. |
Criteria |
getOptionCriteria()
If
optionDataSource is set for this
ListGridField, criteria specified in this attribute will be passed to the dataSource when performing the fetch operation
to determine data-value to display-value mappings |
DSRequest |
getOptionFilterContext()
If this field has an optionDataSource specified and
autoFetchDisplayMap is set, this attribute
provides a way to customize the dataSource request issued to fetch the display map from
the option dataSource. |
java.lang.String |
getOptionOperationId()
If this field has an optionDataSource specified and
autoFetchDisplayMap is set, this attribute
provides a way to customize the DSRequest.operationId passed
to dataSource.fetchData() when retrieving the display map from the option dataSource. |
TextMatchStyle |
getOptionTextMatchStyle()
For fields with an
optionDataSource , where
autoFetchDisplayMap is true, this property
will govern the textMatchStyle attribute of the DSRequest parameter passed
to DataSource.fetchData() when retrieving the remote data set to
be used as a basis for this field's valueMap. |
static ListGridField |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.Boolean |
getPartialSummary()
Only applies to fields of type
"summary" . |
java.lang.String |
getPendingAsyncCellValue()
A field-specific value to display for cells whose value is pending asynchronous generation.
|
java.lang.String |
getPrompt()
Causes a tooltip hover to appear on the header generated for this field (effectively sets
Canvas.prompt for the header). |
RecordSummaryFunctionType |
getRecordSummaryFunction()
Only applies to fields of type
"summary" . |
java.lang.Boolean |
getRequired()
When the user edits cells in this field, is this value required to be non-empty in order for validation to pass.
Note: for databound listGrids, this property may be specified on the DataSourceField ,
enabling both client and server side validation. |
java.lang.Boolean |
getRotateTitle()
Whether to rotate the field's title so it's rendered vertically from bottom to top.
|
java.lang.Boolean |
getSelectCellTextOnClick()
Should the cell content be natively selected (ready for copying to clip-board) on click?
|
java.lang.Boolean |
getShouldPrint()
Whether this field should be included in the printable representation of the grid.
|
java.lang.Boolean |
getShowAlternateStyle()
When set to false, don't apply alternate-row styling to this field.
|
java.lang.Boolean |
getShowDefaultContextMenu()
When set to false, this field will not show a context menu in its header.
|
java.lang.Boolean |
getShowDisabledIcon()
If using an icon for this button, whether to switch the icon image if the button becomes disabled.
|
java.lang.Boolean |
getShowDownIcon()
If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.
|
java.lang.Boolean |
getShowEllipsisWhenClipped()
Should ellipses be displayed when this field's cell content is clipped? To set this property at the grid level, use
ListGrid.showEllipsisWhenClipped |
java.lang.Boolean |
getShowFileInline()
For a field of type:"imageFile", indicates whether to stream the image and display it inline or to display the View and
Download icons.
|
java.lang.Boolean |
getShowFilterEditorHovers()
When set to false, no hover is shown for the field editor in this field.
|
java.lang.Boolean |
getShowFocusedIcon()
If using an icon for this button, whether to switch the icon image when the button receives focus.
|
java.lang.Boolean |
getShowGridSummary()
If
ListGrid.showGridSummary is true, should this
field show a summary value. |
java.lang.Boolean |
getShowGroupSummary()
If
ListGrid.showGroupSummary is true, should this
field show a summary value in a summary row when the grid is grouped? If unset, this field will show a summary value in
the summary row if an explicit summaryFunction
is specified or if a default summary function is
defined for the specified field type. |
java.lang.Boolean |
getShowHilitesInGroupSummary()
Determines whether hiliting for this field is shown in a group summary.
|
java.lang.Boolean |
getShowHover()
Whether to show hovers for this field.
|
java.lang.Boolean |
getShowHoverComponents()
When set to true and showHover is also true for the field, shows a widget hovering at the mouse point.
|
java.lang.Boolean |
getShowRollOverIcon()
If using an icon for this button, whether to switch the icon image on mouse rollover.
|
java.lang.Boolean |
getShowSelectedIcon()
If using an icon for this button, whether to switch the icon image when the button becomes selected.
|
java.lang.Boolean |
getShowTitle()
This property may be set to
false to explicitly suppress display of the field title in the column header
button for the field. |
java.lang.Boolean |
getShowValueIconOnly()
If this field has a valueIcons property specified, setting this property causes the valueIcon for each value to be
displayed in the cell without also showing the record's value for the field.
|
java.lang.Boolean |
getSkipLineBreaks()
By default, when
escaping HTML , we convert line
breaks (\r\n, \r, and \n) to HTML <br> tags so that visible cell content respects the original break characters. |
java.lang.Boolean |
getSortByDisplayField()
For a field with
displayField configured, should
client-side sorting be performed on the display field value? Unless explicitly set to false , the display
field value is used. |
java.lang.Boolean |
getSortByMappedValue()
|
SortDirection |
getSortDirection()
Specifies the default sorting direction for this column.
|
java.lang.String |
getSpannedHeaderBaseStyle()
Custom base style to apply to this field's header button instead of
ListGrid.spannedHeaderBaseStyle when the grid is
showing header spans. |
java.lang.String |
getSummaryTitle()
Deprecated.
Rather than customizing the summaryTitle developers should typically use the
headerTitle attribute to show a different title in the
column header button than the title used elsewhere. |
java.lang.String |
getSummaryValue()
The value to display for a ListGridField when it appears in the
summaryRow . |
java.lang.String |
getSummaryValueTitle()
If
ListGrid.showGridSummary or ListGrid.showGroupSummary is true and the summaryFunction is set to "title" , this
attribute may be set to a string to display in the group and/or grid summary. |
java.lang.Boolean |
getSuppressValueIcon()
If this field has a valueIcons property specified, setting this property to true will prevent the valueIcon being
written out into this field's cells.
|
java.lang.String |
getTarget()
By default, clicking a link rendered by this item opens it in a new browser window.
|
TimeDisplayFormat |
getTimeFormatter()
Time-format to apply to date type values within this field.
|
java.lang.String |
getTitle()
A title for this field, to display in the header for the field and in other contexts such as the
menu for picking visible fields . |
ListGridFieldType |
getType()
ListGrids picks a renderer for the view and edit mode of a field based on this attribute.
|
UserFormula |
getUserFormula()
Formula definition for this field.
|
UserSummary |
getUserSummary()
Summary definition for this field.
|
java.lang.Boolean |
getValidateOnChange()
If set to true, any
validators for this field will
be run whenever the value of the field is changed. |
VerticalAlignment |
getValign()
Specifies vertical alignment in the column header for this field: "top", "center", or "bottom".
|
java.lang.String |
getValueField()
Specifies the
optionDataSource field used to
retrieve the stored values that are to be mapped to the display values (specified by displayField ). |
java.lang.Integer |
getValueIconHeight()
Height for value icons for this listGrid field.
|
java.lang.Integer |
getValueIconLeftPadding()
How much padding should there be on the left of valueIcons for this field Overrides
ListGrid.valueIconLeftPadding |
java.lang.String |
getValueIconOrientation()
If we're showing a valueIcon for this field should it appear to the left or the right of the text? By default the icon
will appear to the left of the textual value - set this to "right" to show the icon on the right of the text.
|
java.lang.Integer |
getValueIconRightPadding()
How much padding should there be on the right of valueIcons for this field Overrides
ListGrid.valueIconRightPadding |
java.lang.Integer |
getValueIconSize()
Default width and height of value icons in this field.
|
java.lang.Integer |
getValueIconWidth()
Width for value icons for this listGrid field.
|
Criteria |
getVisibleWhen()
Criteria to be evaluated to determine whether this field should be visible.
|
java.lang.String |
getWidth()
The width of this field, specified as either an absolute number of pixels,
a percentage of the remaining space like "25%", or "*" to split remaining space among
all fields which have "*".
|
java.lang.Boolean |
getWrap()
Should the field title wrap if there is not enough space horizontally to accommodate it.
|
ListGridField |
setAIFieldRequest(AIFieldRequest aiFieldRequest)
The settings that configure requests to AI to generate the values for this field.
|
ListGridField |
setAiHoverContentsPrefix(java.lang.String aiHoverContentsPrefix)
If set to a non-
null value, override of ListGrid.aiHoverContentsPrefix for this field. |
ListGridField |
setAIHoverRequest(AIHoverRequest aiHoverRequest)
If set and AI is
enabled , the settings that configure requests to AI to
generate the contents of the hover displayed when the user hovers the mouse pointer over a cell of the field. |
void |
setAlign(Alignment align)
Horizontal alignment for field's column header: "left", "right" or "center".
|
ListGridField |
setAllowFilterExpressions(java.lang.Boolean allowFilterExpressions)
Field-level setting for
ListGrid.allowFilterExpressions :true - controls whether search expressions can be entered directly into the filter
item for this field. |
ListGridField |
setAllowFilterOperators(java.lang.Boolean allowFilterOperators)
Per-field setting for
ListGrid.allowFilterOperators . |
ListGridField |
setAlwaysShowOperatorIcon(java.lang.Boolean alwaysShowOperatorIcon)
Per-field setting for
ListGrid.alwaysShowOperatorIcon . |
ListGridField |
setApplyAfterSummary(java.lang.Boolean applyAfterSummary)
If
userFormula is set for this field, and this
grid is showing group summaries or a grid summary , this property determines what field value
should be present in those summary rows. |
ListGridField |
setArrowKeyEditAction(ArrowKeyEditAction arrowKeyEditAction)
What to do when a user hits arrow key while editing this field?
See ListGrid.getArrowKeyEditAction() . |
ListGridField |
setAsyncErrorCellValue(java.lang.String asyncErrorCellValue)
A field-specific value to display for cells when an error occurred during asynchronous generation.
|
ListGridField |
setAsyncMissingCellValue(java.lang.String asyncMissingCellValue)
A field-specific value to display for cells whose value was not generated by the previous asynchronous operation to
generate it, or will not be generated by an asynchronous operation due to currently being disabled.
|
ListGridField |
setAutoComplete(AutoComplete autoComplete)
Whether to allow browser autoComplete when editing this field.
|
ListGridField |
setAutoFetchDisplayMap(java.lang.Boolean autoFetchDisplayMap)
If true, automatically fetches records and derives a valueMap from
optionDataSource . |
ListGridField |
setAutoFit(AutoFitWidthApproach autoFit)
When set, this attribute causes this field to be auto-sized directly by effectively setting
autoFitWidth to true and applying an autoFitWidthApproach . |
ListGridField |
setAutoFitWidth(java.lang.Boolean autoFitWidth)
Should this listGrid field autofit its width to either titles or content?
|
ListGridField |
setAutoFitWidthApproach(AutoFitWidthApproach autoFitWidthApproach)
When a user requests column autofitting via the
header contextMenu or via a mouse gesture , what autofit approach is used. |
ListGridField |
setAutoFreeze(java.lang.Boolean autoFreeze)
Whether this field should be automatically frozen when other fields are frozen.
|
ListGridField |
setBaseStyle(java.lang.String baseStyle)
Custom base style to apply to all cells in this field instead of
ListGrid.baseStyle To override the baseStyle at the row level,
use record[listGrid.recordBaseStyleProperty] instead. |
ListGridField |
setCanAutoFitWidth(java.lang.Boolean canAutoFitWidth)
Should the user be allowed to perform one-time autofitting of this field via a header context-menu option?
|
ListGridField |
setCanDragResize(java.lang.Boolean canDragResize)
Whether this field can be dragResized using the mouse.
|
ListGridField |
setCanEdit(java.lang.Boolean canEdit)
This property establishes default editability for the field.
|
ListGridField |
setCanEditAISummary(java.lang.Boolean canEditAISummary)
Can this AI summary or sort field be edited from the header context menu? Setting this property to
false
prevents editing by the user. |
ListGridField |
setCanEditFormula(java.lang.Boolean canEditFormula)
Can formula be edited from header context menu? Setting attribute to
false prevents editing. |
ListGridField |
setCanEditSummary(java.lang.Boolean canEditSummary)
Can summary be edited from header context menu? Setting attribute to
false prevents editing. |
ListGridField |
setCanExport(java.lang.Boolean canExport)
Dictates whether the data in this field be exported.
|
ListGridField |
setCanFilter(java.lang.Boolean canFilter)
If showing a filter row for this ListGrid, should the filter criteria for this field be editable
|
ListGridField |
setCanFreeze(java.lang.Boolean canFreeze)
Whether this field should display freezing/unfreezing options in its header context menu.
|
ListGridField |
setCanGroupBy(java.lang.Boolean canGroupBy)
Determines whether this field will be groupable in the header context menu.
|
ListGridField |
setCanHide(java.lang.Boolean canHide)
If set to false, this field will be omitted from the column picker that appears in the header context menu when
ListGrid.canPickFields is enabled. |
ListGridField |
setCanHilite(java.lang.Boolean canHilite)
Determines whether this field can be hilited.
|
ListGridField |
setCanReorder(java.lang.Boolean canReorder)
Whether this field can be reordered using the mouse.
|
ListGridField |
setCanSort(java.lang.Boolean canSort)
Enables or disables sorting by this column.
|
ListGridField |
setCanSortClientOnly(java.lang.Boolean canSortClientOnly)
When true, this field can only be used for sorting if the data is entirely client-side.
|
ListGridField |
setCanToggle(java.lang.Boolean canToggle)
Allows a boolean or
valueMapped field to be edited without going into edit
mode. |
ListGridField |
setCellAlign(Alignment cellAlign)
Horizontal alignment for cells in this field's column: "left", "right" or "center".
If null, alignment is derived from align . |
void |
setCellFormatter(CellFormatter formatter)
Sets a formatter that returns the HTML to display in each cell of the field,
given the raw cell value.
|
ListGridField |
setCellIcon(java.lang.String cellIcon)
For a field of type:"icon" only, set the icon that appears in body cells.
|
ListGridField |
setCellPrompt(java.lang.String cellPrompt)
HTML to show in a hover over cells in this field.
|
ListGridField |
setDataPath(java.lang.String dataPath)
dataPath for this field.
|
ListGridField |
setDateFormatter(DateDisplayFormat dateFormatter)
Display format to use for date type values within this field.
|
ListGridField |
setDecimalPad(java.lang.Integer decimalPad)
Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.
|
ListGridField |
setDecimalPrecision(java.lang.Integer decimalPrecision)
Applies only to fields of type "float" and affects how many significant digits are shown.
|
void |
setDefaultFilterValue(java.lang.Boolean defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.
|
void |
setDefaultFilterValue(java.util.Date defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.
|
void |
setDefaultFilterValue(java.lang.Float defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.
|
void |
setDefaultFilterValue(java.lang.Integer defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.
|
void |
setDefaultFilterValue(java.lang.String defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.
|
ListGridField |
setDefaultGroupingMode(java.lang.String defaultGroupingMode)
Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and
field.groupingMode is unset. |
ListGridField |
setDefaultIconSrc(java.lang.String defaultIconSrc)
If this field is editable, this property will be passed to editors displayed for cells within this field as
FormItem.defaultIconSrc . |
void |
setDefaultValue(java.lang.Boolean defaultValue)
If this field
can be edited ,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid. |
void |
setDefaultValue(java.util.Date defaultValue)
If this field
can be edited ,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid. |
void |
setDefaultValue(java.lang.Float defaultValue)
If this field
can be edited ,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid. |
void |
setDefaultValue(java.lang.Integer defaultValue)
If this field
can be edited ,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid. |
void |
setDefaultValue(java.lang.Long defaultValue)
If this field
can be edited ,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid. |
void |
setDefaultValue(java.lang.String defaultValue)
If this field
can be edited ,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid. |
ListGridField |
setDefaultWidth(java.lang.Integer defaultWidth)
Optional "default width" for this field.
|
ListGridField |
setDisplayField(java.lang.String displayField)
Specifies the
optionDataSource field used to
retrieve the display values that are to be mapped from the internal values specified by valueField . |
ListGridField |
setDisplayValueFromRecord(java.lang.Boolean displayValueFromRecord)
If a
displayField is set, should this field show
record values from the displayField ? |
ListGridField |
setEditorFormula(UserFormula editorFormula)
|
ListGridField |
setEditorIconHeight(java.lang.Integer editorIconHeight)
If this field is editable, this property will be passed to editors displayed for cells within this field as
FormItem.iconHeight .If this property unset, the iconHeight property from the editor can be picked up from iconHeight instead. |
ListGridField |
setEditorIconWidth(java.lang.Integer editorIconWidth)
If this field is editable, this property will be passed to editors displayed for cells within this field as
FormItem.iconWidth .If this property unset, the iconWidth property from the editor can be picked up from iconWidth instead. |
ListGridField |
setEditorImageURLPrefix(java.lang.String editorImageURLPrefix)
When some cell in this field is being edited, this property can be used to apply an explicit
FormItem.imageURLPrefix to the editor in question. |
ListGridField |
setEditorImageURLSuffix(java.lang.String editorImageURLSuffix)
When some cell in this field is being edited, this property can be used to apply an explicit
FormItem.imageURLSuffix to the editor in question. |
void |
setEditorProperties(FormItem editorProperties)
Set the default
FormItem properties to be used whenever this field is edited. |
ListGridField |
setEditorTextFormula(UserSummary editorTextFormula)
|
void |
setEditorType(java.lang.Class<? extends FormItem> editorType)
The
FormItem class to be used when this field is edited. |
void |
setEditorType(FormItem editorType)
Deprecated.
Renamed to
setEditorProperties(FormItem) . You can also consider using
setEditorType(Class) or setEditorType(String) instead. |
void |
setEditorType(java.lang.String editorType)
The
FormItem class to be used when this field is edited. |
ListGridField |
setEditorValueIconHeight(java.lang.Integer editorValueIconHeight)
When some cell in this field is being edited, setting this property will specify the height for value icons in the
cell's editor.
|
ListGridField |
setEditorValueIcons(java.util.Map<java.lang.String,java.lang.String> editorValueIcons)
When some cell in this field is being edited, setting this property will specify the value icons to display in the
cell's editor.
|
ListGridField |
setEditorValueIconWidth(java.lang.Integer editorValueIconWidth)
When some cell in this field is being edited, setting this property will specify the width for value icons in the cell's
editor.
|
ListGridField |
setEditorValueMap(java.util.Map editorValueMap)
A valueMap to use for editors shown for this field.
|
void |
setEditorValueMapFunction(EditorValueMapFunction editorValueMapFunction)
This function method will be called from ListGrid.getEditorValueMap() and the resulting valueMap will be used instead of any static specified valueMap for the field.
|
void |
setEditValueFormatter(CellEditValueFormatter formatter)
Return the value to display in cells of this field which are being edited.
|
void |
setEditValueParser(CellEditValueParser parser)
Method used to convert the value displayed in an editor for some cell in this field into a raw value for saving.
|
ListGridField |
setEmptyCellValue(java.lang.String emptyCellValue)
The value to display for a cell whose value is null or the empty string after applying
formatting and valueMap (if any). |
ListGridField |
setEnableWhen(Criteria enableWhen)
Criteria to be evaluated to determine whether this field should be enabled.
|
ListGridField |
setEnterKeyEditAction(EnterKeyEditAction enterKeyEditAction)
What to do when a user hits enter while editing this field?
Overrides the enterKeyEditAction as
specified at the listGrid level while focus is in this field. |
ListGridField |
setEscapeHTML(java.lang.Boolean escapeHTML)
By default HTML values in ListGrid cells will be interpreted by the browser.
|
ListGridField |
setEscapeKeyEditAction(EscapeKeyEditAction escapeKeyEditAction)
What to do when a user hits escape while editing this field?
Overrides the escapeKeyEditAction as
specified at the listGrid level while focus is in this field. |
ListGridField |
setExcludeFromState(java.lang.Boolean excludeFromState)
If true, then this field is excluded from the bound component's view state.
|
ListGridField |
setExportFieldWidth(boolean exportFieldWidth)
When exporting data to Excel/OpenOffice format using
ListGrid.exportData() or ListGrid.exportClientData()
with ListGrid.exportFieldWidths set, set this
flag false to cause this field to "opt out" of width export. |
ListGridField |
setExportFormat(java.lang.String exportFormat)
FormatString used during exports for numeric or date formatting. |
ListGridField |
setExportRawNumbers(java.lang.Boolean exportRawNumbers)
Dictates whether numeric values should be exported as raw numbers instead of formatted values when using
exportClientData() . |
ListGridField |
setExportRawValues(java.lang.Boolean exportRawValues)
Dictates whether the data in this field should be exported raw by
exportClientData() . |
void |
setFilterEditorProperties(FormItem filterEditorProperties)
If this ListGrid is showing a filter row (showFilterEditor : true), this property can
be used to specify properties for the appropriate filter form item.
|
void |
setFilterEditorType(java.lang.Class<? extends FormItem> editorType)
If this ListGrid is showing a filter row, this property can be used to specify the
FormItem class to use for the filter form item associated with this field. |
void |
setFilterEditorType(FormItem filterEditorType)
Deprecated.
Renamed to
setFilterEditorProperties(FormItem) . You can also consider using
setFilterEditorType(Class) or setFilterEditorType(String) instead. |
void |
setFilterEditorType(java.lang.String editorType)
If this ListGrid is showing a filter row, this property can be used to specify the
FormItem class to use for the filter form item associated with this field. |
ListGridField |
setFilterEditorValueMap(java.util.Map filterEditorValueMap)
If this listGrid is showing a filter row, this property can be used to specify a mapping of internal data to/from
display values to be in the appropriate filter row form item.
|
ListGridField |
setFilterOnKeypress(java.lang.Boolean filterOnKeypress)
If set this will override the
filterOnKeypress
setting at the grid level |
ListGridField |
setFilterOperator(OperatorId filterOperator)
With the
FilterEditor showing, the default Operator to use when matching values for this field. |
ListGridField |
setFormat(java.lang.String format)
FormatString for numeric or date formatting. |
ListGridField |
setFrozen(java.lang.Boolean frozen)
Whether this field should be "frozen" for the purposes of horizontal scrolling.
|
void |
setGridSummaryCustomizer(GridSummaryCustomizer gridSummaryCustomizer) |
ListGridField |
setGroupGranularity(java.lang.Integer groupGranularity)
Granularity of grouping for numeric fields.
|
ListGridField |
setGroupingMode(java.lang.String groupingMode)
For a field that allows multiple
grouping modes ,
the current grouping mode. |
ListGridField |
setGroupingModes(java.util.Map groupingModes)
If this field can be grouped, this attribute represents the set of grouping styles that are available.
|
ListGridField |
setGroupPrecision(java.lang.Integer groupPrecision)
For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping.
|
void |
setGroupSummaryCustomizer(GroupSummaryCustomizer groupSummaryCustomizer) |
void |
setGroupTitleRenderer(GroupTitleRenderer groupTitleRenderer)
Renderer that returns the title that should be shown to the user for the group with the groupValue passed as a parameter.
|
void |
setGroupValueFunction(GroupValueFunction groupValueFunction)
Function that returns the value which records should be grouped by.
|
ListGridField |
setHeaderBaseStyle(java.lang.String headerBaseStyle)
Custom base style to apply to this field's header button instead of
ListGrid.headerBaseStyle .Note that depending on the header button constructor, you may have to override headerTitleStyle as well. |
ListGridField |
setHeaderButtonAriaRole(java.lang.String headerButtonAriaRole)
Aria role for the header button for this field. |
ListGridField |
setHeaderButtonAriaState(java.util.Map headerButtonAriaState)
Aria state for the header button for this field. |
void |
setHeaderButtonProperties(Canvas buttonProperties)
Set the properties of the header button used for this field.
|
ListGridField |
setHeaderHoverDelay(java.lang.Integer headerHoverDelay)
Delay in ms for hovers shown over this field's header.
|
ListGridField |
setHeaderTitle(java.lang.String headerTitle)
Optional title for the header button for this field.
|
ListGridField |
setHeaderTitleStyle(java.lang.String headerTitleStyle)
Custom titleStyle to apply to this field's header button instead of
ListGrid.headerTitleStyle .Note that this will typically only have an effect if ListGrid.headerButtonConstructor is set to StretchImgButton or a subclass thereof. |
ListGridField |
setHidden(java.lang.Boolean hidden)
Marks field as initially hidden.
The user will still be able to show the field via a context menu. |
ListGridField |
setHideOnPhone(java.lang.Boolean hideOnPhone)
Set this property to true to suppress showing this field on mobile phones (handset-sized devices).
|
ListGridField |
setHideOnTablet(java.lang.Boolean hideOnTablet)
Set this property to true to suppress showing this field on tablets (tablet-sized devices).
|
ListGridField |
setHiliteHTMLAfterFormat(java.lang.Boolean hiliteHTMLAfterFormat)
If set to true, custom HTML applied as part of hiliting will be applied after
formatting for each cell in this column. |
ListGridField |
setHiliteIconHeight(java.lang.Integer hiliteIconHeight)
Height for hilite icons for this field.
|
ListGridField |
setHiliteIconLeftPadding(java.lang.Integer hiliteIconLeftPadding)
How much padding should there be on the left of
hilite icons for this field? Overrides ListGrid.hiliteIconLeftPadding |
ListGridField |
setHiliteIconPosition(HiliteIconPosition hiliteIconPosition)
When
ListGrid.hiliteIcons are present, where the hilite
icon will be placed relative to the field value. |
ListGridField |
setHiliteIconRightPadding(java.lang.Integer hiliteIconRightPadding)
How much padding should there be on the right of
hilite icons for this field? Overrides ListGrid.hiliteIconRightPadding |
ListGridField |
setHiliteIconSize(java.lang.Integer hiliteIconSize)
Default width and height of
hilite icons in this field. |
ListGridField |
setHiliteIconWidth(java.lang.Integer hiliteIconWidth)
Width for hilite icons for this field.
|
void |
setHoverCustomizer(HoverCustomizer hoverCustomizer)
* HTML to be shown in hovers over cells in the column described by this field.
|
ListGridField |
setHoverDelay(java.lang.Integer hoverDelay)
Delay in ms for hovers shown for cells in this field.
|
ListGridField |
setHoverWidth(java.lang.Integer hoverWidth)
Specifies the width of the canvas shown when the mouse hovers over cells in this field.
|
ListGridField |
setHoverWrap(java.lang.Boolean hoverWrap)
This property may be set to customize the
wrap attribute for the canvas shown when the mouse hovers over
cells in this field. |
ListGridField |
setIcon(java.lang.String icon)
Optional icon to show next to the title for this field.
|
ListGridField |
setIconCursor(Cursor iconCursor)
Specifies the cursor to display when the mouse pointer is over an icon image in a cell for either a field of type
icon or a valueIcon . |
ListGridField |
setIconHeight(java.lang.Integer iconHeight)
If
icon is specified, this property can be used to
specify the height of the icon to be displayed in the ListGrid header button. |
ListGridField |
setIconOrientation(java.lang.String iconOrientation)
If this field is showing an icon, should it appear to the left or right of the title?
Valid options are "left" or "right" |
ListGridField |
setIcons(FormItemIcon... icons)
If this field is editable, this property can be used to specify
icons to be displayed in the editors displayed for this field |
ListGridField |
setIconSize(java.lang.Integer iconSize)
If
icon is specified, this property can be used to
specify the size of the icon to be displayed in the ListGrid header button. |
ListGridField |
setIconSpacing(int iconSpacing)
Pixels between icon and title text.
|
ListGridField |
setIconVAlign(java.lang.String iconVAlign)
If this field is editable, this property will be passed to editors displayed for cells within this field as
FormItem.iconVAlign . |
ListGridField |
setIconWidth(java.lang.Integer iconWidth)
If
icon is specified, this property can be used to
specify the width of the icon to be displayed in the ListGrid header button. |
ListGridField |
setIgnoreKeyboardClicks(java.lang.Boolean ignoreKeyboardClicks)
If the user is navigating through the grid using the keyboard, record click or double click events may be generated via
keyboard interactions (see
ListGrid.generateClickOnSpace , ListGrid.generateClickOnEnter , ListGrid.generateDoubleClickOnSpace , ListGrid.generateDoubleClickOnEnter and ListGrid.arrowKeyAction ). |
ListGridField |
setImageHeight(int imageHeight)
Height of image shown for fieldTypes image and imageFile in this field.
|
ListGridField |
setImageSize(int imageSize)
Size of images shown for fieldTypes image and imageFile in this field.
|
ListGridField |
setImageURLPrefix(java.lang.String imageURLPrefix)
If this field has type [
ListGridFieldType ] set to "image" and the URL for
the image displayed is not absolute, the path of the URL will be relative to this stringAlternatively, if this field displays any valueIcons, this prefix will be applied to the beginning of any valueIcons when determining the URL for the image. |
ListGridField |
setImageURLSuffix(java.lang.String imageURLSuffix)
If any cells in this field are showing a value icon (see:
valueIcons ) or this is has ListGridFieldType set to "image" , the value of this property will be appended to
the end of the URL for the icon displayed.Typical usage might be to append a file type such as ".gif"
to the filename of the image.For editable fields, this property will also be passed through to any editors as FormItem.imageURLSuffix . |
ListGridField |
setImageWidth(int imageWidth)
Width of images shown for fieldTypes image and imageFile in this field.
|
void |
setImgDir(java.lang.String imgDir)
Deprecated.
Renamed to
setImageURLPrefix(String) |
void |
setInactiveCellFormatter(CellFormatter formatter)
Field-level formatter for inactive content.
|
ListGridField |
setIncludeFrom(java.lang.String includeFrom)
Indicates this field's values should be fetched from another, related DataSource.
|
ListGridField |
setIncludeInRecordSummary(java.lang.Boolean includeInRecordSummary)
If a listGrid is showing a field of type summary, should this field be passed to the recordSummaryFunction when
calculating the summary value to display.
|
ListGridField |
setIncludeInRecordSummaryFields(java.lang.String... includeInRecordSummaryFields)
If this listGrid has any fields of type
"summary" and this field will be included in summary calculations by default,
this attribute provides an opportunity to explicitly specify which summary fields the record should be displayed in. |
ListGridField |
setInitialValue(java.lang.Object initialValue)
In an editable ListGrid, initial value for this field when the user begins editing a new record.
|
ListGridField |
setIsRemoveField(java.lang.Boolean isRemoveField)
If set to true and
ListGrid.canRemoveRecords is
true, this field will be rendered as the remove-field for this grid. |
ListGridField |
setLeaveHeaderMenuButtonSpace(java.lang.Boolean leaveHeaderMenuButtonSpace)
If
ListGrid.showHeaderMenuButton is true, when
auto-fitting fields to the title width via ListGrid.autoFitFieldWidths or autoFitWidth ,
should the button be sized such that there is enough space for the header menu button to show without covering the field
title? |
ListGridField |
setLinkText(java.lang.String linkText)
The HTML to display in cells of this field if the fieldType is set to link.
|
ListGridField |
setLinkTextProperty(java.lang.String linkTextProperty)
Name of the property in a ListGridRecord that holds the HTML to display in cells of this field if the fieldType is set
to "link".
|
ListGridField |
setLinkURLPrefix(java.lang.String linkURLPrefix)
If this field has type [
ListGridFieldType ] set to "link" , setting this
property will apply a standard prefix to the link URL for cells in this field. |
ListGridField |
setLinkURLSuffix(java.lang.String linkURLSuffix)
If this field has type [
ListGridFieldType ] set to "link" , setting this
property will apply a standard suffix to the link URL for cells in this field. |
ListGridField |
setMaxWidth(java.lang.Integer maxWidth)
When
ListGrid.showHeader is false and a field is subject
to autofitting (see ListGrid.autoFitFieldWidths ), sets the maximum width of the field. |
ListGridField |
setMinWidth(java.lang.Integer minWidth)
When a field is subject to autofitting (see
ListGrid.autoFitFieldWidths ), sets the minimum width of the field. |
ListGridField |
setMultiple(java.lang.Boolean multiple)
Indicates that this field should always be Array-valued.
|
ListGridField |
setName(java.lang.String name)
Name of this field.
|
ListGridField |
setOptionCriteria(Criteria optionCriteria)
If
optionDataSource is set for this
ListGridField, criteria specified in this attribute will be passed to the dataSource when performing the fetch operation
to determine data-value to display-value mappings |
ListGridField |
setOptionDataSource(DataSource optionDataSource)
Derive a
com.smartgwt.client.types.ValueMap by fetching records from another DataSource and extracting the
valueField and displayField in the loaded records, to derive one
valueMap entry per record loaded from the optionDataSource. |
void |
setOptionFilterContext(DSRequest optionFilterContext)
If this field has an optionDataSource specified and
autoFetchDisplayMap is set, this attribute
provides a way to customize the dataSource request issued to fetch the display map from
the option dataSource. |
ListGridField |
setOptionOperationId(java.lang.String optionOperationId)
If this field has an optionDataSource specified and
autoFetchDisplayMap is set, this attribute
provides a way to customize the DSRequest.operationId passed
to dataSource.fetchData() when retrieving the display map from the option dataSource. |
ListGridField |
setOptionTextMatchStyle(TextMatchStyle optionTextMatchStyle)
For fields with an
optionDataSource , where
autoFetchDisplayMap is true, this property
will govern the textMatchStyle attribute of the DSRequest parameter passed
to DataSource.fetchData() when retrieving the remote data set to
be used as a basis for this field's valueMap. |
ListGridField |
setPartialSummary(java.lang.Boolean partialSummary)
Only applies to fields of type
"summary" . |
ListGridField |
setPendingAsyncCellValue(java.lang.String pendingAsyncCellValue)
A field-specific value to display for cells whose value is pending asynchronous generation.
|
ListGridField |
setPrompt(java.lang.String prompt)
Causes a tooltip hover to appear on the header generated for this field (effectively sets
Canvas.prompt for the header). |
void |
setRecordSummaryFunction(RecordSummaryFunction recordSummaryFunction)
Only applies to fields of type
"summary" . |
void |
setRecordSummaryFunction(RecordSummaryFunctionType recordSummaryFunction)
Only applies to fields of type
"summary" . |
ListGridField |
setRequired(java.lang.Boolean required)
When the user edits cells in this field, is this value required to be non-empty in order for validation to pass.
Note: for databound listGrids, this property may be specified on the DataSourceField ,
enabling both client and server side validation. |
ListGridField |
setRotateTitle(java.lang.Boolean rotateTitle)
Whether to rotate the field's title so it's rendered vertically from bottom to top.
|
ListGridField |
setSelectCellTextOnClick(java.lang.Boolean selectCellTextOnClick)
Should the cell content be natively selected (ready for copying to clip-board) on click?
|
ListGridField |
setShouldPrint(java.lang.Boolean shouldPrint)
Whether this field should be included in the printable representation of the grid.
|
ListGridField |
setShowAlternateStyle(java.lang.Boolean showAlternateStyle)
When set to false, don't apply alternate-row styling to this field.
|
ListGridField |
setShowDefaultContextMenu(java.lang.Boolean showDefaultContextMenu)
When set to false, this field will not show a context menu in its header.
|
ListGridField |
setShowDisabledIcon(java.lang.Boolean showDisabledIcon)
If using an icon for this button, whether to switch the icon image if the button becomes disabled.
|
ListGridField |
setShowDownIcon(java.lang.Boolean showDownIcon)
If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.
|
ListGridField |
setShowEllipsisWhenClipped(java.lang.Boolean showEllipsisWhenClipped)
Should ellipses be displayed when this field's cell content is clipped? To set this property at the grid level, use
ListGrid.showEllipsisWhenClipped |
ListGridField |
setShowFileInline(java.lang.Boolean showFileInline)
For a field of type:"imageFile", indicates whether to stream the image and display it inline or to display the View and
Download icons.
|
ListGridField |
setShowFilterEditorHovers(java.lang.Boolean showFilterEditorHovers)
When set to false, no hover is shown for the field editor in this field.
|
ListGridField |
setShowFocusedIcon(java.lang.Boolean showFocusedIcon)
If using an icon for this button, whether to switch the icon image when the button receives focus.
|
ListGridField |
setShowGridSummary(java.lang.Boolean showGridSummary)
If
ListGrid.showGridSummary is true, should this
field show a summary value. |
ListGridField |
setShowGroupSummary(java.lang.Boolean showGroupSummary)
If
ListGrid.showGroupSummary is true, should this
field show a summary value in a summary row when the grid is grouped? If unset, this field will show a summary value in
the summary row if an explicit summaryFunction
is specified or if a default summary function is
defined for the specified field type. |
ListGridField |
setShowHilitesInGroupSummary(java.lang.Boolean showHilitesInGroupSummary)
Determines whether hiliting for this field is shown in a group summary.
|
ListGridField |
setShowHover(java.lang.Boolean showHover)
Whether to show hovers for this field.
|
ListGridField |
setShowHoverComponents(java.lang.Boolean showHoverComponents)
When set to true and showHover is also true for the field, shows a widget hovering at the mouse point.
|
void |
setShowIfCondition(ListGridFieldIfFunction showIf)
A function, if provided, is evaluated to conditionally determine whether this field should be displayed.
|
ListGridField |
setShowRollOverIcon(java.lang.Boolean showRollOverIcon)
If using an icon for this button, whether to switch the icon image on mouse rollover.
|
ListGridField |
setShowSelectedIcon(java.lang.Boolean showSelectedIcon)
If using an icon for this button, whether to switch the icon image when the button becomes selected.
|
ListGridField |
setShowTitle(java.lang.Boolean showTitle)
This property may be set to
false to explicitly suppress display of the field title in the column header
button for the field. |
ListGridField |
setShowValueIconOnly(java.lang.Boolean showValueIconOnly)
If this field has a valueIcons property specified, setting this property causes the valueIcon for each value to be
displayed in the cell without also showing the record's value for the field.
|
ListGridField |
setSkipLineBreaks(java.lang.Boolean skipLineBreaks)
By default, when
escaping HTML , we convert line
breaks (\r\n, \r, and \n) to HTML <br> tags so that visible cell content respects the original break characters. |
ListGridField |
setSortByDisplayField(java.lang.Boolean sortByDisplayField)
For a field with
displayField configured, should
client-side sorting be performed on the display field value? Unless explicitly set to false , the display
field value is used. |
ListGridField |
setSortByMappedValue(java.lang.Boolean sortByMappedValue)
|
ListGridField |
setSortDirection(SortDirection sortDirection)
Specifies the default sorting direction for this column.
|
void |
setSortNormalizer(SortNormalizer normalizer)
Optional function to return the value that should be used when sorting this field.
|
ListGridField |
setSpannedHeaderBaseStyle(java.lang.String spannedHeaderBaseStyle)
Custom base style to apply to this field's header button instead of
ListGrid.spannedHeaderBaseStyle when the grid is
showing header spans. |
void |
setSummaryFunction(java.lang.String summaryFunction)
If
showGridSummary or showGroupSummary is true,
this method can be used to
specify the name of a summary function registered via SimpleType.registerSummaryFunction(java.lang.String, com.smartgwt.client.widgets.grid.SummaryFunction)
for calculating the summary value to display. |
void |
setSummaryFunction(SummaryFunction summaryFunction)
If
showGridSummary or showGroupSummary is true,
this method can be used to
specify a SummaryFunction
for calculating the summary value to display. |
void |
setSummaryFunction(SummaryFunctionType summaryFunction)
If
showGridSummary or showGroupSummary is true,
this method can be used to
specify a SummaryFunctionType
for calculating the summary value to display. |
ListGridField |
setSummaryTitle(java.lang.String summaryTitle)
Deprecated.
Rather than customizing the summaryTitle developers should typically use the
headerTitle attribute to show a different title in the
column header button than the title used elsewhere. |
ListGridField |
setSummaryValue(java.lang.String summaryValue)
The value to display for a ListGridField when it appears in the
summaryRow . |
ListGridField |
setSummaryValueTitle(java.lang.String summaryValueTitle)
If
ListGrid.showGridSummary or ListGrid.showGroupSummary is true and the summaryFunction is set to "title" , this
attribute may be set to a string to display in the group and/or grid summary. |
ListGridField |
setSuppressValueIcon(java.lang.Boolean suppressValueIcon)
If this field has a valueIcons property specified, setting this property to true will prevent the valueIcon being
written out into this field's cells.
|
ListGridField |
setTarget(java.lang.String target)
By default, clicking a link rendered by this item opens it in a new browser window.
|
ListGridField |
setTimeFormatter(TimeDisplayFormat timeFormatter)
Time-format to apply to date type values within this field.
|
ListGridField |
setTitle(java.lang.String title)
A title for this field, to display in the header for the field and in other contexts such as the
menu for picking visible fields . |
ListGridField |
setType(ListGridFieldType type)
ListGrids picks a renderer for the view and edit mode of a field based on this attribute.
|
ListGridField |
setType(SimpleType type)
Set the type directly to a defined SimpleType.
|
ListGridField |
setUserFormula(UserFormula userFormula)
Formula definition for this field.
|
ListGridField |
setUserSummary(UserSummary userSummary)
Summary definition for this field.
|
ListGridField |
setValidateOnChange(java.lang.Boolean validateOnChange)
If set to true, any
validators for this field will
be run whenever the value of the field is changed. |
ListGridField |
setValidators(Validator... validators)
Array of
Validator objects for this field. |
ListGridField |
setValign(VerticalAlignment valign)
Specifies vertical alignment in the column header for this field: "top", "center", or "bottom".
|
ListGridField |
setValueField(java.lang.String valueField)
Specifies the
optionDataSource field used to
retrieve the stored values that are to be mapped to the display values (specified by displayField ). |
ListGridField |
setValueIconHeight(java.lang.Integer valueIconHeight)
Height for value icons for this listGrid field.
|
ListGridField |
setValueIconLeftPadding(java.lang.Integer valueIconLeftPadding)
How much padding should there be on the left of valueIcons for this field Overrides
ListGrid.valueIconLeftPadding |
ListGridField |
setValueIconOrientation(java.lang.String valueIconOrientation)
If we're showing a valueIcon for this field should it appear to the left or the right of the text? By default the icon
will appear to the left of the textual value - set this to "right" to show the icon on the right of the text.
|
ListGridField |
setValueIconRightPadding(java.lang.Integer valueIconRightPadding)
How much padding should there be on the right of valueIcons for this field Overrides
ListGrid.valueIconRightPadding |
ListGridField |
setValueIcons(java.util.Map<java.lang.String,java.lang.String> valueIcons)
This property is a mapping from data values for this field to
urls for
icons to display for those data values. |
ListGridField |
setValueIconSize(java.lang.Integer valueIconSize)
Default width and height of value icons in this field.
|
ListGridField |
setValueIconWidth(java.lang.Integer valueIconWidth)
Width for value icons for this listGrid field.
|
ListGridField |
setValueMap(java.util.Map valueMap)
Array of legal values for this field, or an Object where each property maps a stored value to a user-displayable
value.
Note that if this field is editable (see ListGrid.canEdit , canEdit ), editors displayed for
this field will pick up their valueMap either from this value or from editorValueMap . |
ListGridField |
setValueMap(java.lang.String... valueMap)
Array of legal values for this field, or an Object where each property maps a stored value to a user-displayable
value.
Note that if this field is editable (see ListGrid.canEdit , canEdit ), editors displayed for
this field will pick up their valueMap either from this value or from editorValueMap . |
ListGridField |
setVisibleWhen(Criteria visibleWhen)
Criteria to be evaluated to determine whether this field should be visible.
|
void |
setWidth(int width)
The width of this field, specified as either an absolute number of pixels,
a percentage of the remaining space like "25%", or "*" to split remaining space among
all fields which have "*".
|
void |
setWidth(java.lang.String width)
The width of this field, specified as either an absolute number of pixels,
a percentage of the remaining space like "25%", or "*" to split remaining space among
all fields which have "*".
|
ListGridField |
setWrap(java.lang.Boolean wrap)
Should the field title wrap if there is not enough space horizontally to accommodate it.
|
getExportTitle, getSortByField, getValueMap, setExportTitle, setSortByField
getRef, getRef, internalSetID
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj
public ListGridField()
public ListGridField(com.google.gwt.core.client.JavaScriptObject jsObj)
public ListGridField(java.lang.String name)
public ListGridField(java.lang.String name, int width)
public ListGridField(java.lang.String name, java.lang.String title)
public ListGridField(java.lang.String name, java.lang.String title, int width)
public static ListGridField getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public ListGridField setAIFieldRequest(AIFieldRequest aiFieldRequest)
ListGrid.canAddAISummaryFields
). Note that setting an aiFieldRequest
will cause the default value of
escapeHTML
to be true
.
aiFieldRequest
- New aiFieldRequest value. Default value is nullListGridField
instance, for chaining setter callssetCanEditAISummary(java.lang.Boolean)
public AIFieldRequest getAIFieldRequest()
ListGrid.canAddAISummaryFields
). Note that setting an aiFieldRequest
will cause the default value of
escapeHTML
to be true
.
getCanEditAISummary()
public ListGridField setAiHoverContentsPrefix(java.lang.String aiHoverContentsPrefix)
null
value, override of ListGrid.aiHoverContentsPrefix
for this field.aiHoverContentsPrefix
- New aiHoverContentsPrefix value. Default value is nullListGridField
instance, for chaining setter callsHTMLString
public java.lang.String getAiHoverContentsPrefix()
null
value, override of ListGrid.aiHoverContentsPrefix
for this field.HTMLString
public ListGridField setAIHoverRequest(AIHoverRequest aiHoverRequest)
enabled
, the settings that configure requests to AI to
generate the contents of the hover displayed when the user hovers the mouse pointer over a cell of the field. Note:
showHover
must be true
on this field,
or ListGrid.showHover
must be true
on the
grid for the hovers to be displayed.
While an AI request to generate hover text is pending, ListGrid.placeholderAIHoverContents
is used as
the hover contents.
If the AI request is successful, then ListGrid.aiHoverContentsPrefix
is prepended to the
AI-generated hover text, which is always HTML-escaped.
If, however, the AI request is not successful, then the error
message (see SummarizeValueResult.errorMessage
)
will be displayed if available, otherwise the DataBoundComponent.defaultAsyncErrorHoverContents
will be displayed. Additionally, properties on the hover when
displaying error information can be specified with DataBoundComponent.asyncErrorHoverProperties
.
aiHoverRequest
- New aiHoverRequest value. Default value is nullListGridField
instance, for chaining setter callspublic AIHoverRequest getAIHoverRequest()
enabled
, the settings that configure requests to AI to
generate the contents of the hover displayed when the user hovers the mouse pointer over a cell of the field. Note:
showHover
must be true
on this field,
or ListGrid.showHover
must be true
on the
grid for the hovers to be displayed.
While an AI request to generate hover text is pending, ListGrid.placeholderAIHoverContents
is used as
the hover contents.
If the AI request is successful, then ListGrid.aiHoverContentsPrefix
is prepended to the
AI-generated hover text, which is always HTML-escaped.
If, however, the AI request is not successful, then the error
message (see SummarizeValueResult.errorMessage
)
will be displayed if available, otherwise the DataBoundComponent.defaultAsyncErrorHoverContents
will be displayed. Additionally, properties on the hover when
displaying error information can be specified with DataBoundComponent.asyncErrorHoverProperties
.
public ListGridField setAllowFilterExpressions(java.lang.Boolean allowFilterExpressions)
ListGrid.allowFilterExpressions
:true - controls whether search expressions can be entered directly into the filter
item for this field. You can also have parsing of the expression remove the operator symbol and apply it to an icon
in the editor., This attribute can also be
set at the ListGrid level
.
For a
discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview
.
allowFilterExpressions
- New allowFilterExpressions value. Default value is nullListGridField
instance, for chaining setter callsAdvanced Filtering
public java.lang.Boolean getAllowFilterExpressions()
ListGrid.allowFilterExpressions
:true - controls whether search expressions can be entered directly into the filter
item for this field. You can also have parsing of the expression remove the operator symbol and apply it to an icon
in the editor., This attribute can also be
set at the ListGrid level
.
For a
discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview
.
Advanced Filtering
public ListGridField setAllowFilterOperators(java.lang.Boolean allowFilterOperators)
ListGrid.allowFilterOperators
. Can be used to enable the filter operators UI for a particular field if the
ListGrid-level setting is not enabled, or to disable filter operators for a particular field if the ListGrid-level
setting is enabled. For a discussion of the various filtering and criteria-management APIs and when to use them, see
the Grid Filtering overview
.
allowFilterOperators
- New allowFilterOperators value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getAllowFilterOperators()
ListGrid.allowFilterOperators
. Can be used to enable the filter operators UI for a particular field if the
ListGrid-level setting is not enabled, or to disable filter operators for a particular field if the ListGrid-level
setting is enabled. For a discussion of the various filtering and criteria-management APIs and when to use them, see
the Grid Filtering overview
.
public ListGridField setAlwaysShowOperatorIcon(java.lang.Boolean alwaysShowOperatorIcon)
ListGrid.alwaysShowOperatorIcon
. Can be used to force a particular field to always show it's operatorIcon
, even if it has no filter-value, or is using
the default search operator
. For a
discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview
.
alwaysShowOperatorIcon
- New alwaysShowOperatorIcon value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getAlwaysShowOperatorIcon()
ListGrid.alwaysShowOperatorIcon
. Can be used to force a particular field to always show it's operatorIcon
, even if it has no filter-value, or is using
the default search operator
. For a
discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview
.
public ListGridField setApplyAfterSummary(java.lang.Boolean applyAfterSummary)
userFormula
is set for this field, and this
grid is showing group summaries
or a grid summary
, this property determines what field value
should be present in those summary rows. Should the field's user-formula be applied to the calculated summary row
(applyAfterSummary true
), or should a standard grid or group summary be applied to the user-formula values
displayed in the grid (applyAfterSummary false
)? Default behavior may be specified at the grid level
via ListGrid.applyFormulaAfterSummary
applyAfterSummary
- New applyAfterSummary value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getApplyAfterSummary()
userFormula
is set for this field, and this
grid is showing group summaries
or a grid summary
, this property determines what field value
should be present in those summary rows. Should the field's user-formula be applied to the calculated summary row
(applyAfterSummary true
), or should a standard grid or group summary be applied to the user-formula values
displayed in the grid (applyAfterSummary false
)? Default behavior may be specified at the grid level
via ListGrid.applyFormulaAfterSummary
public ListGridField setArrowKeyEditAction(ArrowKeyEditAction arrowKeyEditAction)
ListGrid.getArrowKeyEditAction()
.arrowKeyEditAction
- New arrowKeyEditAction value. Default value is nullListGridField
instance, for chaining setter callsGrid Editing
public ArrowKeyEditAction getArrowKeyEditAction()
ListGrid.getArrowKeyEditAction()
.Grid Editing
public ListGridField setAsyncErrorCellValue(java.lang.String asyncErrorCellValue)
If set, this will
override the grid-wide ListGrid.asyncErrorCellValue
setting for the field.
asyncErrorCellValue
- New asyncErrorCellValue value. Default value is nullListGridField
instance, for chaining setter callsHTMLString
public java.lang.String getAsyncErrorCellValue()
If set, this will
override the grid-wide ListGrid.asyncErrorCellValue
setting for the field.
HTMLString
public ListGridField setAsyncMissingCellValue(java.lang.String asyncMissingCellValue)
If set, this
will override the grid-wide ListGrid.asyncMissingCellValue
setting for the field.
asyncMissingCellValue
- New asyncMissingCellValue value. Default value is nullListGridField
instance, for chaining setter callsHTMLString
public java.lang.String getAsyncMissingCellValue()
If set, this
will override the grid-wide ListGrid.asyncMissingCellValue
setting for the field.
HTMLString
public ListGridField setAutoComplete(AutoComplete autoComplete)
If unset, defaults to listGrid.autoComplete
autoComplete
- New autoComplete value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setAutoComplete(com.smartgwt.client.types.AutoComplete)
public AutoComplete getAutoComplete()
If unset, defaults to listGrid.autoComplete
ListGrid.getAutoComplete()
public ListGridField setAutoFetchDisplayMap(java.lang.Boolean autoFetchDisplayMap)
optionDataSource
. Same as ListGrid.autoFetchDisplayMap
, but defined on a
per-field basis.
autoFetchDisplayMap
- New autoFetchDisplayMap value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setAutoFetchDisplayMap(java.lang.Boolean)
public java.lang.Boolean getAutoFetchDisplayMap()
optionDataSource
. Same as ListGrid.autoFetchDisplayMap
, but defined on a
per-field basis.
ListGrid.getAutoFetchDisplayMap()
public ListGridField setAutoFit(AutoFitWidthApproach autoFit)
autoFitWidth
to true and applying an autoFitWidthApproach
. This direct approach is
different from and less verbose than applying similar properties
on the grid
and overriding them on a per-field
basis.autoFit
- New autoFit value. Default value is nullListGridField
instance, for chaining setter callspublic AutoFitWidthApproach getAutoFit()
autoFitWidth
to true and applying an autoFitWidthApproach
. This direct approach is
different from and less verbose than applying similar properties
on the grid
and overriding them on a per-field
basis.public ListGridField setAutoFitWidth(java.lang.Boolean autoFitWidth)
This overrides the ListGrid.autoFitFieldWidths
attribute on a per-field
basis.
Note that if showing record
components
, per-cell record components are not taken into account when determining the size for column auto fit. The
default ListGrid.getDefaultFieldWidth()
implementation looks at cell content only. We typically recommend that, for fields showing record-components, autoFitWidth
and canAutoFitWidth
be disabled, or if the record
components are of a predictable size, a defaultWidth
be specified.
This is particularly pertinent where ListGrid.recordComponentPosition
is set to
"within", in which case cells' content is often empty or completely covered by record-components.
For a more
direct alternative, see autoFit
, which effectively
turns on this setting and applies autoFitWidthApproach
with a single property.
If this method is called after the component has been drawn/initialized:
Setter for autoFitWidth
. Enables or disables dynamic autoFitWidth behavior on the specified field. Note if the field is currently autoFitWidth:true, and this method is disabling autoFit, the field will not be resized by default - if you wish to resize to an explicit width, use ListGrid.resizeField()
.
autoFitWidth
- field to auto-fit. Default value is nullListGridField
instance, for chaining setter callsListGrid.setAutoFitDateFields(com.smartgwt.client.types.AutoFitWidthApproach)
,
ListGrid.setAutoFitTimeFields(com.smartgwt.client.types.AutoFitWidthApproach)
public java.lang.Boolean getAutoFitWidth()
This overrides the ListGrid.autoFitFieldWidths
attribute on a per-field
basis.
Note that if showing record
components
, per-cell record components are not taken into account when determining the size for column auto fit. The
default ListGrid.getDefaultFieldWidth()
implementation looks at cell content only. We typically recommend that, for fields showing record-components, autoFitWidth
and canAutoFitWidth
be disabled, or if the record
components are of a predictable size, a defaultWidth
be specified.
This is particularly pertinent where ListGrid.recordComponentPosition
is set to
"within", in which case cells' content is often empty or completely covered by record-components.
For a more
direct alternative, see autoFit
, which effectively
turns on this setting and applies autoFitWidthApproach
with a single property.
ListGrid.getAutoFitDateFields()
,
ListGrid.getAutoFitTimeFields()
public ListGridField setAutoFitWidthApproach(AutoFitWidthApproach autoFitWidthApproach)
header contextMenu
or via a mouse gesture
, what autofit approach is used. If set,
this setting overrides the autoFitWidthApproach specified at the ListGrid level. For a more direct alternative, see
autoFit
, which effectively sets this attribute and
turns on autoFitWidth
.
autoFitWidthApproach
- New autoFitWidthApproach value. Default value is nullListGridField
instance, for chaining setter callspublic AutoFitWidthApproach getAutoFitWidthApproach()
header contextMenu
or via a mouse gesture
, what autofit approach is used. If set,
this setting overrides the autoFitWidthApproach specified at the ListGrid level. For a more direct alternative, see
autoFit
, which effectively sets this attribute and
turns on autoFitWidth
.
public ListGridField setAutoFreeze(java.lang.Boolean autoFreeze)
checkbox
, expansion
and rowNumber
fields are examples of fields that specify
autoFreeze: true
. You can control the position of this field in the array of frozen fields by providing
a getAutoFreezePosition()
implementation.
autoFreeze
- New autoFreeze value. Default value is nullListGridField
instance, for chaining setter callsFrozen Fields
public java.lang.Boolean getAutoFreeze()
checkbox
, expansion
and rowNumber
fields are examples of fields that specify
autoFreeze: true
. You can control the position of this field in the array of frozen fields by providing
a getAutoFreezePosition()
implementation.
Frozen Fields
public ListGridField setBaseStyle(java.lang.String baseStyle)
ListGrid.baseStyle
To override the baseStyle at the row level,
use record[listGrid.recordBaseStyleProperty]
instead.baseStyle
- New baseStyle value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setRecordBaseStyleProperty(java.lang.String)
,
CSSStyleName
,
Appearance overview and related methods
,
Grid cells Examplepublic java.lang.String getBaseStyle()
ListGrid.baseStyle
To override the baseStyle at the row level,
use record[listGrid.recordBaseStyleProperty]
instead.ListGrid.getRecordBaseStyleProperty()
,
CSSStyleName
,
Appearance overview and related methods
,
Grid cells Examplepublic ListGridField setCanAutoFitWidth(java.lang.Boolean canAutoFitWidth)
When
enabled, the default header context menu for this field will include an item to auto-fit the field and users will be
able to autofit the field via the ListGrid.headerAutoFitEvent
.
If unset, these behaviors are enabled when ListGrid.canAutoFitFields
is true.
If this property
is set to false, and ListGrid.canAutoFitFields
is
true, this field will be ommitted from auto-fit when the user selects the header menu option to auto fit all fields
.
Note - this property governs
user-initiated auto-fit only. It has no impact on autoFit set up via autoFitWidth
and ListGrid.autoFitFieldWidths
.
Note that if showing record components
, per-cell record components
are not taken into account when determining the size for column auto fit. The default ListGrid.getDefaultFieldWidth()
implementation looks at
cell content only. We typically recommend that, for fields showing record-components, autoFitWidth
and ListGrid.canAutoFitFields
be disabled, or if the record
components are of a predictable size, a defaultWidth
be specified.
This is particularly pertinent where ListGrid.recordComponentPosition
is set to
"within", in which case cells' content is often empty or completely covered by record-components.
canAutoFitWidth
- New canAutoFitWidth value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setAutoFitDateFields(com.smartgwt.client.types.AutoFitWidthApproach)
,
ListGrid.setAutoFitTimeFields(com.smartgwt.client.types.AutoFitWidthApproach)
public java.lang.Boolean getCanAutoFitWidth()
When
enabled, the default header context menu for this field will include an item to auto-fit the field and users will be
able to autofit the field via the ListGrid.headerAutoFitEvent
.
If unset, these behaviors are enabled when ListGrid.canAutoFitFields
is true.
If this property
is set to false, and ListGrid.canAutoFitFields
is
true, this field will be ommitted from auto-fit when the user selects the header menu option to auto fit all fields
.
Note - this property governs
user-initiated auto-fit only. It has no impact on autoFit set up via autoFitWidth
and ListGrid.autoFitFieldWidths
.
Note that if showing record components
, per-cell record components
are not taken into account when determining the size for column auto fit. The default ListGrid.getDefaultFieldWidth()
implementation looks at
cell content only. We typically recommend that, for fields showing record-components, autoFitWidth
and ListGrid.canAutoFitFields
be disabled, or if the record
components are of a predictable size, a defaultWidth
be specified.
This is particularly pertinent where ListGrid.recordComponentPosition
is set to
"within", in which case cells' content is often empty or completely covered by record-components.
ListGrid.getAutoFitDateFields()
,
ListGrid.getAutoFitTimeFields()
public ListGridField setCanDragResize(java.lang.Boolean canDragResize)
ListGrid.canResizeFields
.canDragResize
- New canDragResize value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getCanDragResize()
ListGrid.canResizeFields
.public ListGridField setCanEdit(java.lang.Boolean canEdit)
ListGrid.canEditFieldAttribute
may be used to set
default editability at the field level. An override of ListGrid.canEditCell()
can be used for more dynamic control over whether fields can be edited.
Note that this
property may validly be null
as a distinct state from false
. See ListGrid.fieldIsEditable()
for an API that will always return
true
or false
as to whether editing is possible by default.
setCanEdit
in class Field
canEdit
- New canEdit value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setCanEdit(java.lang.Boolean)
,
ListGrid.setRecordEditProperty(java.lang.String)
,
ListGrid.canEditCell(int, int)
,
Grid Editing
,
Disable editing Examplepublic java.lang.Boolean getCanEdit()
ListGrid.canEditFieldAttribute
may be used to set
default editability at the field level. An override of ListGrid.canEditCell()
can be used for more dynamic control over whether fields can be edited.
Note that this
property may validly be null
as a distinct state from false
. See ListGrid.fieldIsEditable()
for an API that will always return
true
or false
as to whether editing is possible by default.
getCanEdit
in class Field
ListGrid.getCanEdit()
,
ListGrid.getRecordEditProperty()
,
ListGrid.canEditCell(int, int)
,
Grid Editing
,
Disable editing Examplepublic ListGridField setCanEditAISummary(java.lang.Boolean canEditAISummary)
false
prevents editing by the user.canEditAISummary
- New canEditAISummary value. Default value is trueListGridField
instance, for chaining setter callspublic java.lang.Boolean getCanEditAISummary()
false
prevents editing by the user.public ListGridField setCanEditFormula(java.lang.Boolean canEditFormula)
false
prevents editing. A
null
or true
value allows editing. Has no effect when ListGrid.canAddFormulaFields
is false
.
canEditFormula
- New canEditFormula value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getCanEditFormula()
false
prevents editing. A
null
or true
value allows editing. Has no effect when ListGrid.canAddFormulaFields
is false
.
public ListGridField setCanEditSummary(java.lang.Boolean canEditSummary)
false
prevents editing. A
null
or true
value allows editing. Has no effect when ListGrid.canAddSummaryFields
is false
.
canEditSummary
- New canEditSummary value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getCanEditSummary()
false
prevents editing. A
null
or true
value allows editing. Has no effect when ListGrid.canAddSummaryFields
is false
.
public ListGridField setCanExport(java.lang.Boolean canExport)
dataSourceField
is explicitly set to
canExport: false.setCanExport
in class Field
canExport
- New canExport value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getCanExport()
dataSourceField
is explicitly set to
canExport: false.getCanExport
in class Field
public ListGridField setCanFilter(java.lang.Boolean canFilter)
canFilter
- New canFilter value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getCanFilter()
public ListGridField setCanFreeze(java.lang.Boolean canFreeze)
FrozenFields
.canFreeze
- New canFreeze value. Default value is nullListGridField
instance, for chaining setter callsListGrid.getHeaderContextMenuItems(java.lang.Integer)
,
Frozen Fields
public java.lang.Boolean getCanFreeze()
FrozenFields
.ListGrid.getHeaderContextMenuItems(java.lang.Integer)
,
Frozen Fields
public ListGridField setCanGroupBy(java.lang.Boolean canGroupBy)
canGroupBy
- New canGroupBy value. Default value is trueListGridField
instance, for chaining setter callsListGrid.groupBy(java.lang.String...)
public java.lang.Boolean getCanGroupBy()
ListGrid.groupBy(java.lang.String...)
public ListGridField setCanHide(java.lang.Boolean canHide)
ListGrid.canPickFields
is enabled. This means that the end
user will not be able to hide it if it's currently shown, or show it if it's currently hidden. If this property is
set to false
, and the advanced
field picker
is shown, if the field is hidden
, the
field will not show in the list of available fields. If the field is visible, it will be displayed in the list of
currently visible fields, but the advanced field picker user interface will disallow hiding it.
canHide
- New canHide value. Default value is nullListGridField
instance, for chaining setter callsListGrid.getHeaderContextMenuItems(java.lang.Integer)
,
Appearance overview and related methods
public java.lang.Boolean getCanHide()
ListGrid.canPickFields
is enabled. This means that the end
user will not be able to hide it if it's currently shown, or show it if it's currently hidden. If this property is
set to false
, and the advanced
field picker
is shown, if the field is hidden
, the
field will not show in the list of available fields. If the field is visible, it will be displayed in the list of
currently visible fields, but the advanced field picker user interface will disallow hiding it.
ListGrid.getHeaderContextMenuItems(java.lang.Integer)
,
Appearance overview and related methods
public ListGridField setCanHilite(java.lang.Boolean canHilite)
canHilite
- New canHilite value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getCanHilite()
public ListGridField setCanReorder(java.lang.Boolean canReorder)
ListGrid.canReorderFields
. Note that setting this
property to false
will lock this field from being moved - that is, the user is prevented from moving this
field directly by dragging with the mouse, or by dropping another field onto this field. Note that setting
canReorder:false
on a field in the middle of a grid is mostly useless, since it's possible that such a
"locked" field may still be reordered automatically, as a result of the user dragging one unlocked field onto another
unlocked field.
Fields in headerSpans
are treated
as if they have canReorder:false
to keep the fields in the span together, except that unlocked fields not
in a span may be drag-reordered across them, even if they're at the header's extreme left or right. HeaderSpans
themselves may not be drag-reordered.
canReorder
- New canReorder value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getCanReorder()
ListGrid.canReorderFields
. Note that setting this
property to false
will lock this field from being moved - that is, the user is prevented from moving this
field directly by dragging with the mouse, or by dropping another field onto this field. Note that setting
canReorder:false
on a field in the middle of a grid is mostly useless, since it's possible that such a
"locked" field may still be reordered automatically, as a result of the user dragging one unlocked field onto another
unlocked field.
Fields in headerSpans
are treated
as if they have canReorder:false
to keep the fields in the span together, except that unlocked fields not
in a span may be drag-reordered across them, even if they're at the header's extreme left or right. HeaderSpans
themselves may not be drag-reordered.
public ListGridField setCanSort(java.lang.Boolean canSort)
sort()
or setSort()
will work as expected.canSort
- New canSort value. Default value is trueListGridField
instance, for chaining setter callsListGrid.sort()
,
ListGrid.setCanSort(java.lang.Boolean)
public java.lang.Boolean getCanSort()
sort()
or setSort()
will work as expected.ListGrid.sort()
,
ListGrid.getCanSort()
public ListGridField setCanSortClientOnly(java.lang.Boolean canSortClientOnly)
canSortClientOnly
- New canSortClientOnly value. Default value is falseListGridField
instance, for chaining setter callspublic java.lang.Boolean getCanSortClientOnly()
public ListGridField setCanToggle(java.lang.Boolean canToggle)
valueMapped
field to be edited without going into edit
mode. When this attribute is set, clicking on the field will change the value - for boolean fields toggling between
true
and false
, and for valueMapped fields, advancing the value to the next option in the
valueMap. To enable this feature, ListGrid.canEdit
must
be set to true. For boolean type fields canToggle
is true by default, meaning setting canEdit
to true implies the user can toggle the value via a single click without going into edit mode. You can disable this by
explicitly setting canToggle
to false for a boolean field.
Note that you can enable toggling only
(without allowing the user to edit other fields) by just setting grid.editEvent:"none"
.
If ListGrid.editEvent
is set to "click", when the user clicks on
the field, the value will be toggled, and inline editing will be triggered as usual. Otherwise the toggled value will be
saved immediately to the server, or if ListGrid.autoSaveEdits
has been set to false, will be stored as an edit value for the record.
Note : This is an advanced setting
canToggle
- New canToggle value. Default value is variesListGridField
instance, for chaining setter callsGrid Editing
public java.lang.Boolean getCanToggle()
valueMapped
field to be edited without going into edit
mode. When this attribute is set, clicking on the field will change the value - for boolean fields toggling between
true
and false
, and for valueMapped fields, advancing the value to the next option in the
valueMap. To enable this feature, ListGrid.canEdit
must
be set to true. For boolean type fields canToggle
is true by default, meaning setting canEdit
to true implies the user can toggle the value via a single click without going into edit mode. You can disable this by
explicitly setting canToggle
to false for a boolean field.
Note that you can enable toggling only
(without allowing the user to edit other fields) by just setting grid.editEvent:"none"
.
If ListGrid.editEvent
is set to "click", when the user clicks on
the field, the value will be toggled, and inline editing will be triggered as usual. Otherwise the toggled value will be
saved immediately to the server, or if ListGrid.autoSaveEdits
has been set to false, will be stored as an edit value for the record.
Grid Editing
public ListGridField setCellAlign(Alignment cellAlign)
align
. If this field is editable, the alignment of
cells in the body will also be reflected in any editors for the field.cellAlign
- New cellAlign value. Default value is nullListGridField
instance, for chaining setter callsAppearance overview and related methods
public Alignment getCellAlign()
align
. If this field is editable, the alignment of
cells in the body will also be reflected in any editors for the field.Appearance overview and related methods
public ListGridField setCellIcon(java.lang.String cellIcon)
field.icon
, setting field.cellIcon will not show an icon in the
header. To change this property after fields have been passed to ListGrid.setFields()
, use ListGrid.setFieldCellIcon()
.
cellIcon
- New cellIcon value. Default value is nullListGridField
instance, for chaining setter callsSCImgURL
public java.lang.String getCellIcon()
field.icon
, setting field.cellIcon will not show an icon in the
header. To change this property after fields have been passed to ListGrid.setFields()
, use ListGrid.setFieldCellIcon()
.
SCImgURL
public ListGridField setCellPrompt(java.lang.String cellPrompt)
hoverHTML
.cellPrompt
- New cellPrompt value. Default value is nullListGridField
instance, for chaining setter callsHTMLString
public java.lang.String getCellPrompt()
hoverHTML
.HTMLString
public ListGridField setDataPath(java.lang.String dataPath)
Note : This is an advanced setting
dataPath
- New dataPath value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.String getDataPath()
public ListGridField setDateFormatter(DateDisplayFormat dateFormatter)
The timeFormatter
may also be used to format underlying
Date values as times (omitting the date part entirely). If both dateFormatter
and
timeFormatter
are specified on a field, for fields specified as type "time"
the timeFormatter
will be used,
otherwise the dateFormatter
If field.dateFormatter
and field.timeFormatter
is
unspecified, date display format may be defined at the component level via ListGrid.dateFormatter
, or for fields of type
"datetime"
ListGrid.datetimeFormatter
. Otherwise the default is to use the system-wide default short date format, configured via
DateUtil.setShortDisplayFormat()
. Specify any valid
DateDisplayFormat
to change the format used by this item.
If this field is
editable the dateFormatter will also be passed to the editor created to edit this field. Note that you can also specify
an explicit inputFormat
which will be passed
through to the editor as well, though this is not typically required as the input format should be automatically derived
by the Smart GWT system for standard DateDisplayFormats.
dateFormatter
- New dateFormatter value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setDateFormatter(com.smartgwt.client.types.DateDisplayFormat)
,
ListGrid.setDatetimeFormatter(com.smartgwt.client.types.DateDisplayFormat)
,
setTimeFormatter(com.smartgwt.client.types.TimeDisplayFormat)
public DateDisplayFormat getDateFormatter()
The timeFormatter
may also be used to format underlying
Date values as times (omitting the date part entirely). If both dateFormatter
and
timeFormatter
are specified on a field, for fields specified as type "time"
the timeFormatter
will be used,
otherwise the dateFormatter
If field.dateFormatter
and field.timeFormatter
is
unspecified, date display format may be defined at the component level via ListGrid.dateFormatter
, or for fields of type
"datetime"
ListGrid.datetimeFormatter
. Otherwise the default is to use the system-wide default short date format, configured via
DateUtil.setShortDisplayFormat()
. Specify any valid
DateDisplayFormat
to change the format used by this item.
If this field is
editable the dateFormatter will also be passed to the editor created to edit this field. Note that you can also specify
an explicit inputFormat
which will be passed
through to the editor as well, though this is not typically required as the input format should be automatically derived
by the Smart GWT system for standard DateDisplayFormats.
ListGrid.getDateFormatter()
,
ListGrid.getDatetimeFormatter()
,
getTimeFormatter()
public ListGridField setDecimalPad(java.lang.Integer decimalPad)
For example, a field value of 343.1, 343.104 and 343.09872677 would all be shown as 343.10 if decimalPad is 2.
The original unpadded value is always shown when the value is edited.
decimalPad
- New decimalPad value. Default value is nullListGridField
instance, for chaining setter callsAppearance overview and related methods
public java.lang.Integer getDecimalPad()
For example, a field value of 343.1, 343.104 and 343.09872677 would all be shown as 343.10 if decimalPad is 2.
The original unpadded value is always shown when the value is edited.
Appearance overview and related methods
public ListGridField setDecimalPrecision(java.lang.Integer decimalPrecision)
For example, with decimalPrecision 3, if the field value is 343.672677, 343.673 is shown.
If the value is 125.2, 125.2 is shown -
decimalPrecision will not cause extra zeros to be added. Use DataSourceField.decimalPad
for this.
A number is always shown with its original precision when edited.
decimalPrecision
- New decimalPrecision value. Default value is nullListGridField
instance, for chaining setter callsAppearance overview and related methods
public java.lang.Integer getDecimalPrecision()
For example, with decimalPrecision 3, if the field value is 343.672677, 343.673 is shown.
If the value is 125.2, 125.2 is shown -
decimalPrecision will not cause extra zeros to be added. Use DataSourceField.decimalPad
for this.
A number is always shown with its original precision when edited.
Appearance overview and related methods
public ListGridField setDefaultGroupingMode(java.lang.String defaultGroupingMode)
field.groupingMode
is unset. See field.groupingModes
.defaultGroupingMode
- New defaultGroupingMode value. Default value is nullListGridField
instance, for chaining setter callsIdentifier
public java.lang.String getDefaultGroupingMode()
field.groupingMode
is unset. See field.groupingModes
.Identifier
public ListGridField setDefaultIconSrc(java.lang.String defaultIconSrc)
FormItem.defaultIconSrc
.
Note : This is an advanced setting
defaultIconSrc
- New defaultIconSrc value. Default value is nullListGridField
instance, for chaining setter callssetIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...)
,
Grid Editing
public java.lang.String getDefaultIconSrc()
FormItem.defaultIconSrc
.com.smartgwt.client.widgets.grid.ListGridField#getIcons
,
Grid Editing
public ListGridField setDefaultWidth(java.lang.Integer defaultWidth)
ListGrid.getDefaultFieldWidth()
method, and used as the
autoFit size for the field's content.defaultWidth
- New defaultWidth value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Integer getDefaultWidth()
ListGrid.getDefaultFieldWidth()
method, and used as the
autoFit size for the field's content.public ListGridField setDisplayField(java.lang.String displayField)
optionDataSource
field used to
retrieve the display values that are to be mapped from the internal values specified by valueField
. If no optionDataSource
is
defined for the field and displayValueFromRecord
is not set to false
, the cell will display the displayField value for the current
record instead of the underlying value for this field. This approach can be used for situations where field values need
a stored-value-to-displayed-value mapping, but the set of all possible values is too large to load as a com.smartgwt.client.types.ValueMap
- see optionDataSource
for more details on this approach. Note that if this field is editable this will also be applied to
this field's editors. This sample illustrates this approach achieved via a server-side SQL join.
The display value
for a record with a specified displayField
can be picked up via ListGrid.getDisplayValue()
.
displayField
- New displayField value. Default value is nullListGridField
instance, for chaining setter callsFieldName
public java.lang.String getDisplayField()
optionDataSource
field used to
retrieve the display values that are to be mapped from the internal values specified by valueField
. If no optionDataSource
is
defined for the field and displayValueFromRecord
is not set to false
, the cell will display the displayField value for the current
record instead of the underlying value for this field. This approach can be used for situations where field values need
a stored-value-to-displayed-value mapping, but the set of all possible values is too large to load as a com.smartgwt.client.types.ValueMap
- see optionDataSource
for more details on this approach. Note that if this field is editable this will also be applied to
this field's editors. This sample illustrates this approach achieved via a server-side SQL join.
The display value
for a record with a specified displayField
can be picked up via ListGrid.getDisplayValue()
.
FieldName
public ListGridField setDisplayValueFromRecord(java.lang.Boolean displayValueFromRecord)
displayField
is set, should this field show
record values from the displayField
? If displayField
is specified, and there is no separate
optionDataSource
, by default we will show
display-field values from the same record. Setting this property to false would disable this behavior.
Alternatively, if there is a optionDataSource
(and autoFetchDisplayMap
is false), the
displayField would be ignored for the field and the underlying record[fieldName] value
would be displayed to the user. This
property may be set to true to override this behavior and pick up values from the displayField
for display
in this field even when there is an optionDataSource set.
Note that this property has no effect on fields with an
explicitly specified valueMap, or with an optionDataSource where autoFetchDisplayMap
is true.
Note : This is an advanced setting
displayValueFromRecord
- New displayValueFromRecord value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getDisplayValueFromRecord()
displayField
is set, should this field show
record values from the displayField
? If displayField
is specified, and there is no separate
optionDataSource
, by default we will show
display-field values from the same record. Setting this property to false would disable this behavior.
Alternatively, if there is a optionDataSource
(and autoFetchDisplayMap
is false), the
displayField would be ignored for the field and the underlying record[fieldName] value
would be displayed to the user. This
property may be set to true to override this behavior and pick up values from the displayField
for display
in this field even when there is an optionDataSource set.
Note that this property has no effect on fields with an
explicitly specified valueMap, or with an optionDataSource where autoFetchDisplayMap
is true.
public ListGridField setEditorFormula(UserFormula editorFormula)
editorFormula
- New editorFormula value. Default value is nullListGridField
instance, for chaining setter callspublic UserFormula getEditorFormula()
public ListGridField setEditorIconHeight(java.lang.Integer editorIconHeight)
FormItem.iconHeight
.iconHeight
instead.
Note : This is an advanced setting
editorIconHeight
- New editorIconHeight value. Default value is nullListGridField
instance, for chaining setter callssetIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...)
,
Grid Editing
public java.lang.Integer getEditorIconHeight()
FormItem.iconHeight
.iconHeight
instead.com.smartgwt.client.widgets.grid.ListGridField#getIcons
,
Grid Editing
public ListGridField setEditorIconWidth(java.lang.Integer editorIconWidth)
FormItem.iconWidth
.iconWidth
instead.
Note : This is an advanced setting
editorIconWidth
- New editorIconWidth value. Default value is nullListGridField
instance, for chaining setter callssetIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...)
,
Grid Editing
public java.lang.Integer getEditorIconWidth()
FormItem.iconWidth
.iconWidth
instead.com.smartgwt.client.widgets.grid.ListGridField#getIcons
,
Grid Editing
public ListGridField setEditorImageURLPrefix(java.lang.String editorImageURLPrefix)
FormItem.imageURLPrefix
to the editor in question.
This can be used to modify the valueIcons within the editor.imageURLPrefix
is specified, that will be used
instead.
Note : This is an advanced setting
editorImageURLPrefix
- New editorImageURLPrefix value. Default value is nullListGridField
instance, for chaining setter callsGrid Editing
public java.lang.String getEditorImageURLPrefix()
FormItem.imageURLPrefix
to the editor in question.
This can be used to modify the valueIcons within the editor.imageURLPrefix
is specified, that will be used
instead.Grid Editing
public ListGridField setEditorImageURLSuffix(java.lang.String editorImageURLSuffix)
FormItem.imageURLSuffix
to the editor in question.
This can be used to modify the valueIcons within the editor.imageURLPrefix
is specified, that will be used
instead.
Note : This is an advanced setting
editorImageURLSuffix
- New editorImageURLSuffix value. Default value is nullListGridField
instance, for chaining setter callsGrid Editing
public java.lang.String getEditorImageURLSuffix()
FormItem.imageURLSuffix
to the editor in question.
This can be used to modify the valueIcons within the editor.imageURLPrefix
is specified, that will be used
instead.Grid Editing
public ListGridField setEditorTextFormula(UserSummary editorTextFormula)
editorTextFormula
- New editorTextFormula value. Default value is nullListGridField
instance, for chaining setter callspublic UserSummary getEditorTextFormula()
public ListGridField setEditorValueIconHeight(java.lang.Integer editorValueIconHeight)
editorValueIconHeight
- New editorValueIconHeight value. Default value is nullListGridField
instance, for chaining setter callsImageColumns overview and related methods
public java.lang.Integer getEditorValueIconHeight()
ImageColumns overview and related methods
public ListGridField setEditorValueIcons(java.util.Map<java.lang.String,java.lang.String> editorValueIcons)
editorValueIcons
- New editorValueIcons value. Default value is nullListGridField
instance, for chaining setter callsImageColumns overview and related methods
public ListGridField setEditorValueIconWidth(java.lang.Integer editorValueIconWidth)
editorValueIconWidth
- New editorValueIconWidth value. Default value is nullListGridField
instance, for chaining setter callsImageColumns overview and related methods
public java.lang.Integer getEditorValueIconWidth()
ImageColumns overview and related methods
public ListGridField setEditorValueMap(java.util.Map editorValueMap)
field.valueMap
will be used instead. Dynamic valueMaps
can be provided by implementing ListGrid.getEditorValueMap()
.
editorValueMap
- New editorValueMap value. Default value is nullListGridField
instance, for chaining setter callscom.smartgwt.client.widgets.grid.ListGrid#getEditorValueMap
,
ListGrid.setEditorValueMap(java.lang.String, java.util.LinkedHashMap)
,
Grid Editing
public ListGridField setEmptyCellValue(java.lang.String emptyCellValue)
formatting
and valueMap (if any). This is the
field-specific attribute. You may also set the ListGrid.emptyCellValue
at the grid level to define the emptyCellValue for all empty fields in the grid.
emptyCellValue
- New emptyCellValue value. Default value is nullListGridField
instance, for chaining setter callsHTMLString
,
Empty values Examplepublic java.lang.String getEmptyCellValue()
formatting
and valueMap (if any). This is the
field-specific attribute. You may also set the ListGrid.emptyCellValue
at the grid level to define the emptyCellValue for all empty fields in the grid.
HTMLString
,
Empty values Examplepublic ListGridField setEnableWhen(Criteria enableWhen)
This criteria is dynamic and will be renterpreted each time the rule context changes.
enableWhen
- New enableWhen value. Default value is nullListGridField
instance, for chaining setter callsDynamic Rules
public Criteria getEnableWhen()
This criteria is dynamic and will be renterpreted each time the rule context changes.
Dynamic Rules
public ListGridField setEnterKeyEditAction(EnterKeyEditAction enterKeyEditAction)
enterKeyEditAction
as
specified at the listGrid level while focus is in this field.enterKeyEditAction
- New enterKeyEditAction value. Default value is "done"ListGridField
instance, for chaining setter callsGrid Editing
public EnterKeyEditAction getEnterKeyEditAction()
enterKeyEditAction
as
specified at the listGrid level while focus is in this field.Grid Editing
public ListGridField setEscapeHTML(java.lang.Boolean escapeHTML)
true
will
cause HTML characters to be escaped, meaning the raw value of the field (for example
"<b>AAA</b>"
) is displayed to the user rather than being interpreted as HTML (for example
"AAA"
) If this field has an aiFieldRequest
, then the default value of this setting
is true
.
setEscapeHTML
in class Field
escapeHTML
- New escapeHTML value. Default value is nullListGridField
instance, for chaining setter callssetSkipLineBreaks(java.lang.Boolean)
public java.lang.Boolean getEscapeHTML()
true
will
cause HTML characters to be escaped, meaning the raw value of the field (for example
"<b>AAA</b>"
) is displayed to the user rather than being interpreted as HTML (for example
"AAA"
) If this field has an aiFieldRequest
, then the default value of this setting
is true
.
getEscapeHTML
in class Field
getSkipLineBreaks()
public ListGridField setEscapeKeyEditAction(EscapeKeyEditAction escapeKeyEditAction)
escapeKeyEditAction
as
specified at the listGrid level while focus is in this field.escapeKeyEditAction
- New escapeKeyEditAction value. Default value is "cancel"ListGridField
instance, for chaining setter callsGrid Editing
public EscapeKeyEditAction getEscapeKeyEditAction()
escapeKeyEditAction
as
specified at the listGrid level while focus is in this field.Grid Editing
public ListGridField setExcludeFromState(java.lang.Boolean excludeFromState)
DataBoundComponent.getTitleField()
if DataBoundComponent.titleField
is not provided.excludeFromState
- New excludeFromState value. Default value is nullListGridField
instance, for chaining setter callsListGrid.getViewState()
public java.lang.Boolean getExcludeFromState()
DataBoundComponent.getTitleField()
if DataBoundComponent.titleField
is not provided.ListGrid.getViewState()
public ListGridField setExportFieldWidth(boolean exportFieldWidth)
ListGrid.exportData()
or ListGrid.exportClientData()
with ListGrid.exportFieldWidths
set, set this
flag false to cause this field to "opt out" of width export. Fields that opt out in this way have the corresponding
spreadsheet column autosized (ie, made just wide enough that content is not clipped). This setting has no effect if
listGrid.exportFieldWidths
is not set.
exportFieldWidth
- New exportFieldWidth value. Default value is trueListGridField
instance, for chaining setter callspublic boolean getExportFieldWidth()
ListGrid.exportData()
or ListGrid.exportClientData()
with ListGrid.exportFieldWidths
set, set this
flag false to cause this field to "opt out" of width export. Fields that opt out in this way have the corresponding
spreadsheet column autosized (ie, made just wide enough that content is not clipped). This setting has no effect if
listGrid.exportFieldWidths
is not set.
public ListGridField setExportFormat(java.lang.String exportFormat)
FormatString
used during exports for numeric or date formatting. See DataSourceField.exportFormat
.exportFormat
- New exportFormat value. Default value is nullListGridField
instance, for chaining setter callsFormatString
,
Exports & Formatting
public java.lang.String getExportFormat()
FormatString
used during exports for numeric or date formatting. See DataSourceField.exportFormat
.FormatString
,
Exports & Formatting
public ListGridField setExportRawNumbers(java.lang.Boolean exportRawNumbers)
exportClientData()
. This property is only consulted if
exportRawValues
is not set to true at the grid
or field
level. That property causes all values,
including numeric values, to be exported unformatted.
This is useful for cases where an explicit ListGrid formatter function simply displays the number as a formatted string for the user (for example "1,234"). Exporting that formatted string rather than the underlying numeric value causes spreadsheet applications such as Excel to lose some functionality.
If this property is not explicitly set, numeric values will be exported as raw numbers for XLS and OOXML export
only.
This property overrides the setting at
the grid
level.
exportRawNumbers
- New exportRawNumbers value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getExportRawNumbers()
exportClientData()
. This property is only consulted if
exportRawValues
is not set to true at the grid
or field
level. That property causes all values,
including numeric values, to be exported unformatted.
This is useful for cases where an explicit ListGrid formatter function simply displays the number as a formatted string for the user (for example "1,234"). Exporting that formatted string rather than the underlying numeric value causes spreadsheet applications such as Excel to lose some functionality.
If this property is not explicitly set, numeric values will be exported as raw numbers for XLS and OOXML export
only.
This property overrides the setting at
the grid
level.
public ListGridField setExportRawValues(java.lang.Boolean exportRawValues)
exportClientData()
. If set to true for a field, the values
in the field-formatters will not be executed for data in this field. Decreases the time taken for large exports.exportRawValues
- New exportRawValues value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getExportRawValues()
exportClientData()
. If set to true for a field, the values
in the field-formatters will not be executed for data in this field. Decreases the time taken for large exports.public ListGridField setFilterEditorValueMap(java.util.Map filterEditorValueMap)
filterEditorValueMap
- New filterEditorValueMap value. Default value is nullListGridField
instance, for chaining setter callspublic ListGridField setFilterOnKeypress(java.lang.Boolean filterOnKeypress)
filterOnKeypress
setting at the grid level
For a discussion of the various filtering and criteria-management APIs and when to use
them, see the Grid Filtering overview
.
Note : This is an advanced setting
filterOnKeypress
- New filterOnKeypress value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setFetchDelay(int)
public java.lang.Boolean getFilterOnKeypress()
filterOnKeypress
setting at the grid level
For a discussion of the various filtering and criteria-management APIs and when to use
them, see the Grid Filtering overview
.
ListGrid.getFetchDelay()
public ListGridField setFilterOperator(OperatorId filterOperator)
FilterEditor
showing, the default Operator
to use when matching values for this field. For a discussion of the various
filtering and criteria-management APIs and when to use them, see the Grid
Filtering overview
.
Users can override this default operator, or revert to it, with the "Filter using"
submenu, in the grid's headerContextMenu
; developers can use ListGrid.setFieldSearchOperator()
to modify the
operator and ListGrid.clearFieldSearchOperator()
to reset to the default.
Note that you can set all FilterEditor fields to
default to either substring or exact match via autoFetchTextMatchStyle
, but if you want a mix of
exact vs substring match on different fields, you need to use this property, and your ListGrid will produce AdvancedCriteria
rather than the simpler Criteria
format.
This is automatically and transparently handled by the Smart GWT Server's SQLDataSource and HibernateDataSource in
Power Edition or above, but if you have your own filtering implementation, it will need to be able to handle
AdvancedCriteria.
filterOperator
- New filterOperator value. Default value is nullListGridField
instance, for chaining setter callscom.smartgwt.client.widgets.grid.ListGridField#setOperator
public OperatorId getFilterOperator()
FilterEditor
showing, the default Operator
to use when matching values for this field. For a discussion of the various
filtering and criteria-management APIs and when to use them, see the Grid
Filtering overview
.
Users can override this default operator, or revert to it, with the "Filter using"
submenu, in the grid's headerContextMenu
; developers can use ListGrid.setFieldSearchOperator()
to modify the
operator and ListGrid.clearFieldSearchOperator()
to reset to the default.
Note that you can set all FilterEditor fields to
default to either substring or exact match via autoFetchTextMatchStyle
, but if you want a mix of
exact vs substring match on different fields, you need to use this property, and your ListGrid will produce AdvancedCriteria
rather than the simpler Criteria
format.
This is automatically and transparently handled by the Smart GWT Server's SQLDataSource and HibernateDataSource in
Power Edition or above, but if you have your own filtering implementation, it will need to be able to handle
AdvancedCriteria.
getOperator()
public ListGridField setFormat(java.lang.String format)
FormatString
for numeric or date formatting. See DataSourceField.format
.format
- New format value. Default value is nullListGridField
instance, for chaining setter callsFormatString
,
Exports & Formatting
public java.lang.String getFormat()
FormatString
for numeric or date formatting. See DataSourceField.format
.FormatString
,
Exports & Formatting
public ListGridField setFrozen(java.lang.Boolean frozen)
FrozenFields
.frozen
- New frozen value. Default value is nullListGridField
instance, for chaining setter callsFrozen Fields
public java.lang.Boolean getFrozen()
FrozenFields
.Frozen Fields
public ListGridField setGroupGranularity(java.lang.Integer groupGranularity)
Groups will be formed based on ranges of values of size
groupGranularity
. For example, if groupGranularity were 1000, groups would be 0-1000, 1000-2000, etc.
groupGranularity
- New groupGranularity value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Integer getGroupGranularity()
Groups will be formed based on ranges of values of size
groupGranularity
. For example, if groupGranularity were 1000, groups would be 0-1000, 1000-2000, etc.
public ListGridField setGroupingMode(java.lang.String groupingMode)
grouping modes
,
the current grouping mode. This property is set when a user chooses a particular grouping mode, and may be set on ListGrid creation to affect the initial grouping.
groupingMode
- New groupingMode value. Default value is nullListGridField
instance, for chaining setter callsIdentifier
public java.lang.String getGroupingMode()
grouping modes
,
the current grouping mode. This property is set when a user chooses a particular grouping mode, and may be set on ListGrid creation to affect the initial grouping.
Identifier
public ListGridField setGroupingModes(java.util.Map groupingModes)
If
groupingModes
are present and grouping is
enabled
, the menu for this field includes a submenu of possible grouping modes generated from the
groupingModes
valueMap. When the user selects a particular grouping mode, field.groupingMode
is set to the user's chosen mode, and
this choice can be detected via the field
parameter to getGroupValue()
in order to provide different modes of
grouping.
The user may also choose to group records without specifying a grouping mode, in this case, the defaultGroupingMode
is used.
Note that
getGroupValue
, groupingModes
et al can be specified on SimpleType
declarations. See this list of builtin grouping modes
for more information.
groupingModes
- New groupingModes value. Default value is nullListGridField
instance, for chaining setter callspublic java.util.Map getGroupingModes()
If
groupingModes
are present and grouping is
enabled
, the menu for this field includes a submenu of possible grouping modes generated from the
groupingModes
valueMap. When the user selects a particular grouping mode, field.groupingMode
is set to the user's chosen mode, and
this choice can be detected via the field
parameter to getGroupValue()
in order to provide different modes of
grouping.
The user may also choose to group records without specifying a grouping mode, in this case, the defaultGroupingMode
is used.
Note that
getGroupValue
, groupingModes
et al can be specified on SimpleType
declarations. See this list of builtin grouping modes
for more information.
public ListGridField setGroupPrecision(java.lang.Integer groupPrecision)
For example, groupPrecision:2
indicates that 45.238 and 45.231 group together, but 45.22 and 45.27 are
separate.
See also groupGranularity
for
grouping by broader ranges.
groupPrecision
- New groupPrecision value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Integer getGroupPrecision()
For example, groupPrecision:2
indicates that 45.238 and 45.231 group together, but 45.22 and 45.27 are
separate.
See also groupGranularity
for
grouping by broader ranges.
public ListGridField setHeaderBaseStyle(java.lang.String headerBaseStyle)
ListGrid.headerBaseStyle
.headerTitleStyle
as well.headerBaseStyle
- New headerBaseStyle value. Default value is nullListGridField
instance, for chaining setter callsCSSStyleName
,
Appearance overview and related methods
public java.lang.String getHeaderBaseStyle()
ListGrid.headerBaseStyle
.headerTitleStyle
as well.CSSStyleName
,
Appearance overview and related methods
public ListGridField setHeaderButtonAriaRole(java.lang.String headerButtonAriaRole)
Aria role
for the header button for this field.
Note : This is an advanced setting
headerButtonAriaRole
- New headerButtonAriaRole value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.String getHeaderButtonAriaRole()
Aria role
for the header button for this field.public ListGridField setHeaderButtonAriaState(java.util.Map headerButtonAriaState)
Aria state
for the header button for this field.
Note : This is an advanced setting
headerButtonAriaState
- New headerButtonAriaState value. Default value is nullListGridField
instance, for chaining setter callspublic java.util.Map getHeaderButtonAriaState()
Aria state
for the header button for this field.public ListGridField setHeaderHoverDelay(java.lang.Integer headerHoverDelay)
If unset, any hoverDelay
will be used for both header hovers and hovers
shown over cells in the grid's body.
headerHoverDelay
- New headerHoverDelay value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Integer getHeaderHoverDelay()
If unset, any hoverDelay
will be used for both header hovers and hovers
shown over cells in the grid's body.
public ListGridField setHeaderTitle(java.lang.String headerTitle)
title
or name
. Set to an empty string to suppress the title in the header
button entirely.headerTitle
- New headerTitle value. Default value is nullListGridField
instance, for chaining setter callssetTitle(java.lang.String)
,
Appearance overview and related methods
public java.lang.String getHeaderTitle()
title
or name
. Set to an empty string to suppress the title in the header
button entirely.getTitle()
,
Appearance overview and related methods
public ListGridField setHeaderTitleStyle(java.lang.String headerTitleStyle)
ListGrid.headerTitleStyle
.ListGrid.headerButtonConstructor
is set to StretchImgButton
or a subclass thereof.headerTitleStyle
- New headerTitleStyle value. Default value is nullListGridField
instance, for chaining setter callsCSSStyleName
,
Appearance overview and related methods
public java.lang.String getHeaderTitleStyle()
ListGrid.headerTitleStyle
.ListGrid.headerButtonConstructor
is set to StretchImgButton
or a subclass thereof.CSSStyleName
,
Appearance overview and related methods
public ListGridField setHidden(java.lang.Boolean hidden)
canHide
to false, or by setting
ListGrid.canPickFields
to false to suppress the
field-picker entirely. To mark a field as completely hidden (not shown to a user at all, in any component), set
DataSourceField.hidden
instead.
hidden
- New hidden value. Default value is nullListGridField
instance, for chaining setter callsAppearance overview and related methods
public java.lang.Boolean getHidden()
canHide
to false, or by setting
ListGrid.canPickFields
to false to suppress the
field-picker entirely. To mark a field as completely hidden (not shown to a user at all, in any component), set
DataSourceField.hidden
instead.
Appearance overview and related methods
public ListGridField setHideOnPhone(java.lang.Boolean hideOnPhone)
ListGrid.setHideOnPhone()
Note that if hidden
is set, or an explicit showIf()
function exists that will take precedence over this
setting. Similarly, an explicit call to ListGrid.showField()
or ListGrid.hideField()
will clear
this setting.
See also the related property hideOnTablet
.
hideOnPhone
- New hideOnPhone value. Default value is nullListGridField
instance, for chaining setter callsAppearance overview and related methods
public java.lang.Boolean getHideOnPhone()
ListGrid.setHideOnPhone()
Note that if hidden
is set, or an explicit showIf()
function exists that will take precedence over this
setting. Similarly, an explicit call to ListGrid.showField()
or ListGrid.hideField()
will clear
this setting.
See also the related property hideOnTablet
.
Appearance overview and related methods
public ListGridField setHideOnTablet(java.lang.Boolean hideOnTablet)
ListGrid.setHideOnTablet()
Note that
if hidden
is set, or an explicit showIf()
function exists that will take precedence over this
setting. Similarly, an explicit call to ListGrid.showField()
or ListGrid.hideField()
will clear
this setting.
See also the related property hideOnPhone
.
hideOnTablet
- New hideOnTablet value. Default value is nullListGridField
instance, for chaining setter callsAppearance overview and related methods
public java.lang.Boolean getHideOnTablet()
ListGrid.setHideOnTablet()
Note that
if hidden
is set, or an explicit showIf()
function exists that will take precedence over this
setting. Similarly, an explicit call to ListGrid.showField()
or ListGrid.hideField()
will clear
this setting.
See also the related property hideOnPhone
.
Appearance overview and related methods
public ListGridField setHiliteHTMLAfterFormat(java.lang.Boolean hiliteHTMLAfterFormat)
formatting
for each cell in this column. If false, hilite
HTML will be applied before formatting. This attribute overrides ListGrid.hiliteHTMLAfterFormat
as defined at the
component level.
hiliteHTMLAfterFormat
- New hiliteHTMLAfterFormat value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getHiliteHTMLAfterFormat()
formatting
for each cell in this column. If false, hilite
HTML will be applied before formatting. This attribute overrides ListGrid.hiliteHTMLAfterFormat
as defined at the
component level.
public ListGridField setHiliteIconHeight(java.lang.Integer hiliteIconHeight)
ListGrid.hiliteIconSize
, ListGrid.hiliteIconHeight
, and hiliteIconSize
.hiliteIconHeight
- New hiliteIconHeight value. Default value is nullListGridField
instance, for chaining setter callsHiliting
public java.lang.Integer getHiliteIconHeight()
ListGrid.hiliteIconSize
, ListGrid.hiliteIconHeight
, and hiliteIconSize
.Hiliting
public ListGridField setHiliteIconLeftPadding(java.lang.Integer hiliteIconLeftPadding)
hilite icons
for this field? Overrides ListGrid.hiliteIconLeftPadding
hiliteIconLeftPadding
- New hiliteIconLeftPadding value. Default value is nullListGridField
instance, for chaining setter callsHiliting
public java.lang.Integer getHiliteIconLeftPadding()
hilite icons
for this field? Overrides ListGrid.hiliteIconLeftPadding
Hiliting
public ListGridField setHiliteIconPosition(HiliteIconPosition hiliteIconPosition)
ListGrid.hiliteIcons
are present, where the hilite
icon will be placed relative to the field value. See HiliteIconPosition
. Overrides
ListGrid.hiliteIconPosition
.hiliteIconPosition
- New hiliteIconPosition value. Default value is nullListGridField
instance, for chaining setter callsHiliting
public HiliteIconPosition getHiliteIconPosition()
ListGrid.hiliteIcons
are present, where the hilite
icon will be placed relative to the field value. See HiliteIconPosition
. Overrides
ListGrid.hiliteIconPosition
.Hiliting
public ListGridField setHiliteIconRightPadding(java.lang.Integer hiliteIconRightPadding)
hilite icons
for this field? Overrides ListGrid.hiliteIconRightPadding
hiliteIconRightPadding
- New hiliteIconRightPadding value. Default value is nullListGridField
instance, for chaining setter callsHiliting
public java.lang.Integer getHiliteIconRightPadding()
hilite icons
for this field? Overrides ListGrid.hiliteIconRightPadding
Hiliting
public ListGridField setHiliteIconSize(java.lang.Integer hiliteIconSize)
hilite icons
in this field.
Takes precedence over hiliteIconWidth, hiliteIconHeight and hiliteIconSize specified at the component level. Can be
overridden via hiliteIconWidth
and hiliteIconHeight
hiliteIconSize
- New hiliteIconSize value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setHiliteIconSize(int)
,
setHiliteIconWidth(java.lang.Integer)
,
setHiliteIconHeight(java.lang.Integer)
,
Hiliting
public java.lang.Integer getHiliteIconSize()
hilite icons
in this field.
Takes precedence over hiliteIconWidth, hiliteIconHeight and hiliteIconSize specified at the component level. Can be
overridden via hiliteIconWidth
and hiliteIconHeight
ListGrid.getHiliteIconSize()
,
getHiliteIconWidth()
,
getHiliteIconHeight()
,
Hiliting
public ListGridField setHiliteIconWidth(java.lang.Integer hiliteIconWidth)
ListGrid.hiliteIconSize
, ListGrid.hiliteIconWidth
,
and hiliteIconSize
.hiliteIconWidth
- New hiliteIconWidth value. Default value is nullListGridField
instance, for chaining setter callsHiliting
public java.lang.Integer getHiliteIconWidth()
ListGrid.hiliteIconSize
, ListGrid.hiliteIconWidth
,
and hiliteIconSize
.Hiliting
public ListGridField setHoverDelay(java.lang.Integer hoverDelay)
This property
also governes the hoverDelay for the header button. Developers wishing to have a different delay for hovers on the
header can use headerHoverDelay
in addition
to this property.
hoverDelay
- New hoverDelay value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Integer getHoverDelay()
This property
also governes the hoverDelay for the header button. Developers wishing to have a different delay for hovers on the
header can use headerHoverDelay
in addition
to this property.
public ListGridField setHoverWidth(java.lang.Integer hoverWidth)
If unset, default behavior
is derived from ListGrid.headerHoverWidth
.
hoverWidth
- New hoverWidth value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Integer getHoverWidth()
If unset, default behavior
is derived from ListGrid.headerHoverWidth
.
public ListGridField setHoverWrap(java.lang.Boolean hoverWrap)
wrap
attribute for the canvas shown when the mouse hovers over
cells in this field. Note that this causes a soft-wrap - if set, the hover text will wrap at word boundaries. If
unset, default behavior is derived from ListGrid.headerHoverWrap
.
hoverWrap
- New hoverWrap value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getHoverWrap()
wrap
attribute for the canvas shown when the mouse hovers over
cells in this field. Note that this causes a soft-wrap - if set, the hover text will wrap at word boundaries. If
unset, default behavior is derived from ListGrid.headerHoverWrap
.
public ListGridField setIcon(java.lang.String icon)
If field.type
is
set to "icon", this icon will also be shown in every cell of this field - see also field.cellIcon
.
To change this property after fields
have been passed to ListGrid.setFields()
, use ListGrid.setFieldIcon()
.
icon
- New icon value. Default value is nullListGridField
instance, for chaining setter callsSCImgURL
public java.lang.String getIcon()
If field.type
is
set to "icon", this icon will also be shown in every cell of this field - see also field.cellIcon
.
To change this property after fields
have been passed to ListGrid.setFields()
, use ListGrid.setFieldIcon()
.
SCImgURL
public ListGridField setIconCursor(Cursor iconCursor)
icon
or a valueIcon
. If not explicitly specified, see ListGrid.getIconCursor()
for how "icon"
fields
determine icon image cursors, and ListGrid.getValueIconCursor()
for how value icon image cursors are determined.
Note : This is an advanced setting
iconCursor
- New iconCursor value. Default value is nullListGridField
instance, for chaining setter callspublic Cursor getIconCursor()
icon
or a valueIcon
. If not explicitly specified, see ListGrid.getIconCursor()
for how "icon"
fields
determine icon image cursors, and ListGrid.getValueIconCursor()
for how value icon image cursors are determined.
public ListGridField setIconHeight(java.lang.Integer iconHeight)
icon
is specified, this property can be used to
specify the height of the icon to be displayed in the ListGrid header button. (See StatefulCanvas.iconHeight
)editorIconHeight
is unset, this property will
be passed onto the editors for this field as FormItem.iconWidth
, which will effect the default size for icons
displayed in the editor.iconHeight
- New iconHeight value. Default value is nullListGridField
instance, for chaining setter callssetIcon(java.lang.String)
,
setIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...)
public java.lang.Integer getIconHeight()
icon
is specified, this property can be used to
specify the height of the icon to be displayed in the ListGrid header button. (See StatefulCanvas.iconHeight
)editorIconHeight
is unset, this property will
be passed onto the editors for this field as FormItem.iconWidth
, which will effect the default size for icons
displayed in the editor.getIcon()
,
com.smartgwt.client.widgets.grid.ListGridField#getIcons
public ListGridField setIconOrientation(java.lang.String iconOrientation)
"left"
or "right"
iconOrientation
- New iconOrientation value. Default value is "left"ListGridField
instance, for chaining setter callssetIcon(java.lang.String)
public java.lang.String getIconOrientation()
"left"
or "right"
getIcon()
public ListGridField setIcons(FormItemIcon... icons)
icons
to be displayed in the editors displayed for this field
Note : This is an advanced setting
icons
- New icons value. Default value is nullListGridField
instance, for chaining setter callsGrid Editing
public ListGridField setIconSize(java.lang.Integer iconSize)
icon
is specified, this property can be used to
specify the size of the icon to be displayed in the ListGrid header button. (See StatefulCanvas.iconSize
)iconSize
- New iconSize value. Default value is nullListGridField
instance, for chaining setter callssetIcon(java.lang.String)
public java.lang.Integer getIconSize()
icon
is specified, this property can be used to
specify the size of the icon to be displayed in the ListGrid header button. (See StatefulCanvas.iconSize
)getIcon()
public ListGridField setIconSpacing(int iconSpacing)
iconSpacing
- New iconSpacing value. Default value is 6ListGridField
instance, for chaining setter callssetIcon(java.lang.String)
,
Button Icon
public int getIconSpacing()
getIcon()
,
Button Icon
public ListGridField setIconVAlign(java.lang.String iconVAlign)
FormItem.iconVAlign
.
Note : This is an advanced setting
iconVAlign
- New iconVAlign value. Default value is nullListGridField
instance, for chaining setter callssetIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...)
,
Grid Editing
public java.lang.String getIconVAlign()
FormItem.iconVAlign
.com.smartgwt.client.widgets.grid.ListGridField#getIcons
,
Grid Editing
public ListGridField setIconWidth(java.lang.Integer iconWidth)
icon
is specified, this property can be used to
specify the width of the icon to be displayed in the ListGrid header button. (See StatefulCanvas.iconWidth
)editorIconWidth
is unset, this property will
be passed onto the editors for this field as FormItem.iconWidth
, which will effect the default size for icons
displayed in the editor.iconWidth
- New iconWidth value. Default value is nullListGridField
instance, for chaining setter callssetIcon(java.lang.String)
,
setIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...)
public java.lang.Integer getIconWidth()
icon
is specified, this property can be used to
specify the width of the icon to be displayed in the ListGrid header button. (See StatefulCanvas.iconWidth
)editorIconWidth
is unset, this property will
be passed onto the editors for this field as FormItem.iconWidth
, which will effect the default size for icons
displayed in the editor.getIcon()
,
com.smartgwt.client.widgets.grid.ListGridField#getIcons
public ListGridField setIgnoreKeyboardClicks(java.lang.Boolean ignoreKeyboardClicks)
ListGrid.generateClickOnSpace
, ListGrid.generateClickOnEnter
, ListGrid.generateDoubleClickOnSpace
, ListGrid.generateDoubleClickOnEnter
and ListGrid.arrowKeyAction
). These synthetic events have both a target row and column. Setting this flag to true ensures that this field will never be considered the target for a keyboard click event.
ignoreKeyboardClicks
- New ignoreKeyboardClicks value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getIgnoreKeyboardClicks()
ListGrid.generateClickOnSpace
, ListGrid.generateClickOnEnter
, ListGrid.generateDoubleClickOnSpace
, ListGrid.generateDoubleClickOnEnter
and ListGrid.arrowKeyAction
). These synthetic events have both a target row and column. Setting this flag to true ensures that this field will never be considered the target for a keyboard click event.
public ListGridField setImageHeight(int imageHeight)
If set to a String, assumed to be a property
on each record that specifies the image height. For example, if field.imageHeight
is "logoHeight",
record.logoHeight
will control the height of the image.
imageHeight
- New imageHeight value. Default value is 16ListGridField
instance, for chaining setter callsListGrid.setImageSize(int)
,
setImageSize(int)
,
setImageWidth(int)
,
ImageColumns overview and related methods
public int getImageHeight()
If set to a String, assumed to be a property
on each record that specifies the image height. For example, if field.imageHeight
is "logoHeight",
record.logoHeight
will control the height of the image.
ListGrid.getImageSize()
,
getImageSize()
,
getImageWidth()
,
ImageColumns overview and related methods
public ListGridField setImageSize(int imageSize)
ListGrid.imageSize
. If set to a String,
assumed to be a property on each record that specifies the image height. For example, if field.imageSize
is "logoSize", record.logoSize
will control the size of the image.
imageSize
- New imageSize value. Default value is 16ListGridField
instance, for chaining setter callssetImageWidth(int)
,
setImageHeight(int)
,
ImageColumns overview and related methods
public int getImageSize()
ListGrid.imageSize
. If set to a String,
assumed to be a property on each record that specifies the image height. For example, if field.imageSize
is "logoSize", record.logoSize
will control the size of the image.
getImageWidth()
,
getImageHeight()
,
ImageColumns overview and related methods
public ListGridField setImageURLPrefix(java.lang.String imageURLPrefix)
ListGridFieldType
] set to "image"
and the URL for
the image displayed is not absolute, the path of the URL will be relative to this stringvalueIcons
when determining the URL for the image.
Note : This is an advanced setting
imageURLPrefix
- New imageURLPrefix value. Default value is nullListGridField
instance, for chaining setter callsImageColumns overview and related methods
,
Image Examplepublic java.lang.String getImageURLPrefix()
ListGridFieldType
] set to "image"
and the URL for
the image displayed is not absolute, the path of the URL will be relative to this stringvalueIcons
when determining the URL for the image.ImageColumns overview and related methods
,
Image Examplepublic ListGridField setImageURLSuffix(java.lang.String imageURLSuffix)
valueIcons
) or this is has ListGridFieldType
set to "image"
, the value of this property will be appended to
the end of the URL for the icon displayed.".gif"
to the filename of the image.FormItem.imageURLSuffix
.
Note : This is an advanced setting
imageURLSuffix
- New imageURLSuffix value. Default value is nullListGridField
instance, for chaining setter callsImageColumns overview and related methods
,
Image Examplepublic java.lang.String getImageURLSuffix()
valueIcons
) or this is has ListGridFieldType
set to "image"
, the value of this property will be appended to
the end of the URL for the icon displayed.".gif"
to the filename of the image.FormItem.imageURLSuffix
.ImageColumns overview and related methods
,
Image Examplepublic ListGridField setImageWidth(int imageWidth)
If set to a String, assumed to be a property
on each record that specifies the image width. For example, if field.imageWidth
is "logoWidth",
record.logoWidth
will control the width of the image.
imageWidth
- New imageWidth value. Default value is 16ListGridField
instance, for chaining setter callsListGrid.setImageSize(int)
,
setImageSize(int)
,
setImageHeight(int)
,
ImageColumns overview and related methods
public int getImageWidth()
If set to a String, assumed to be a property
on each record that specifies the image width. For example, if field.imageWidth
is "logoWidth",
record.logoWidth
will control the width of the image.
ListGrid.getImageSize()
,
getImageSize()
,
getImageHeight()
,
ImageColumns overview and related methods
public ListGridField setIncludeFrom(java.lang.String includeFrom)
field.type
and field.title
from the related DataSource just like fields from
the primary DataSource. When fechData()
is called, the
automatically created DSRequest
will specify DSRequest.additionalOutputs
requesting the field, and any
Criteria
generated by the component will likewise refer to the field from the related
DataSource.
It's an error to use this property if the ListGrid does not have a DataSource at all. The related DataSource must be loaded or a warning will be logged and the field definition ignored.
This value is expected to be
set to the following format dataSourceID.fieldName
where dataSourceID is the ID of the related
dataSource and fieldName is the name of the field from that dataSource from which you wish to retrieve values.
Note that if this property is set and field.name
is not
explicitly specified, this field's name
will default to the fieldName value from this property.
Note about automatic cache updates: "update" and "add" operations submitted automatically by this ListGrid will include
dsRequest.additionalOutputs
to ensure all data necessary for cache updates is returned by the server.
If your grid shows data that can be edited elsewhere in the UI (not by inline editing), to avoid problems with ResultSet
automatic cache synchronization, you may need to switch from using
listGridField.includeFrom
to dataSourceField.includeFrom
. This is because server responses to
"add" and "update" operations which are initiated outside of this grid do not know about the
listGridField.includeFrom
setting, and so will not automatically return data for fields included in this
way. Switching to dataSourceField.includeFrom
ensures the field is always included in server responses,
avoiding the issue.
includeFrom
- New includeFrom value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.String getIncludeFrom()
field.type
and field.title
from the related DataSource just like fields from
the primary DataSource. When fechData()
is called, the
automatically created DSRequest
will specify DSRequest.additionalOutputs
requesting the field, and any
Criteria
generated by the component will likewise refer to the field from the related
DataSource.
It's an error to use this property if the ListGrid does not have a DataSource at all. The related DataSource must be loaded or a warning will be logged and the field definition ignored.
This value is expected to be
set to the following format dataSourceID.fieldName
where dataSourceID is the ID of the related
dataSource and fieldName is the name of the field from that dataSource from which you wish to retrieve values.
Note that if this property is set and field.name
is not
explicitly specified, this field's name
will default to the fieldName value from this property.
Note about automatic cache updates: "update" and "add" operations submitted automatically by this ListGrid will include
dsRequest.additionalOutputs
to ensure all data necessary for cache updates is returned by the server.
If your grid shows data that can be edited elsewhere in the UI (not by inline editing), to avoid problems with ResultSet
automatic cache synchronization, you may need to switch from using
listGridField.includeFrom
to dataSourceField.includeFrom
. This is because server responses to
"add" and "update" operations which are initiated outside of this grid do not know about the
listGridField.includeFrom
setting, and so will not automatically return data for fields included in this
way. Switching to dataSourceField.includeFrom
ensures the field is always included in server responses,
avoiding the issue.
public ListGridField setIncludeInRecordSummary(java.lang.Boolean includeInRecordSummary)
includeInRecordSummaryFields
.includeInRecordSummary
- New includeInRecordSummary value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getIncludeInRecordSummary()
includeInRecordSummaryFields
.public ListGridField setIncludeInRecordSummaryFields(java.lang.String... includeInRecordSummaryFields)
"summary"
and this field will be included
in summary calculations by default,
this attribute provides an opportunity to explicitly specify which summary fields the record should be displayed in. Specified as an array of fieldNames. If set, this field value will only be included for record summary value calculations for summary fields who's name is included in this array.
includeInRecordSummaryFields
- New includeInRecordSummaryFields value. Default value is nullListGridField
instance, for chaining setter callsFieldName
public java.lang.String[] getIncludeInRecordSummaryFields()
"summary"
and this field will be included
in summary calculations by default,
this attribute provides an opportunity to explicitly specify which summary fields the record should be displayed in. Specified as an array of fieldNames. If set, this field value will only be included for record summary value calculations for summary fields who's name is included in this array.
FieldName
public ListGridField setInitialValue(java.lang.Object initialValue)
initialValue
applies only if a new record is created by end user action (such as navigating past the end of
the data when ListGrid.listEndEditAction
is
"next") or by a call to ListGrid.startEditingNew()
that does not specify the initialValues
argument.
initialValue
- New initialValue value. Default value is nullListGridField
instance, for chaining setter callsGrid Editing
public java.lang.Object getInitialValue()
initialValue
applies only if a new record is created by end user action (such as navigating past the end of
the data when ListGrid.listEndEditAction
is
"next") or by a call to ListGrid.startEditingNew()
that does not specify the initialValues
argument.
Grid Editing
public ListGridField setIsRemoveField(java.lang.Boolean isRemoveField)
ListGrid.canRemoveRecords
is
true, this field will be rendered as the remove-field for this grid. In most common usage scenarios this field will
essentially be a placeholder indicating where the remove field should be rendered, meaning properties other than
isRemoveField
, such as name
or title
, may be left unset.
Note : This is an advanced setting
isRemoveField
- New isRemoveField value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setCanRemoveRecords(java.lang.Boolean)
public java.lang.Boolean getIsRemoveField()
ListGrid.canRemoveRecords
is
true, this field will be rendered as the remove-field for this grid. In most common usage scenarios this field will
essentially be a placeholder indicating where the remove field should be rendered, meaning properties other than
isRemoveField
, such as name
or title
, may be left unset.ListGrid.getCanRemoveRecords()
public ListGridField setLeaveHeaderMenuButtonSpace(java.lang.Boolean leaveHeaderMenuButtonSpace)
ListGrid.showHeaderMenuButton
is true, when
auto-fitting fields to the title width via ListGrid.autoFitFieldWidths
or autoFitWidth
,
should the button be sized such that there is enough space for the header menu button to show without covering the field
title? May be explicitly specified at the field level
or at the grid level
. If not explicitly specified space
will be left for fields with align
set to
"left"
or "right"
, but not for fields with align set to "center"
.
Note : This is an advanced setting
leaveHeaderMenuButtonSpace
- New leaveHeaderMenuButtonSpace value. Default value is nullListGridField
instance, for chaining setter callspublic ListGridField setLinkText(java.lang.String linkText)
This property sets linkText that will be
the same for all records. You can set linkText on a per-record basis via ListGridRecord.linkText
.
linkText
- New linkText value. Default value is nullListGridField
instance, for chaining setter callsListGridFieldType
,
FieldType
,
ListGridRecord.setLinkText(java.lang.String)
,
ListGrid.setLinkTextProperty(java.lang.String)
,
setLinkTextProperty(java.lang.String)
,
Link (image) Examplepublic java.lang.String getLinkText()
This property sets linkText that will be
the same for all records. You can set linkText on a per-record basis via ListGridRecord.linkText
.
ListGridFieldType
,
FieldType
,
ListGridRecord.getLinkText()
,
ListGrid.getLinkTextProperty()
,
getLinkTextProperty()
,
Link (image) Examplepublic ListGridField setLinkTextProperty(java.lang.String linkTextProperty)
linkTextProperty
- New linkTextProperty value. Default value is nullListGridField
instance, for chaining setter callsListGridFieldType
,
FieldType
,
ListGridRecord.setLinkText(java.lang.String)
,
setLinkText(java.lang.String)
,
ListGrid.setLinkTextProperty(java.lang.String)
public java.lang.String getLinkTextProperty()
ListGridFieldType
,
FieldType
,
ListGridRecord.getLinkText()
,
getLinkText()
,
ListGrid.getLinkTextProperty()
public ListGridField setLinkURLPrefix(java.lang.String linkURLPrefix)
ListGridFieldType
] set to "link"
, setting this
property will apply a standard prefix to the link URL for cells in this field.
Note : This is an advanced setting
linkURLPrefix
- New linkURLPrefix value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.String getLinkURLPrefix()
ListGridFieldType
] set to "link"
, setting this
property will apply a standard prefix to the link URL for cells in this field.public ListGridField setLinkURLSuffix(java.lang.String linkURLSuffix)
ListGridFieldType
] set to "link"
, setting this
property will apply a standard suffix to the link URL for cells in this field.
Note : This is an advanced setting
linkURLSuffix
- New linkURLSuffix value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.String getLinkURLSuffix()
ListGridFieldType
] set to "link"
, setting this
property will apply a standard suffix to the link URL for cells in this field.public ListGridField setMaxWidth(java.lang.Integer maxWidth)
ListGrid.showHeader
is false and a field is subject
to autofitting (see ListGrid.autoFitFieldWidths
), sets the maximum width of the field. The actual effective maximum will be the largest of
this property, minWidth
, and ListGrid.minFieldWidth
. That is, minWidth
and ListGrid.minFieldWidth
dominate this property.maxWidth
- New maxWidth value. Default value is nullListGridField
instance, for chaining setter callssetWidth(int)
,
Appearance overview and related methods
public java.lang.Integer getMaxWidth()
ListGrid.showHeader
is false and a field is subject
to autofitting (see ListGrid.autoFitFieldWidths
), sets the maximum width of the field. The actual effective maximum will be the largest of
this property, minWidth
, and ListGrid.minFieldWidth
. That is, minWidth
and ListGrid.minFieldWidth
dominate this property.getWidth()
,
Appearance overview and related methods
public ListGridField setMinWidth(java.lang.Integer minWidth)
ListGrid.autoFitFieldWidths
), sets the minimum width of the field. The actual allowed minimum will be the maximum
of:width
(if a number),
ListGrid.minFieldWidth
minWidth
- New minWidth value. Default value is nullListGridField
instance, for chaining setter callssetWidth(int)
,
Appearance overview and related methods
public java.lang.Integer getMinWidth()
ListGrid.autoFitFieldWidths
), sets the minimum width of the field. The actual allowed minimum will be the maximum
of:width
(if a number),
ListGrid.minFieldWidth
getWidth()
,
Appearance overview and related methods
public ListGridField setMultiple(java.lang.Boolean multiple)
valueMap
is set, the
default editor will be a SelectItem
with SelectItem.multiple
set to true. Note that for
databound grids it typically makes sense to set DataSourceField.multiple
rather than setting the property directly on the ListGridField object.
setMultiple
in class Field
multiple
- New multiple value. Default value is falseListGridField
instance, for chaining setter callsGrid Editing
public java.lang.Boolean getMultiple()
valueMap
is set, the
default editor will be a SelectItem
with SelectItem.multiple
set to true. Note that for
databound grids it typically makes sense to set DataSourceField.multiple
rather than setting the property directly on the ListGridField object.
getMultiple
in class Field
Grid Editing
public ListGridField setName(java.lang.String name)
ListGrid
as well as a valid
JavaScript identifier - see FieldName
for details and how to check for validity. The name of the field is also the property in each record which holds the record's value for the field.
If a ListGrid.dataSource
is specified and the DataSource
has a field with the same name
, the ListGridField
and DataSourceField
are merged, with any
properties on the ListGridField
overriding those on the DataSourceField
.
setName
in class DBCField
name
- New name value. Default value is nullListGridField
instance, for chaining setter callsFieldName
public java.lang.String getName()
ListGrid
as well as a valid
JavaScript identifier - see FieldName
for details and how to check for validity. The name of the field is also the property in each record which holds the record's value for the field.
If a ListGrid.dataSource
is specified and the DataSource
has a field with the same name
, the ListGridField
and DataSourceField
are merged, with any
properties on the ListGridField
overriding those on the DataSourceField
.
public ListGridField setOptionCriteria(Criteria optionCriteria)
optionDataSource
is set for this
ListGridField, criteria specified in this attribute will be passed to the dataSource when performing the fetch operation
to determine data-value to display-value mappings See also optionTextMatchStyle
.
optionCriteria
- New optionCriteria value. Default value is nullListGridField
instance, for chaining setter callspublic Criteria getOptionCriteria()
optionDataSource
is set for this
ListGridField, criteria specified in this attribute will be passed to the dataSource when performing the fetch operation
to determine data-value to display-value mappings See also optionTextMatchStyle
.
public ListGridField setOptionOperationId(java.lang.String optionOperationId)
autoFetchDisplayMap
is set, this attribute
provides a way to customize the DSRequest.operationId
passed
to dataSource.fetchData()
when retrieving the display map from the option dataSource.optionOperationId
- New optionOperationId value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.String getOptionOperationId()
autoFetchDisplayMap
is set, this attribute
provides a way to customize the DSRequest.operationId
passed
to dataSource.fetchData()
when retrieving the display map from the option dataSource.public ListGridField setOptionTextMatchStyle(TextMatchStyle optionTextMatchStyle)
optionDataSource
, where
autoFetchDisplayMap
is true, this property
will govern the textMatchStyle
attribute of the DSRequest
parameter passed
to DataSource.fetchData()
when retrieving the remote data set to
be used as a basis for this field's valueMap.optionTextMatchStyle
- New optionTextMatchStyle value. Default value is nullListGridField
instance, for chaining setter callspublic TextMatchStyle getOptionTextMatchStyle()
optionDataSource
, where
autoFetchDisplayMap
is true, this property
will govern the textMatchStyle
attribute of the DSRequest
parameter passed
to DataSource.fetchData()
when retrieving the remote data set to
be used as a basis for this field's valueMap.public ListGridField setPartialSummary(java.lang.Boolean partialSummary)
"summary"
. This attribute is set on a summary field, when calculating the
summary value from some record, the summary function will only be passed the fields before this summary field. This may
be useful for displaying running totals across a record. Note that this feature would typically be used with canReorderFields:false
partialSummary
- New partialSummary value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getPartialSummary()
"summary"
. This attribute is set on a summary field, when calculating the
summary value from some record, the summary function will only be passed the fields before this summary field. This may
be useful for displaying running totals across a record. Note that this feature would typically be used with canReorderFields:false
public ListGridField setPendingAsyncCellValue(java.lang.String pendingAsyncCellValue)
If set, this will
override the grid-wide ListGrid.pendingAsyncCellValue
setting for the field.
pendingAsyncCellValue
- New pendingAsyncCellValue value. Default value is nullListGridField
instance, for chaining setter callsHTMLString
public java.lang.String getPendingAsyncCellValue()
If set, this will
override the grid-wide ListGrid.pendingAsyncCellValue
setting for the field.
HTMLString
public ListGridField setPrompt(java.lang.String prompt)
Canvas.prompt
for the header).prompt
- New prompt value. Default value is nullListGridField
instance, for chaining setter callsHTMLString
public java.lang.String getPrompt()
Canvas.prompt
for the header).HTMLString
public ListGridField setRequired(java.lang.Boolean required)
DataSourceField
,
enabling both client and server side validation.setRequired
in class Field
required
- New required value. Default value is falseListGridField
instance, for chaining setter callssetValidators(com.smartgwt.client.widgets.form.validator.Validator...)
,
GridValidation overview and related methods
public java.lang.Boolean getRequired()
DataSourceField
,
enabling both client and server side validation.com.smartgwt.client.widgets.grid.ListGridField#getValidators
,
GridValidation overview and related methods
public ListGridField setRotateTitle(java.lang.Boolean rotateTitle)
ListGrid.rotateHeaderTitles
.rotateTitle
- New rotateTitle value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setRotateHeaderTitles(java.lang.Boolean)
public java.lang.Boolean getRotateTitle()
ListGrid.rotateHeaderTitles
.ListGrid.getRotateHeaderTitles()
public ListGridField setSelectCellTextOnClick(java.lang.Boolean selectCellTextOnClick)
See ListGrid.selectCellTextOnClick
for more information.
selectCellTextOnClick
- New selectCellTextOnClick value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getSelectCellTextOnClick()
See ListGrid.selectCellTextOnClick
for more information.
public ListGridField setShouldPrint(java.lang.Boolean shouldPrint)
shouldPrint
- New shouldPrint value. Default value is nullListGridField
instance, for chaining setter callsPrinting
public java.lang.Boolean getShouldPrint()
Printing
public ListGridField setShowAlternateStyle(java.lang.Boolean showAlternateStyle)
Note : This is an advanced setting
showAlternateStyle
- New showAlternateStyle value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getShowAlternateStyle()
public ListGridField setShowDefaultContextMenu(java.lang.Boolean showDefaultContextMenu)
showDefaultContextMenu
- New showDefaultContextMenu value. Default value is trueListGridField
instance, for chaining setter callspublic java.lang.Boolean getShowDefaultContextMenu()
public ListGridField setShowDisabledIcon(java.lang.Boolean showDisabledIcon)
showDisabledIcon
- New showDisabledIcon value. Default value is trueListGridField
instance, for chaining setter callssetIcon(java.lang.String)
,
Button Icon
public java.lang.Boolean getShowDisabledIcon()
getIcon()
,
Button Icon
public ListGridField setShowDownIcon(java.lang.Boolean showDownIcon)
showDownIcon
- New showDownIcon value. Default value is falseListGridField
instance, for chaining setter callssetIcon(java.lang.String)
,
Button Icon
public java.lang.Boolean getShowDownIcon()
getIcon()
,
Button Icon
public ListGridField setShowEllipsisWhenClipped(java.lang.Boolean showEllipsisWhenClipped)
ListGrid.showEllipsisWhenClipped
showEllipsisWhenClipped
- New showEllipsisWhenClipped value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getShowEllipsisWhenClipped()
ListGrid.showEllipsisWhenClipped
public ListGridField setShowFileInline(java.lang.Boolean showFileInline)
showFileInline
- New showFileInline value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getShowFileInline()
public ListGridField setShowFilterEditorHovers(java.lang.Boolean showFilterEditorHovers)
ListGrid.filterWindowCriteria
description if configured. All hovers for the filter editor can be disabled using
ListGrid.showFilterEditorHovers
.
The
descriptive text for criteria is formatted by DataSource.getAdvancedCriteriaDescription()
.
showFilterEditorHovers
- New showFilterEditorHovers value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setShowFilterEditorHovers(java.lang.Boolean)
public java.lang.Boolean getShowFilterEditorHovers()
ListGrid.filterWindowCriteria
description if configured. All hovers for the filter editor can be disabled using
ListGrid.showFilterEditorHovers
.
The
descriptive text for criteria is formatted by DataSource.getAdvancedCriteriaDescription()
.
ListGrid.getShowFilterEditorHovers()
public ListGridField setShowFocusedIcon(java.lang.Boolean showFocusedIcon)
If StatefulCanvas.showFocusedAsOver
is true, the
"Over"
icon will be displayed when the canvas has focus, otherwise a separate "Focused"
icon
will be displayed
showFocusedIcon
- New showFocusedIcon value. Default value is falseListGridField
instance, for chaining setter callssetIcon(java.lang.String)
,
Button Icon
public java.lang.Boolean getShowFocusedIcon()
If StatefulCanvas.showFocusedAsOver
is true, the
"Over"
icon will be displayed when the canvas has focus, otherwise a separate "Focused"
icon
will be displayed
getIcon()
,
Button Icon
public ListGridField setShowGridSummary(java.lang.Boolean showGridSummary)
ListGrid.showGridSummary
is true, should this
field show a summary value. If unset, this field will show a summary value in the summary row if an explicit summaryFunction
is specified or if a default summary function
is defined for the specified
field type.showGridSummary
- New showGridSummary value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getShowGridSummary()
ListGrid.showGridSummary
is true, should this
field show a summary value. If unset, this field will show a summary value in the summary row if an explicit summaryFunction
is specified or if a default summary function
is defined for the specified
field type.public ListGridField setShowGroupSummary(java.lang.Boolean showGroupSummary)
ListGrid.showGroupSummary
is true, should this
field show a summary value in a summary row when the grid is grouped? If unset, this field will show a summary value in
the summary row if an explicit summaryFunction
is specified or if a default summary function
is
defined for the specified field type.showGroupSummary
- New showGroupSummary value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getShowGroupSummary()
ListGrid.showGroupSummary
is true, should this
field show a summary value in a summary row when the grid is grouped? If unset, this field will show a summary value in
the summary row if an explicit summaryFunction
is specified or if a default summary function
is
defined for the specified field type.public ListGridField setShowHilitesInGroupSummary(java.lang.Boolean showHilitesInGroupSummary)
All hilites in group summary rows can be controlled with the ListGrid.showHilitesInGroupSummary
property.
showHilitesInGroupSummary
- New showHilitesInGroupSummary value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getShowHilitesInGroupSummary()
All hilites in group summary rows can be controlled with the ListGrid.showHilitesInGroupSummary
property.
public ListGridField setShowHover(java.lang.Boolean showHover)
field.hoverHTML()
. ListGrid.showHover
can be set to true to cause hovers to be
shown for all fields by default. In this case, field.showHover
can be set to false to suppress hovers for
an individual field.
All hovers can be disabled, regardless of other settings, by setting ListGrid.canHover
to false.
showHover
- New showHover value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getShowHover()
field.hoverHTML()
. ListGrid.showHover
can be set to true to cause hovers to be
shown for all fields by default. In this case, field.showHover
can be set to false to suppress hovers for
an individual field.
All hovers can be disabled, regardless of other settings, by setting ListGrid.canHover
to false.
public ListGridField setShowHoverComponents(java.lang.Boolean showHoverComponents)
A number of
builtin modes are provided - see HoverMode
.
Also supported at the ListGrid-level
.
showHoverComponents
- New showHoverComponents value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getShowHoverComponents()
A number of
builtin modes are provided - see HoverMode
.
Also supported at the ListGrid-level
.
public ListGridField setShowRollOverIcon(java.lang.Boolean showRollOverIcon)
showRollOverIcon
- New showRollOverIcon value. Default value is falseListGridField
instance, for chaining setter callssetIcon(java.lang.String)
,
Button Icon
public java.lang.Boolean getShowRollOverIcon()
getIcon()
,
Button Icon
public ListGridField setShowSelectedIcon(java.lang.Boolean showSelectedIcon)
showSelectedIcon
- New showSelectedIcon value. Default value is falseListGridField
instance, for chaining setter callssetIcon(java.lang.String)
,
Button Icon
public java.lang.Boolean getShowSelectedIcon()
getIcon()
,
Button Icon
public ListGridField setShowTitle(java.lang.Boolean showTitle)
false
to explicitly suppress display of the field title in the column header
button for the field.showTitle
- New showTitle value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getShowTitle()
false
to explicitly suppress display of the field title in the column header
button for the field.public ListGridField setShowValueIconOnly(java.lang.Boolean showValueIconOnly)
If unset the default behavior is to show the icon only if an explicit valueMap is specified as well in addition to a valueIcons map, otherwise show both the valueIcon and value for the cell.
Note that if this field is editable FormItem.showValueIconOnly
will be passed through
to editors displayed in this field.
showValueIconOnly
- New showValueIconOnly value. Default value is nullListGridField
instance, for chaining setter callssetValueIcons(java.util.Map<java.lang.String, java.lang.String>)
,
setSuppressValueIcon(java.lang.Boolean)
,
ImageColumns overview and related methods
public java.lang.Boolean getShowValueIconOnly()
If unset the default behavior is to show the icon only if an explicit valueMap is specified as well in addition to a valueIcons map, otherwise show both the valueIcon and value for the cell.
Note that if this field is editable FormItem.showValueIconOnly
will be passed through
to editors displayed in this field.
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons
,
getSuppressValueIcon()
,
ImageColumns overview and related methods
public ListGridField setSkipLineBreaks(java.lang.Boolean skipLineBreaks)
escaping HTML
, we convert line
breaks (\r\n, \r, and \n) to HTML <br> tags so that visible cell content respects the original break characters.
Set this property true to instead show the content as a single line (or potentially wrapped to avoid clipping if ListGrid.wrapCells
is true). If defaulted to null, behavior
is determined by ListGrid.skipLineBreaks
.
skipLineBreaks
- New skipLineBreaks value. Default value is nullListGridField
instance, for chaining setter callssetEscapeHTML(java.lang.Boolean)
public java.lang.Boolean getSkipLineBreaks()
escaping HTML
, we convert line
breaks (\r\n, \r, and \n) to HTML <br> tags so that visible cell content respects the original break characters.
Set this property true to instead show the content as a single line (or potentially wrapped to avoid clipping if ListGrid.wrapCells
is true). If defaulted to null, behavior
is determined by ListGrid.skipLineBreaks
.
getEscapeHTML()
public ListGridField setSortByDisplayField(java.lang.Boolean sortByDisplayField)
displayField
configured, should
client-side sorting be performed on the display field value? Unless explicitly set to false
, the display
field value is used.sortByDisplayField
- New sortByDisplayField value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getSortByDisplayField()
displayField
configured, should
client-side sorting be performed on the display field value? Unless explicitly set to false
, the display
field value is used.public ListGridField setSortByMappedValue(java.lang.Boolean sortByMappedValue)
valueMap
is set, and the grid is sorted
by this field, should the data be sorted by the underlying
data value or the mapped display value. If unset, will sort by display value. Set to false
to sort by
underlying data value. Note that this has no effect if a sortNormalizer()
has been specified.sortByMappedValue
- New sortByMappedValue value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.Boolean getSortByMappedValue()
valueMap
is set, and the grid is sorted
by this field, should the data be sorted by the underlying
data value or the mapped display value. If unset, will sort by display value. Set to false
to sort by
underlying data value. Note that this has no effect if a sortNormalizer()
has been specified.public ListGridField setSortDirection(SortDirection sortDirection)
default sort field
for the listGrid, sorting occurs
automatically, otherwise this will be the default direction when the user clicks the field header, or calls ListGrid.sort()
without specifying an explicit sort direction.
Overrides ListGrid.sortDirection
.
Because the
grid's sortDirection
setting is updated whenever the grid is sorted, it is recommended to explicitly set
the field's sortDirection
if it is important to use a particular sorting direction as the default for the
field.
sortDirection
- New sortDirection value. Default value is nullListGridField
instance, for chaining setter callsSortDirection
public SortDirection getSortDirection()
default sort field
for the listGrid, sorting occurs
automatically, otherwise this will be the default direction when the user clicks the field header, or calls ListGrid.sort()
without specifying an explicit sort direction.
Overrides ListGrid.sortDirection
.
Because the
grid's sortDirection
setting is updated whenever the grid is sorted, it is recommended to explicitly set
the field's sortDirection
if it is important to use a particular sorting direction as the default for the
field.
SortDirection
public ListGridField setSpannedHeaderBaseStyle(java.lang.String spannedHeaderBaseStyle)
ListGrid.spannedHeaderBaseStyle
when the grid is
showing header spans.spannedHeaderBaseStyle
- New spannedHeaderBaseStyle value. Default value is nullListGridField
instance, for chaining setter callsCSSStyleName
,
Appearance overview and related methods
public java.lang.String getSpannedHeaderBaseStyle()
ListGrid.spannedHeaderBaseStyle
when the grid is
showing header spans.CSSStyleName
,
Appearance overview and related methods
public ListGridField setSummaryTitle(java.lang.String summaryTitle)
headerTitle
attribute to show a different title in the
column header button than the title used elsewhere.title
. This gives the developer an option to use a very short,
or empty title for the ListGrid column (where space may be a factor), but have a longer value available to be used
elsewhere. By default this value will be used for the title of the context-menu item for showing/hiding the listGrid field when the user right-clicks on the ListGrid header.
Note : This is an advanced setting
summaryTitle
- New summaryTitle value. Default value is nullListGridField
instance, for chaining setter callssetTitle(java.lang.String)
,
Appearance overview and related methods
public java.lang.String getSummaryTitle()
headerTitle
attribute to show a different title in the
column header button than the title used elsewhere.title
. This gives the developer an option to use a very short,
or empty title for the ListGrid column (where space may be a factor), but have a longer value available to be used
elsewhere. By default this value will be used for the title of the context-menu item for showing/hiding the listGrid field when the user right-clicks on the ListGrid header.
getTitle()
,
Appearance overview and related methods
public ListGridField setSummaryValue(java.lang.String summaryValue)
summaryRow
. The default for normal fields is null and for
special fields, like the checkboxField
, the default
is to show a blank value (a non-breaking space).summaryValue
- New summaryValue value. Default value is nullListGridField
instance, for chaining setter callsHTMLString
public java.lang.String getSummaryValue()
summaryRow
. The default for normal fields is null and for
special fields, like the checkboxField
, the default
is to show a blank value (a non-breaking space).HTMLString
public ListGridField setSummaryValueTitle(java.lang.String summaryValueTitle)
ListGrid.showGridSummary
or ListGrid.showGroupSummary
is true and the summaryFunction
is set to "title"
, this
attribute may be set to a string to display in the group and/or grid summary. If unspecified the title
will show up in the summary.summaryValueTitle
- New summaryValueTitle value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.String getSummaryValueTitle()
ListGrid.showGridSummary
or ListGrid.showGroupSummary
is true and the summaryFunction
is set to "title"
, this
attribute may be set to a string to display in the group and/or grid summary. If unspecified the title
will show up in the summary.public ListGridField setSuppressValueIcon(java.lang.Boolean suppressValueIcon)
Note this property may also be set to false to avoid showing the standard
ListGrid.booleanTrueImage
and ListGrid.booleanFalseImage
for fields of type
boolean
.
suppressValueIcon
- New suppressValueIcon value. Default value is nullListGridField
instance, for chaining setter callssetValueIcons(java.util.Map<java.lang.String, java.lang.String>)
,
setShowValueIconOnly(java.lang.Boolean)
,
ImageColumns overview and related methods
public java.lang.Boolean getSuppressValueIcon()
Note this property may also be set to false to avoid showing the standard
ListGrid.booleanTrueImage
and ListGrid.booleanFalseImage
for fields of type
boolean
.
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons
,
getShowValueIconOnly()
,
ImageColumns overview and related methods
public ListGridField setTarget(java.lang.String target)
target
attribute of
the anchor tag used to render the link. If you set listGridField.target to "javascript", the default behavior is to
catch and consume mouse-clicks that would result in the link being followed. Instead, the ListGrid.cellClick()
event is fired for the containing
cell.
target
- New target value. Default value is "_blank"ListGridField
instance, for chaining setter callspublic java.lang.String getTarget()
target
attribute of
the anchor tag used to render the link. If you set listGridField.target to "javascript", the default behavior is to
catch and consume mouse-clicks that would result in the link being followed. Instead, the ListGrid.cellClick()
event is fired for the containing
cell.
public ListGridField setTimeFormatter(TimeDisplayFormat timeFormatter)
"time"
though if no explicit dateFormatter
is specified it will be respected for other fields as well. If unspecified, a timeFormatter may be
defined at the component level
and will be respected
by fields of type "time"
.
If this field is editable, the timeFormatter will also be passed to the
editor created to edit this field as FormItem.timeFormatter
.
Note : This is an advanced setting
timeFormatter
- New timeFormatter value. Default value is nullListGridField
instance, for chaining setter callsAppearance overview and related methods
public TimeDisplayFormat getTimeFormatter()
"time"
though if no explicit dateFormatter
is specified it will be respected for other fields as well. If unspecified, a timeFormatter may be
defined at the component level
and will be respected
by fields of type "time"
.
If this field is editable, the timeFormatter will also be passed to the
editor created to edit this field as FormItem.timeFormatter
.
Appearance overview and related methods
public ListGridField setTitle(java.lang.String title)
menu for picking visible fields
. Note: To customize the
display of just the title in the header, use the headerTitle
property instead so that other places where the title appears in the UI are not affected. For example, you
might set headerTitle
to an empty string to suppress the header title on a narrow column, but you would
retain the normal title in the title
property to avoid a blank menu item in the field picker menu, hilite editor
, and other contexts.
If this method is called after the component has been drawn/initialized:
Change the title of a field after the grid is created.
setTitle
in class Field
title
- name of the field, or index. Default value is nullListGridField
instance, for chaining setter callsField.setExportTitle(java.lang.String)
,
HTMLString
,
Appearance overview and related methods
public java.lang.String getTitle()
menu for picking visible fields
. Note: To customize the
display of just the title in the header, use the headerTitle
property instead so that other places where the title appears in the UI are not affected. For example, you
might set headerTitle
to an empty string to suppress the header title on a narrow column, but you would
retain the normal title in the title
property to avoid a blank menu item in the field picker menu, hilite editor
, and other contexts.
getTitle
in class Field
Field.getExportTitle()
,
HTMLString
,
Appearance overview and related methods
public ListGridField setType(ListGridFieldType type)
ListGridFieldType
for a summary of how types are rendered.type
- New type value. Default value is "text"ListGridField
instance, for chaining setter callsListGridFieldType
,
FieldType
,
Appearance overview and related methods
public ListGridFieldType getType()
ListGridFieldType
for a summary of how types are rendered.ListGridFieldType
,
FieldType
,
Appearance overview and related methods
public ListGridField setUserFormula(UserFormula userFormula)
Advanced applications that wish to save formulas separately from a grid's viewState
can provide a UserFormula
as part of the field definition, and may subsequently respond to an updated
formula via the ListGrid.formulaUpdated()
notification.
Note that the current implementation of UserFormula
simply executes UserFormula.text
as a JavaScript string after making special variables
and methods available to the formula. It is safe to allow users to define formulas for themselves (since an end user can
always execute whatever JavaScript they want via the browser's built-in developer tools), and is safe to allow formulas
to be shared between trusted users. However it would not be safe to allow an untrusted user to create formulas that are
shared to other users.
Also, while the current implementation would allow creation of a formula that calls JavaScript functions that are not part of the standard or custom MathFunctions, this should not be relied upon, as future versions of the formula engine may prohibit such calls.
To change this field's formula, either call ListGrid.setUserFormula()
with a new UserFormula
object or call ListGrid.setUserFormulaText()
to
change just the UserFormula.text
.
It is undefined behavior
to share the same record objects, or the same ResultSet
instances, among multiple grids
if one of the grid's fields specifies a userFormula
, userSummary
, aiFieldRequest
, or aiHoverRequest
, or if one of the grids has a Hilite
with an asynchronous filter in the hilite's criteria
.
If this method is called after the component has been drawn/initialized:
Updates the userFormula
of the specified field. This method is preferred over setting the the 'userFormula' property of the field directly because it also updates any component dependencies and recalculates the field. If the formula is not passed, it is assumed that the formula has already been updated and only the dependency propagation logic will run.
Known component dependencies are:
userFormula
- field owning the formula. Default value is nullListGridField
instance, for chaining setter callspublic UserFormula getUserFormula()
Advanced applications that wish to save formulas separately from a grid's viewState
can provide a UserFormula
as part of the field definition, and may subsequently respond to an updated
formula via the ListGrid.formulaUpdated()
notification.
Note that the current implementation of UserFormula
simply executes UserFormula.text
as a JavaScript string after making special variables
and methods available to the formula. It is safe to allow users to define formulas for themselves (since an end user can
always execute whatever JavaScript they want via the browser's built-in developer tools), and is safe to allow formulas
to be shared between trusted users. However it would not be safe to allow an untrusted user to create formulas that are
shared to other users.
Also, while the current implementation would allow creation of a formula that calls JavaScript functions that are not part of the standard or custom MathFunctions, this should not be relied upon, as future versions of the formula engine may prohibit such calls.
To change this field's formula, either call ListGrid.setUserFormula()
with a new UserFormula
object or call ListGrid.setUserFormulaText()
to
change just the UserFormula.text
.
It is undefined behavior
to share the same record objects, or the same ResultSet
instances, among multiple grids
if one of the grid's fields specifies a userFormula
, userSummary
, aiFieldRequest
, or aiHoverRequest
, or if one of the grids has a Hilite
with an asynchronous filter in the hilite's criteria
.
public ListGridField setUserSummary(UserSummary userSummary)
Advanced applications that wish to save summaries separately from a grid's viewState
can provide a UserSummary
as part of the field definition, and may subsequently respond to an updated
summary via the ListGrid.summaryUpdated()
notification.
To change this field's summary definition, either call ListGrid.setUserSummary()
with a new UserSummary
object or call ListGrid.setUserSummaryText()
to
change just the UserSummary.text
.
It is undefined behavior
to share the same record objects, or the same ResultSet
instances, among multiple grids
if one of the grid's fields specifies a userSummary
, userFormula
, aiFieldRequest
, or aiHoverRequest
, or if one of the grids has a Hilite
with an asynchronous filter in the hilite's criteria
.
If this method is called after the component has been drawn/initialized:
Updates the userSummary
of the specified field. This method is preferred over setting the 'userSummary' property of the field directly because it also updates any component dependencies and recomputes the field. If the summary is not passed, it is assumed that the summary has already been updated and only the dependency propagation logic will run.
Known component dependencies are:
userSummary
- field owning the summary. Default value is nullListGridField
instance, for chaining setter callspublic UserSummary getUserSummary()
Advanced applications that wish to save summaries separately from a grid's viewState
can provide a UserSummary
as part of the field definition, and may subsequently respond to an updated
summary via the ListGrid.summaryUpdated()
notification.
To change this field's summary definition, either call ListGrid.setUserSummary()
with a new UserSummary
object or call ListGrid.setUserSummaryText()
to
change just the UserSummary.text
.
It is undefined behavior
to share the same record objects, or the same ResultSet
instances, among multiple grids
if one of the grid's fields specifies a userSummary
, userFormula
, aiFieldRequest
, or aiHoverRequest
, or if one of the grids has a Hilite
with an asynchronous filter in the hilite's criteria
.
public ListGridField setValidateOnChange(java.lang.Boolean validateOnChange)
validators
for this field will
be run whenever the value of the field is changed. Analogous to the FormItem.validateOnChange
property.
validateOnChange
- New validateOnChange value. Default value is nullListGridField
instance, for chaining setter callsGridValidation overview and related methods
public java.lang.Boolean getValidateOnChange()
validators
for this field will
be run whenever the value of the field is changed. Analogous to the FormItem.validateOnChange
property.
GridValidation overview and related methods
public ListGridField setValidators(Validator... validators)
Validator
objects for this field. When the user edits cells
in this field, these validators will be applied to the edited value.DataSourceField
, enabling both client and server side
validation.validators
- New validators value. Default value is nullListGridField
instance, for chaining setter callsValidator
,
setRequired(java.lang.Boolean)
,
GridValidation overview and related methods
,
Data validation Examplepublic ListGridField setValign(VerticalAlignment valign)
ListGrid.headerTitleVAlign
.valign
- New valign value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setRotateHeaderTitles(java.lang.Boolean)
public VerticalAlignment getValign()
ListGrid.headerTitleVAlign
.ListGrid.getRotateHeaderTitles()
public ListGridField setValueField(java.lang.String valueField)
optionDataSource
field used to
retrieve the stored values that are to be mapped to the display values (specified by displayField
). Note that if this field is editable this
will also be applied to this field's editors.valueField
- New valueField value. Default value is nullListGridField
instance, for chaining setter callspublic java.lang.String getValueField()
optionDataSource
field used to
retrieve the stored values that are to be mapped to the display values (specified by displayField
). Note that if this field is editable this
will also be applied to this field's editors.public ListGridField setValueIconHeight(java.lang.Integer valueIconHeight)
ListGrid.valueIconSize
, ListGrid.valueIconHeight
, and valueIconSize
.valueIconHeight
- New valueIconHeight value. Default value is nullListGridField
instance, for chaining setter callsImageColumns overview and related methods
public java.lang.Integer getValueIconHeight()
ListGrid.valueIconSize
, ListGrid.valueIconHeight
, and valueIconSize
.ImageColumns overview and related methods
public ListGridField setValueIconLeftPadding(java.lang.Integer valueIconLeftPadding)
ListGrid.valueIconLeftPadding
valueIconLeftPadding
- New valueIconLeftPadding value. Default value is nullListGridField
instance, for chaining setter callssetValueIcons(java.util.Map<java.lang.String, java.lang.String>)
,
ImageColumns overview and related methods
public java.lang.Integer getValueIconLeftPadding()
ListGrid.valueIconLeftPadding
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons
,
ImageColumns overview and related methods
public ListGridField setValueIconOrientation(java.lang.String valueIconOrientation)
showValueIconOnly
is truevalueIconOrientation
- New valueIconOrientation value. Default value is nullListGridField
instance, for chaining setter callsImageColumns overview and related methods
public java.lang.String getValueIconOrientation()
showValueIconOnly
is trueImageColumns overview and related methods
public ListGridField setValueIconRightPadding(java.lang.Integer valueIconRightPadding)
ListGrid.valueIconRightPadding
valueIconRightPadding
- New valueIconRightPadding value. Default value is nullListGridField
instance, for chaining setter callssetValueIcons(java.util.Map<java.lang.String, java.lang.String>)
,
ImageColumns overview and related methods
public java.lang.Integer getValueIconRightPadding()
ListGrid.valueIconRightPadding
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons
,
ImageColumns overview and related methods
public ListGridField setValueIcons(java.util.Map<java.lang.String,java.lang.String> valueIcons)
urls
for
icons to display for those data values.
For example, given a field named "status" with possible values "Normal", "Slow", "Offline", the follow definition would show various icons for that field:
ListGridField statusField = new ListGridField("status"); statusField.setValueIcons(new HashMap<String, String>() {{ put("Normal", "greenIcon.png"); put("Slow", "yellowIcon.png"); put("Offline", "redIcon.png"); }});
If a simple value-to-URL mapping is not enough, you can override ListGrid.getValueIcon()
to customize the behavior. You can even specify an empty valueIcons
map
and use ListGrid.getValueIcon()
to return arbitrary icons
with no fixed mapping.
valueIcons
can either be displayed alongside the normal value or can
replace the normal field value so that only the icon is shown. See
showValueIconOnly
. When placed alongside
the value, use
valueIconOrientation
to control left- vs
right-side placement.
If inline editing is enabled for this field, editors displayed for this field will also
show valueIcons. This may be overridden by explicitly setting
editorValueIcons
.
Note that the following attributes related to valueIcon styling will also be picked up
by the editor from the ListGridField object unless explicitly specified via the
equivalent editor_
attributes:
valueIconWidth
valueIconHeight
valueIconSize
valueIconLeftPadding
valueIconRightPadding
imageURLPrefix
imageURLSuffix
If ListGridField.valueIconClick()
is
defined for the field, a pointer
cursor will be shown when the user rolls over the valueIcon, and the valueIconClick
method will execute when the user clicks the icon.
valueIcons
- New valueIcons value. Default value is nullListGridField
instance, for chaining setter callsImageColumns overview and related methods
public ListGridField setValueIconSize(java.lang.Integer valueIconSize)
valueIconWidth
and {ListGridField.valueIconHeight}valueIconSize
- New valueIconSize value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setValueIconSize(int)
,
setValueIconWidth(java.lang.Integer)
,
setValueIconHeight(java.lang.Integer)
,
ImageColumns overview and related methods
public java.lang.Integer getValueIconSize()
valueIconWidth
and {ListGridField.valueIconHeight}ListGrid.getValueIconSize()
,
getValueIconWidth()
,
getValueIconHeight()
,
ImageColumns overview and related methods
public ListGridField setValueIconWidth(java.lang.Integer valueIconWidth)
ListGrid.valueIconSize
, ListGrid.valueIconWidth
, and valueIconSize
.valueIconWidth
- New valueIconWidth value. Default value is nullListGridField
instance, for chaining setter callsImageColumns overview and related methods
public java.lang.Integer getValueIconWidth()
ListGrid.valueIconSize
, ListGrid.valueIconWidth
, and valueIconSize
.ImageColumns overview and related methods
public ListGridField setValueMap(java.util.Map valueMap)
ListGrid.canEdit
, canEdit
), editors displayed for
this field will pick up their valueMap either from this value or from editorValueMap
. See also DataSourceField.valueMap
.
setValueMap
in class Field
valueMap
- New valueMap value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setValueMap(java.lang.String, java.util.LinkedHashMap)
,
ListGrid.getDisplayValue(java.lang.String, int)
,
List Examplepublic ListGridField setValueMap(java.lang.String... valueMap)
ListGrid.canEdit
, canEdit
), editors displayed for
this field will pick up their valueMap either from this value or from editorValueMap
. See also DataSourceField.valueMap
.
valueMap
- New valueMap value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setValueMap(java.lang.String, java.util.LinkedHashMap)
,
ListGrid.getDisplayValue(java.lang.String, int)
,
List Examplepublic ListGridField setVisibleWhen(Criteria visibleWhen)
This criteria is dynamic and will be
renterpreted each time the rule context changes. Note that calling ListGrid.showField()
or ListGrid.hideField()
explicitly will cause any visibleWhen
attribute to be dropped.
visibleWhen
- New visibleWhen value. Default value is nullListGridField
instance, for chaining setter callsDynamic Rules
public Criteria getVisibleWhen()
This criteria is dynamic and will be
renterpreted each time the rule context changes. Note that calling ListGrid.showField()
or ListGrid.hideField()
explicitly will cause any visibleWhen
attribute to be dropped.
Dynamic Rules
public ListGridField setWrap(java.lang.Boolean wrap)
ListGrid.wrapHeaderTitles
. (This is
a soft-wrap - if set the title will wrap at word boundaries.) Notes:
width
and minWidth
can be set to control the minimum field width - see
the links for details. ListGrid.clipHeaderTitles
, and
clipHeaderTitles
will be disabled for wrapping fields.wrap
- New wrap value. Default value is nullListGridField
instance, for chaining setter callsListGrid.setMinFieldWidth(int)
public java.lang.Boolean getWrap()
ListGrid.wrapHeaderTitles
. (This is
a soft-wrap - if set the title will wrap at word boundaries.) Notes:
width
and minWidth
can be set to control the minimum field width - see
the links for details. ListGrid.clipHeaderTitles
, and
clipHeaderTitles
will be disabled for wrapping fields.ListGrid.getMinFieldWidth()
public com.google.gwt.event.shared.HandlerRegistration addEditorEnterHandler(EditorEnterHandler handler)
Callback fired when the user first starts editing a cell.
This callback is typically used to establish dynamic
default values via ListGrid.setEditValue()
or ListGrid.setEditValues()
.
addEditorEnterHandler
in interface HasEditorEnterHandlers
handler
- the editorEnter handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addEditorExitHandler(EditorExitHandler handler)
Callback fired when the user attempts to navigate away from the current edit cell, or complete the current edit.
Call EditorExitEvent.cancel()
from within EditorExitHandler.onEditorExit(com.smartgwt.client.widgets.grid.events.EditorExitEvent)
from this method to cancel the default behavior
(Saving / cancelling the current edit / moving to the next edit cell)
addEditorExitHandler
in interface HasEditorExitHandlers
handler
- the editorExit handlerHandlerRegistration
used to remove this handlerpublic java.lang.String formatCellValue(java.lang.Object value, ListGridRecord record, int rowNum, int colNum, ListGrid grid)
setCellFormatter()
or ListGrid.setCellFormatter()
to install a CellFormatter
. This method is not a valid override point for the default behavior.Given the raw value for this field as taken from the record Formatter to apply to the static values displayed in cells for this field.
Example usage: formatting a
currency value stored in cents (so "100" to "$1.00")
The value passed to this method is the raw value for the
cell.
Takes precedence over formatCellValue
defined at the grid level for cells in this field.
Note: this formatter will not be applied to the values displayed in cells being edited. The formatEditorValue()
is provided for that purpose.
value
- raw value for the cell, from the record for the rowrecord
- Record object for the cell. Note: If this is a new row that has not been saved, in an editable grid, it has no
associated record object. In this case the edit values will be passed in as this parameter (see ListGrid.getEditValues()
)rowNum
- row number for the cellcolNum
- column number for the cell.grid
- the ListGrid displaying the cellHTMLString
ListGrid.setCellFormatter(com.smartgwt.client.widgets.grid.CellFormatter)
,
com.smartgwt.client.widgets.grid.ListGridField#formatEditorValue
,
Format values Examplepublic int getAutoFreezePosition()
autoFreeze
set to true, developers
can implement this method to indicate where in the frozen-fields array this field should appear. Some automatically
generated fields, such as rowNumberField
, expansionField
and checkboxField
, provide default implementations of this
method.
Frozen Fields
public com.google.gwt.event.shared.HandlerRegistration addRecordClickHandler(RecordClickHandler handler)
Executed when this field is clicked on. Note that if ListGrid.recordClick()
is also defined, it will be fired for fields that define a recordClick handler if the
field-level handler returns true. Call RecordClickEvent.cancel()
from
within RecordClickHandler.onRecordClick(com.smartgwt.client.widgets.grid.events.RecordClickEvent)
to prevent the grid-level
handler from firing.
addRecordClickHandler
in interface HasRecordClickHandlers
handler
- the recordClick handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addValueIconClickHandler(ValueIconClickHandler handler)
Executed when the user clicks on a value icon
within this field. Call ValueIconClickEvent.cancel()
from within ValueIconClickHandler.onValueIconClick(com.smartgwt.client.widgets.grid.events.ValueIconClickEvent)
to suppress default behavior of firing
ListGridField.recordClick()
handlers, etc.
addValueIconClickHandler
in interface HasValueIconClickHandlers
handler
- the valueIconClick handlerHandlerRegistration
used to remove this handlerpublic void setDefaultFilterValue(java.lang.String defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(java.lang.Integer defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(java.lang.Float defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(java.lang.Boolean defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(java.util.Date defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setCellFormatter(CellFormatter formatter)
ListGrid.setCellFormatter(com.smartgwt.client.widgets.grid.CellFormatter)
.formatter
- formatter to apply to the cell valuesCellFormatter
public void setInactiveCellFormatter(CellFormatter formatter)
If present, this method will be invoked instead of setCellFormatter()
in cases where the grid is
rendering non-interactive content outside. See ListGrid.setInactiveCellFormatter(com.smartgwt.client.widgets.grid.CellFormatter)
for more details.
formatter
- formatter to apply to inactive cell valuesListGrid.setInactiveCellFormatter(com.smartgwt.client.widgets.grid.CellFormatter)
public void setEditValueFormatter(CellEditValueFormatter formatter)
Example usage: converting a stored value in cents (100) to a dollar-and-cents value in the editor (1.00)
The value passed to this method is the raw value for the cell.
To convert the formatted value displayed within an editor back to a raw value, implement com.smartgwt.client.widgets.grid.ListGridField#setEditorValueParser
as well.
formatter
- the CellEditValueFormatterEditing overview and related methods
public void setEditValueParser(CellEditValueParser parser)
parser
- the CellEditValueParserEditing overview and related methods
public void setSortNormalizer(SortNormalizer normalizer)
Note that, if the dataset
exceeds dataPageSize
and hence paging is
introduced, the grid relies on the server to provide sorting, and the sortNormalizer will no longer be called.
For custom sort orders that can be executed both client and server, consider
sortByField
.
normalizer
- the sort normalizerpublic void setHoverCustomizer(HoverCustomizer hoverCustomizer)
hoverCustomizer
- the hover customizerpublic void setGroupSummaryCustomizer(GroupSummaryCustomizer groupSummaryCustomizer)
groupSummaryCustomizer
- the group summary customizerpublic void setGridSummaryCustomizer(GridSummaryCustomizer gridSummaryCustomizer)
gridSummaryCustomizer
- the grid summary customizerpublic void setAlign(Alignment align)
cellAlign
.type
- generally "left"
except for numbers which are "right" - and if rotateTitle
has been specified, the default is always "center". align
- align Default value is nullpublic Alignment getAlign()
cellAlign
.type
- generally "left"
except for numbers which are "right" - and if rotateTitle
has been specified, the default is always "center". public void setWidth(int width)
Caution: stretch sizes are currently ignored if the field is being autofitted
(see autoFitFieldWidths
),
unless showHeader
is false.
Note: if autofitting is active for a field, the width will default to the numerical autofit width for that field (so it will not be stretched larger to fill available space). Otherwise, if not autofitting, the width will default to "*" causing it to be automatically stretched.
The width may be defaulted to a numerical value based on
length
if no valueMap
is set,
subject to the initial values of
minWidth
and minFieldWidth
.
If you'd rather have the field
stretched-sized to fit the available space, set its initial width to "*".
See also minFieldWidth
to ensure no field goes below a minimum size.
Use resizeField
to
programmatically change field width after creation.
Use getFieldWidth
to access
the rendered field width after the ListGrid is drawn.
width
- width Default value is "*"public void setWidth(java.lang.String width)
Caution: stretch sizes are currently ignored if the field is being autofitted
(see autoFitFieldWidths
),
unless showHeader
is false.
Note: if autofitting is active for a field, the width will default to the numerical autofit width for that field (so it will not be stretched larger to fill available space). Otherwise, if not autofitting, the width will default to "*" causing it to be automatically stretched.
The width may be defaulted to a numerical value based on
length
if no valueMap
is set,
subject to the initial values of
minWidth
and minFieldWidth
.
If you'd rather have the field
stretched-sized to fit the available space, set its initial width to "*".
See also minFieldWidth
to ensure no field goes below a minimum size.
Use resizeField
to
programmatically change field width after creation.
Use getFieldWidth
to access
the rendered field width after the ListGrid is drawn.
width
- width Default value is "*"public java.lang.String getWidth()
Caution: stretch sizes are currently ignored if the field is being autofitted
(see autoFitFieldWidths
),
unless showHeader
is false.
Note: if autofitting is active for a field, the width will default to the numerical autofit width for that field (so it will not be stretched larger to fill available space). Otherwise, if not autofitting, the width will default to "*" causing it to be automatically stretched.
The width may be defaulted to a numerical value based on
length
if no valueMap
is set,
subject to the initial values of
minWidth
and minFieldWidth
.
If you'd rather have the field
stretched-sized to fit the available space, set its initial width to "*".
See also minFieldWidth
to ensure no field goes below a minimum size.
Use resizeField
to
programmatically change field width after creation.
Use getFieldWidth
to access
the rendered field width after the ListGrid is drawn.
public void setImgDir(java.lang.String imgDir)
setImageURLPrefix(String)
setImageURLPrefix(String)
.imgDir
- the imageURLPrefixpublic void setDefaultValue(java.lang.String defaultValue)
can be edited
,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid.ListGrid.startEditingNew()
public void setDefaultValue(java.lang.Integer defaultValue)
can be edited
,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid.setDefaultValue(String)
public void setDefaultValue(java.lang.Long defaultValue)
can be edited
,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid.setDefaultValue(String)
public void setDefaultValue(java.lang.Boolean defaultValue)
can be edited
,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid.setDefaultValue(String)
public void setDefaultValue(java.lang.Float defaultValue)
can be edited
,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid.setDefaultValue(String)
public void setDefaultValue(java.util.Date defaultValue)
can be edited
,
this property can be used to specify a default value for this field's editor when adding
new rows to the grid.setDefaultValue(String)
public void setEditorProperties(FormItem editorProperties)
FormItem
properties to be used whenever this field is edited.
If unset, a FormItem will be automatically chosen based on the type of the field.
The ListGrid.setEditorCustomizer(ListGridEditorCustomizer)
API allows the developer to supply dynamic properties for the
item based on the row as well as the field being edited.
Note: The FormItem passed to setEditorProperties() is used as a "template" to create a FormItem whenever the ListGrid needs to show an interface for editing this field.
For an overview of the template rules, reflection requirements when trying to assign
an edit Formitem by type, and an understanding of how the various
setEditorProperties()
calls on different classes relate to each other
in determining what configuration ultimately gets applied to the edit FormItem, see
DataSourceField.setEditorProperties(FormItem)
.
editorProperties
- the editor propertiessetEditorType(String)
,
setEditorType(Class)
public void setEditorType(FormItem editorType)
setEditorProperties(FormItem)
. You can also consider using
setEditorType(Class)
or setEditorType(String)
instead.setEditorProperties(FormItem)
.editorType
- FormItem with default properties to be applied when editingpublic void setEditorType(java.lang.String editorType)
FormItem
class to be used when this field is edited.
If unset, a FormItem will be automatically chosen.
By using the reflection mechanism
,
this method avoids the limitations described in setEditorProperties(FormItem)
.
If the editorType cannot be resolved via reflection, this method will still work if
editorType refers to a built-in SmartGWT framework class, such as
com.smartgwt.client.widgets.form.fields.SetFilterItem
.
editorType
- the fully-qualified class name of a FormItem
subclass, which must have been registered with the
reflection mechanism
(except for built-in
framework classes).java.lang.IllegalArgumentException
- if the editorType class has not been registered for use with the
reflection mechanism
, and
it is not a built-in framework class, or if it does not inherit from
FormItem
.public void setEditorType(java.lang.Class<? extends FormItem> editorType)
FormItem
class to be used when this field is edited.
If unset, a FormItem will be automatically chosen.
By using the reflection mechanism
,
this method avoids the limitations described in setEditorProperties(FormItem)
.
If the editorType cannot be resolved via reflection, this method will still work if
editorType refers to a built-in SmartGWT framework class, such as
com.smartgwt.client.widgets.form.fields.SetFilterItem
.
editorType
- a FormItem
subclass, which must have been registered with the
reflection mechanism
(except for built-in framework classes).java.lang.IllegalArgumentException
- if the editorType class has not been registered for use with the
reflection mechanism
, and
it is not a built-in framework class, or if it does not inherit from
FormItem
.public void setFilterEditorType(FormItem filterEditorType)
setFilterEditorProperties(FormItem)
. You can also consider using
setFilterEditorType(Class)
or setFilterEditorType(String)
instead.setFilterEditorProperties(FormItem)
.filterEditorType
- FormItem with default properties to be applied when editing in the filter rowpublic void setFilterEditorType(java.lang.String editorType)
FormItem
class to use for the filter form item associated with this field.
(Only used if this field is not canFilter:false).
Note: If this is not specified, the edit-form item type may be derived from the 'editorType' property, typically inherited from datasource fields, or from the 'type' of the field (showing the appropriate form item for the data-type).
By using the reflection mechanism
,
this method avoids the limitations described in setFilterEditorProperties(FormItem)
.
If the editorType cannot be resolved via reflection, this method will still work if
editorType refers to a built-in SmartGWT framework class, such as
com.smartgwt.client.widgets.form.fields.SetFilterItem
.
editorType
- the fully-qualified class name of a
FormItem
subclass,
which must have been registered with the
reflection mechanism
(except for built-in framework classes).java.lang.IllegalArgumentException
- if the editorType class has not been registered for use
with the reflection mechanism
,
and it is not a built-in framework class, or if it does not inherit from
FormItem
.public void setFilterEditorType(java.lang.Class<? extends FormItem> editorType)
FormItem
class to use for the filter form item associated with this field.
(Only used if this field is not canFilter:false).
Note: If this is not specified, the edit-form item type may be derived from the 'editorType' property, typically inherited from datasource fields, or from the 'type' of the field (showing the appropriate form item for the data-type).
By using the reflection mechanism
,
this method avoids the limitations described in setFilterEditorProperties(FormItem)
.
If the editorType cannot be resolved via reflection, this method will still work if
editorType refers to a built-in SmartGWT framework class, such as
com.smartgwt.client.widgets.form.fields.SetFilterItem
.
editorType
- a FormItem
subclass,
which must have been registered with the
reflection mechanism
(except for built-in framework classes).java.lang.IllegalArgumentException
- if the editorType class has not been registered for use
with the reflection mechanism
,
and it is not a built-in framework class, or if it does not inherit from
FormItem
.public void setFilterEditorProperties(FormItem filterEditorProperties)
Note: The FormItem passed to setFilterEditorProperties() is used as a "template" to create a FormItem whenever the ListGrid needs to show an interface for editing this field.
For an overview of the template rules, reflection requirements when trying to assign
an edit Formitem by type, and an understanding of how the various
setFilterEditorProperties()
calls on different classes relate to each other
in determining what configuration ultimately gets applied to the edit FormItem, see
DataSourceField.setEditorProperties(FormItem)
.
filterEditorProperties
- the filter editor propertiessetFilterEditorType(String)
,
setFilterEditorType(Class)
public ListGridField setOptionDataSource(DataSource optionDataSource)
com.smartgwt.client.types.ValueMap
by fetching records from another DataSource and extracting the
valueField
and displayField
in the loaded records, to derive one
valueMap entry per record loaded from the optionDataSource. Unlike the similar use of PickList.optionDataSource for
pickLists used during editing or filtering, listGridField.optionDataSource
causes the entire set of
records from the optionDataSource to be fetched, without paging. Hence listGridField.optionDataSource is appropriate
only for smaller valueMaps. For very large valueMap situations, such as an accountId field that should be displayed as
an accountName where there are thousands of accounts, the correct approach is:
displayField
attribute on the data field to the
name of the display field. If you are using the Smart GWT Server Framework with the SQL or JPA/Hibernate built-in connectors, this
entire approach can be achieved very easily using the DataSourceField.includeFrom
setting - see the docs for includeFrom
for details.
Notes:
inline filtering
. This can be achieved by setting the optionDataSource
attribute on the form item used to
edit the field via editorProperties
(for
editing) or field.filterEditorProperties
(for filtering), without specifying an optionDataSource at the listGridField level.
Alternatively developers can use autoFetchDisplayMap
to suppress the fetch against the optionDataSource at the listGrid level.listGridField.optionDataSource
to the same dataSource as the listGrid is not the same as omitting the
optionDataSource setting entirely. Unless autoFetchDisplayMap
has been set to explicitly disable fetching, a fetch will be performed against the dataSource to
build a valueMap which will be used as the definitive mapping from data to display values, rather than picking up the
display values from the records themselves. This distinction is required to support cases where the valueField
points to a different field in the grid (useful
for hierarchical relationships, for example), or where optionCriteria
or optionOperationId
are specified and return
different data from the records displayed within the grid.ListGrid.warnOnUnmappedValueFieldChange
.displayValueFromRecord
to explicitly tell the
grid whether or not to display the display field value for the record in this field when a displayField is specified.
See documentation on that property for more informationoptionDataSource
- optionDataSource Default value is nullListGridField
instance,
for chaining setter callspublic void setShowIfCondition(ListGridFieldIfFunction showIf)
showIf
- showIf criteriapublic void setOptionFilterContext(DSRequest optionFilterContext)
autoFetchDisplayMap
is set, this attribute
provides a way to customize the dataSource request issued to fetch the display map from
the option dataSource.
This provides, among other capabilities, a way to trigger the server to return summary records.optionFilterContext
- optionFilterContext Default value is nullpublic DSRequest getOptionFilterContext()
autoFetchDisplayMap
is set, this attribute
provides a way to customize the dataSource request issued to fetch the display map from
the option dataSource.
This provides, among other capabilities, a way to trigger the server to return summary records.public com.google.gwt.event.shared.HandlerRegistration addCellSavedHandler(CellSavedHandler handler)
Same signature as com.smartgwt.client.widgets.grid.ListGrid#addCellChangedHandler
, but defined on a per-field basis.
addCellSavedHandler
in interface HasCellSavedHandlers
handler
- the cellSaved handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addChangeHandler(ChangeHandler handler)
If this field is editable, any change
handler
specified on the ListGridField will be passed onto the editors for this field.
Note that if canToggle
is true, the user may change the value of a
boolean field without going into edit mode by single clicking on the field. In this case the ListGridField.change
and ListGridField.changed
handlers will fire but the
form
and item
parameters will be null.
addChangeHandler
in interface HasChangeHandlers
handler
- the change handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addChangedHandler(ChangedHandler handler)
If this field is editable, any changed
handler specified on the ListGridField will be passed onto the editors for this field. Note that if canToggle
is true, the user may change the value of a
boolean field without going into edit mode by single clicking on the field. In this case the ListGridField.change
and ListGridField.changed
handlers will fire but the
form
and item
parameters will be null.
addChangedHandler
in interface HasChangedHandlers
handler
- the changed handlerHandlerRegistration
used to remove this handlerpublic void setGroupTitleRenderer(GroupTitleRenderer groupTitleRenderer)
groupTitleRenderer
- the group title rendererpublic void setGroupValueFunction(GroupValueFunction groupValueFunction)
GroupTitleRenderer.getGroupTitle(Object, GroupNode, ListGridField, String, ListGrid)
may be implemented to map a numeric group value into a
legible string.groupValueFunction
- the group value functionpublic void setEditorValueMapFunction(EditorValueMapFunction editorValueMapFunction)
editorValueMapFunction
- the editor value map functionpublic void setHeaderButtonProperties(Canvas buttonProperties)
buttonProperties
- the header button properties.public void setSummaryFunction(SummaryFunctionType summaryFunction)
showGridSummary
or showGroupSummary
is true,
this method can be used to
specify a SummaryFunctionType
for calculating the summary value to display.
If an array of summaryFunctions is specified, they will be executed in turn and the grid will show multiple summary rows at the grid or group level (or both) containing the resulting values.
summaryFunction
- summaryFunctionpublic void setSummaryFunction(java.lang.String summaryFunction)
showGridSummary
or showGroupSummary
is true,
this method can be used to
specify the name of a summary function registered via SimpleType.registerSummaryFunction(java.lang.String, com.smartgwt.client.widgets.grid.SummaryFunction)
for calculating the summary value to display.
If an array of summaryFunctions is specified, they will be executed in turn and the grid will show multiple summary rows at the grid or group level (or both) containing the resulting values.
summaryFunction
- summaryFunctionpublic void setSummaryFunction(SummaryFunction summaryFunction)
showGridSummary
or showGroupSummary
is true,
this method can be used to
specify a SummaryFunction
for calculating the summary value to display.
If an array of summaryFunctions is specified, they will be executed in turn and the grid will show multiple summary rows at the grid or group level (or both) containing the resulting values.
summaryFunction
- summaryFunctionpublic void addSummaryFunction(SummaryFunction summaryFunction)
showGridSummary
or showGroupSummary
is true,
this method can be used to specify a SummaryFunction
for calculating the summary value to display.
Note that by calling this method repeatedly, you can apply more than one summary function to a field. This allows
the developer to set up multi-line summaries - each specified summary function result will show up in a separate
summary row (either at the bottom of the grid or at the end of each group).
Note also that multiple-line summary functions are not compatible with the
ListGrid.setShowGroupSummaryInHeader(java.lang.Boolean)
feature. If this property is set only the
first summary value will be visible to the user (displayed in the group header node).
summaryFunction
- public void addSummaryFunction(SummaryFunctionType summaryFunction)
showGridSummary
or showGroupSummary
is true,
this method can be used to specify a SummaryFunctionType
for calculating the summary value to display.
Note that by calling this method repeatedly, you can apply more than one summary function to a field. This allows
the developer to set up multi-line summaries - each specified summary function result will show up in a separate
summary row (either at the bottom of the grid or at the end of each group).
Note also that multiple-line summary functions are not compatible with the
ListGrid.setShowGroupSummaryInHeader(java.lang.Boolean)
feature. If this property is set only the
first summary value will be visible to the user (displayed in the group header node).
summaryFunction
- public void setRecordSummaryFunction(RecordSummaryFunctionType recordSummaryFunction)
"summary"
. Fields of this type will display a calculated value based on the
other field values within the current record. This attribute specifies how the summary field value will be
calculated. See RecordSummaryFunctionType
for valid options.
A subset of the ListGrid's fields will be passed to the RecordSummaryFunction.
The fields to be used for the summary calculation can
be determined either by explicitly listing them (includeInRecordSummaryFields
),
or by setting includeInRecordSummary
to
true on fields that should be included and false on fields that should not.
By default, all visible fields of numeric type are used. Note that, in this mode, if the user is able to hide some fields,
this could change the formula. If this isn't desirable, consider setting canHide
to prevent fields from being hidden.
Consider this even if fields to include in the summary are explicitly listed, as hidden fields involved in a visible
calculation can be confusing for an end user.
If showGridSummary
or showGroupSummary
is true, this field's value in the
summary row[s] will still be calculated by calling this method. In this case, the record object passed in will contain
summary values for each field. If custom handling is required for this case, it may be detected by checking the record
object's isGroupSummary
and isGridSummary
attributes.
recordSummaryFunction
- recordSummaryFunction Default value is nullpublic void setRecordSummaryFunction(RecordSummaryFunction recordSummaryFunction)
"summary"
. Fields of this type will display a calculated value based on the
other field values within the current record. This attribute specifies how the summary field value will be
calculated. See RecordSummaryFunctionType
for valid options.
A subset of the ListGrid's fields will be passed to the RecordSummaryFunction.
The fields to be used for the summary calculation can
be determined either by explicitly listing them (includeInRecordSummaryFields
),
or by setting includeInRecordSummary
to
true on fields that should be included and false on fields that should not.
By default, all visible fields of numeric type are used. Note that, in this mode, if the user is able to hide some fields,
this could change the formula. If this isn't desirable, consider setting canHide
to prevent fields from being hidden.
Consider this even if fields to include in the summary are explicitly listed, as hidden fields involved in a visible
calculation can be confusing for an end user.
If showGridSummary
or showGroupSummary
is true, this field's value in the
summary row[s] will still be calculated by calling this method. In this case, the record object passed in will contain
summary values for each field. If custom handling is required for this case, it may be detected by checking the record
object's isGroupSummary
and isGridSummary
attributes.
recordSummaryFunction
- recordSummaryFunction Default value is nullpublic RecordSummaryFunctionType getRecordSummaryFunction()
"summary"
. Fields of this type will display a calculated value based on the
other field values within the current record. This attribute specifies how the summary field value will be
calculated. See RecordSummaryFunctionType
for valid options.
A subset of the
ListGrid's fields will be passed to the RecordSummaryFunction. Which fields to include is determined based on includeInRecordSummary
If showGridSummary
or showGroupSummary
is true, this field's value in the
summary row[s] will still be calculated by calling this method. In this case, the record object passed in will contain
summary values for each field. If custom handling is required for this case, it may be detected by checking the record
object's isGroupSummary
and isGridSummary
attributes.
public ListGrid getListGrid()
public ListGridField setType(SimpleType type)
type
- the SimpleTypepublic java.lang.String getOperator()
"Filter using"
in the headerContextMenu
that appears when
allowFilterOperators
has been set to true.
If you need to reset this filter operator you should call listGrid.setFieldProperties
, as in this example:
listGrid.setFieldProperties(fieldName, {operator: null});Note that this property is not listed as "initializable" and is not intended as a means of applying a default operator to the field. Rather, it simply reflects any non-default operator already applied to menu item
"Filter
using"
.
Use filterOperator
to specify the default
operator for the field.
The value returned is from the OperatorId
enum.
getFilterOperator()