|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.widgets.grid.ListGridField
public class ListGridField
An ordinary JavaScript object containing properties that configures the display of and interaction with the columns of a
ListGrid
.
Field Summary |
---|
Fields inherited from class com.smartgwt.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
ListGridField()
|
|
ListGridField(JavaScriptObject jsObj)
|
|
ListGridField(String name)
|
|
ListGridField(String name,
int width)
|
|
ListGridField(String name,
String title)
|
|
ListGridField(String name,
String title,
int width)
|
Method Summary | |
---|---|
HandlerRegistration |
addCellSavedHandler(CellSavedHandler handler)
Add a cellSaved handler. |
HandlerRegistration |
addChangedHandler(ChangedHandler handler)
Add a changed handler. |
HandlerRegistration |
addChangeHandler(ChangeHandler handler)
Add a change handler. |
HandlerRegistration |
addEditorEnterHandler(EditorEnterHandler handler)
Add a editorEnter handler. |
HandlerRegistration |
addEditorExitHandler(EditorExitHandler handler)
Add a editorExit handler. |
HandlerRegistration |
addRecordClickHandler(RecordClickHandler handler)
Add a recordClick handler. |
Alignment |
getAlign()
Horizontal alignment for field's column header: "left", "right" or "center". |
Boolean |
getAutoFetchDisplayMap()
If true, automatically fetches records and derives a valueMap from optionDataSource . |
String |
getBaseStyle()
Custom base style to apply to all cells in this field instead of baseStyle To override the baseStyle at the row level, use
'record[listGrid.recordBaseStyleProperty]'
instead. |
Boolean |
getCanEdit()
Can this field be edited? May be overridden by setting the 'canEdit' property at the listGrid level |
Boolean |
getCanExport()
Dictates whether the data in this field be exported. |
Boolean |
getCanFilter()
If showing a filter row for this ListGrid, should the filter criteria for this field be editable |
Boolean |
getCanFreeze()
Whether this field should display freezing/unfreezing options in its header context menu. |
Boolean |
getCanGroupBy()
Determines whether this field will be groupable in the header context menu. |
Boolean |
getCanHide()
Whether this field can be hidden via the header context menu. |
Boolean |
getCanSort()
Enables or disables sorting by this column. |
Boolean |
getCanSortClientOnly()
When true, this field can only be used for sorting if the data is entirely client-side. |
Boolean |
getCanToggle()
Allows a boolean or com.smartgwt.client..ValueMap 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 . |
String |
getCellIcon()
For a field of type:"icon" only, set the icon that appears in body cells. |
DateDisplayFormat |
getDateFormatter()
Display format to use for fields specified as type 'date'. |
String |
getDefaultGroupingMode()
Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and 'field.groupingMode' is unset. |
String |
getDefaultIconSrc()
If this field is editable, this property will be passed to editors displayed for cells within this field as defaultIconSrc . |
String |
getDisplayField()
Specifies the optionDataSource field used to
retrieve the display values that are to be mapped from the internal values specified by valueField . |
Integer |
getEditorIconHeight()
If this field is editable, this property will be passed to editors displayed for cells within this field as iconHeight .If this property unset, the iconHeight property from the editor can be picked up from iconHeight instead. |
Integer |
getEditorIconWidth()
If this field is editable, this property will be passed to editors displayed for cells within this field as iconWidth .If this property unset, the iconWidth property from the editor can be picked up from iconWidth instead. |
String |
getEditorImageURLPrefix()
When some cell in this field is being edited, this property can be used to apply an explicit imageURLPrefix to the editor in question. |
String |
getEditorImageURLSuffix()
When some cell in this field is being edited, this property can be used to apply an explicit imageURLSuffix to the editor in question. |
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. |
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. |
String |
getEmptyCellValue()
The value to display for a cell whose value is null or the empty string after applying formatCellValue and valueMap (if any). |
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. |
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. |
void |
getFieldTitle(ListGrid viewer,
int fieldNum)
If your derivation of the field title is more complex than specifying a static string, you can specify a getFieldTitle() method on your field to return the title string. |
Boolean |
getFilterOnKeypress()
If we're showing the filterEditor (listGrid.showFilterEditor is true), this property determines whether this list should be filtered every time the user edits the value of the filter editor for this field. |
Boolean |
getFrozen()
Whether this field should be "frozen" for the purposes of horizontal scrolling. |
Integer |
getGroupGranularity()
Granularity of grouping for numeric fields. |
String |
getGroupingMode()
For a field that allows multiple 'grouping
modes' , the current grouping mode. |
Map |
getGroupingModes()
If set, provides several possible styles of grouping that are valid for this field. |
Integer |
getGroupPrecision()
For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping. |
String |
getHeaderBaseStyle()
Custom base style to apply to this field's header button instead of headerBaseStyle .Note that depending on the header button constructor, you may have to override headerTitleStyle as well. |
String |
getHeaderTitleStyle()
Custom titleStyle to apply to this field's header button instead of headerTitleStyle .Note that this will typically only have an effect if headerButtonConstructor
is set to StretchImgButton or a subclass thereof. |
String |
getIcon()
Optional icon to show next to the title for this field. |
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. |
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" |
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. |
String |
getIconVAlign()
If this field is editable, this property will be passed to editors displayed for cells within this field as iconVAlign . |
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. |
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. |
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. |
String |
getImageURLSuffix()
If any cells in this field are showing a value icon (see: valueIcons ) or this is has ListGridFieldType set to "image" , this 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 imageURLSuffix . |
int |
getImageWidth()
Width of images shown for fieldTypes image and imageFile in this field. |
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. |
Boolean |
getIsRemoveField()
If set to true and canRemoveRecords is true, this
field will be rendered as the remove-field for this grid. |
String |
getLinkText()
The HTML to display in cells of this field if the fieldType is set to link. |
String |
getName()
Name of this field. |
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. |
String |
getOptionOperationId()
If this field has an optionDataSource specified and 'autoFetchDisplayMap' is set, this attribute
provides a way to customize the 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
thiis field's valueMap. |
static ListGridField |
getOrCreateRef(JavaScriptObject jsObj)
|
Boolean |
getPartialSummary()
Only applies to fields of type "summary" . |
RecordSummaryFunctionType |
getRecordSummaryFunction()
Only applies to fields of type "summary" . |
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. |
Boolean |
getShowDefaultContextMenu()
When set to false, this field will not show a context menu in it's header. |
Boolean |
getShowDisabledIcon()
If using an icon for this button, whether to switch the icon image if the button becomes disabled. |
Boolean |
getShowDownIcon()
If using an icon for this button, whether to switch the icon image when the mouse goes down on the button. |
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. |
Boolean |
getShowFocusedIcon()
If using an icon for this button, whether to switch the icon image when the button recieves focus. |
Boolean |
getShowGridSummary()
If showGridSummary is true, should this field show
a summary value. |
Boolean |
getShowGroupSummary()
If 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 com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction is defined for the specified
field type. |
Boolean |
getShowHover()
Whether to show hovers for this field. |
Boolean |
getShowRollOverIcon()
If using an icon for this button, whether to switch the icon image on mouse rollover. |
Boolean |
getShowSelectedIcon()
If using an icon for this button, whether to switch the icon image when the button becomes selected. |
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. |
SortDirection |
getSortDirection()
Specifies the default sorting direction for this column. |
SummaryFunctionType |
getSummaryFunction()
If showGridSummary or showGroupSummary is true, this attribute can be used to
specify an explicit SummaryFunction for calculating the summary value to display. |
String |
getSummaryTitle()
Optional long summary title for this field, provided in addition to title . |
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. |
String |
getTarget()
By default, clicking a link rendered by this item opens it in a new browser window. |
String |
getTitle()
A title for this field, to display in the header of the listGrid object. |
ListGridFieldType |
getType()
ListGrids picks a renderer for the view and edit mode of a field based on this attribute. |
Boolean |
getValidateOnChange()
If set to true, any validators for this field will
be run whenever the value of the field is changed. |
String |
getValueField()
Specifies the optionDataSource field used to
retrieve the stored values that are to be mapped to the display values (specified by displayField ). |
Integer |
getValueIconHeight()
Height for value icons for this listGrid field. |
Integer |
getValueIconLeftPadding()
How much padding should there be on the left of valueIcons for this field Overrides valueIconLeftPadding |
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. |
Integer |
getValueIconRightPadding()
How much padding should there be on the right of valueIcons for this field Overrides valueIconRightPadding |
Integer |
getValueIconSize()
Default width and height of value icons in this field. |
Integer |
getValueIconWidth()
Width for value icons for this listGrid field. |
String |
getWidth()
Return the width of the field. |
void |
setAlign(Alignment align)
Horizontal alignment for field's column header: "left", "right" or "center". |
void |
setAutoFetchDisplayMap(Boolean autoFetchDisplayMap)
If true, automatically fetches records and derives a valueMap from optionDataSource . |
void |
setBaseStyle(String baseStyle)
Custom base style to apply to all cells in this field instead of baseStyle To override the baseStyle at the row level, use
'record[listGrid.recordBaseStyleProperty]'
instead. |
void |
setCanEdit(Boolean canEdit)
Can this field be edited? May be overridden by setting the 'canEdit' property at the listGrid level |
void |
setCanExport(Boolean canExport)
Dictates whether the data in this field be exported. |
void |
setCanFilter(Boolean canFilter)
If showing a filter row for this ListGrid, should the filter criteria for this field be editable |
void |
setCanFreeze(Boolean canFreeze)
Whether this field should display freezing/unfreezing options in its header context menu. |
void |
setCanGroupBy(Boolean canGroupBy)
Determines whether this field will be groupable in the header context menu. |
void |
setCanHide(Boolean canHide)
Whether this field can be hidden via the header context menu. |
void |
setCanSort(Boolean canSort)
Enables or disables sorting by this column. |
void |
setCanSortClientOnly(Boolean canSortClientOnly)
When true, this field can only be used for sorting if the data is entirely client-side. |
void |
setCanToggle(Boolean canToggle)
Allows a boolean or com.smartgwt.client..ValueMap field to be edited without going into edit mode. |
void |
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)
* Return the HTML to display in cells of this field. |
void |
setCellIcon(String cellIcon)
For a field of type:"icon" only, set the icon that appears in body cells. |
void |
setDateFormatter(DateDisplayFormat dateFormatter)
Display format to use for fields specified as type 'date'. |
void |
setDefaultFilterValue(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(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(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(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(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. |
void |
setDefaultGroupingMode(String defaultGroupingMode)
Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and 'field.groupingMode' is unset. |
void |
setDefaultIconSrc(String defaultIconSrc)
If this field is editable, this property will be passed to editors displayed for cells within this field as defaultIconSrc . |
void |
setDefaultValue(Boolean defaultValue)
|
void |
setDefaultValue(Date defaultValue)
|
void |
setDefaultValue(Float defaultValue)
|
void |
setDefaultValue(Integer defaultValue)
|
void |
setDefaultValue(String defaultValue)
|
void |
setDisplayField(String displayField)
Specifies the optionDataSource field used to
retrieve the display values that are to be mapped from the internal values specified by valueField . |
void |
setEditorIconHeight(Integer editorIconHeight)
If this field is editable, this property will be passed to editors displayed for cells within this field as iconHeight .If this property unset, the iconHeight property from the editor can be picked up from iconHeight instead. |
void |
setEditorIconWidth(Integer editorIconWidth)
If this field is editable, this property will be passed to editors displayed for cells within this field as iconWidth .If this property unset, the iconWidth property from the editor can be picked up from iconWidth instead. |
void |
setEditorImageURLPrefix(String editorImageURLPrefix)
When some cell in this field is being edited, this property can be used to apply an explicit imageURLPrefix to the editor in question. |
void |
setEditorImageURLSuffix(String editorImageURLSuffix)
When some cell in this field is being edited, this property can be used to apply an explicit imageURLSuffix to the editor in question. |
void |
setEditorType(FormItem editorType)
Name of form item type to use for the form item created to edit this field. |
void |
setEditorValueIconHeight(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. |
void |
setEditorValueIcons(Map<String,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. |
void |
setEditorValueIconWidth(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. |
void |
setEditorValueMap(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 |
setEmptyCellValue(String emptyCellValue)
The value to display for a cell whose value is null or the empty string after applying formatCellValue and valueMap (if any). |
void |
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. |
void |
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. |
void |
setFilterEditorType(FormItem filterEditorType)
If this ListGrid is showing a filter row, this property can be used to specify the form item class to use for the filter form item associated with this field (Only used if this field is not canFilter:false). |
void |
setFilterEditorValueMap(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. |
void |
setFilterOnKeypress(Boolean filterOnKeypress)
If we're showing the filterEditor (listGrid.showFilterEditor is true), this property determines whether this list should be filtered every time the user edits the value of the filter editor for this field. |
void |
setFrozen(Boolean frozen)
Whether this field should be "frozen" for the purposes of horizontal scrolling. |
void |
setGroupGranularity(Integer groupGranularity)
Granularity of grouping for numeric fields. |
void |
setGroupingMode(String groupingMode)
For a field that allows multiple 'grouping
modes' , the current grouping mode. |
void |
setGroupingModes(Map groupingModes)
If set, provides several possible styles of grouping that are valid for this field. |
void |
setGroupPrecision(Integer groupPrecision)
For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping. |
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. |
void |
setHeaderBaseStyle(String headerBaseStyle)
Custom base style to apply to this field's header button instead of headerBaseStyle .Note that depending on the header button constructor, you may have to override headerTitleStyle as well. |
void |
setHeaderButtonProperties(Button buttonProperties)
Set the properties of the header button used for this field. |
void |
setHeaderTitleStyle(String headerTitleStyle)
Custom titleStyle to apply to this field's header button instead of headerTitleStyle .Note that this will typically only have an effect if headerButtonConstructor
is set to StretchImgButton or a subclass thereof. |
void |
setHidden(boolean hidden)
|
void |
setHoverCustomizer(HoverCustomizer hoverCustomizer)
* HTML to be shown in hovers over cells in the column described by this field. |
void |
setIcon(String icon)
Optional icon to show next to the title for this field. |
void |
setIconHeight(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. |
void |
setIconOrientation(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" |
void |
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 |
void |
setIconSize(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. |
void |
setIconSpacing(int iconSpacing)
Pixels between icon and title text. |
void |
setIconVAlign(String iconVAlign)
If this field is editable, this property will be passed to editors displayed for cells within this field as iconVAlign . |
void |
setIconWidth(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. |
void |
setImageHeight(int imageHeight)
Height of image shown for fieldTypes image and imageFile in this field. |
void |
setImageSize(int imageSize)
Size of images shown for fieldTypes image and imageFile in this field. |
void |
setImageURLPrefix(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. |
void |
setImageURLSuffix(String imageURLSuffix)
If any cells in this field are showing a value icon (see: valueIcons ) or this is has ListGridFieldType set to "image" , this 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 imageURLSuffix . |
void |
setImageWidth(int imageWidth)
Width of images shown for fieldTypes image and imageFile in this field. |
void |
setImgDir(String imgDir)
|
void |
setIncludeInRecordSummary(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. |
void |
setIsRemoveField(Boolean isRemoveField)
If set to true and canRemoveRecords is true, this
field will be rendered as the remove-field for this grid. |
void |
setLinkText(String linkText)
The HTML to display in cells of this field if the fieldType is set to link. |
void |
setMultiple(boolean multiple)
When using a valueMap, set multiple to true if a select list box is desired instead of a combobox when editing the cell. |
void |
setName(String name)
Name of this field. |
void |
setOptionDataSource(DataSource optionDataSource)
Derive a 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. |
void |
setOptionOperationId(String optionOperationId)
If this field has an optionDataSource specified and 'autoFetchDisplayMap' is set, this attribute
provides a way to customize the operationId passed to
dataSource.fetchData() when retrieving the display map from the option dataSource. |
void |
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
thiis field's valueMap. |
void |
setPartialSummary(Boolean partialSummary)
Only applies to fields of type "summary" . |
void |
setPrompt(String prompt)
|
void |
setRecordSummaryFunction(RecordSummaryFunction recordSummaryFunction)
Only applies to fields of type "summary" . |
void |
setRecordSummaryFunction(RecordSummaryFunctionType recordSummaryFunction)
Only applies to fields of type "summary" . |
void |
setRequired(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. |
void |
setShowDefaultContextMenu(Boolean showDefaultContextMenu)
When set to false, this field will not show a context menu in it's header. |
void |
setShowDisabledIcon(Boolean showDisabledIcon)
If using an icon for this button, whether to switch the icon image if the button becomes disabled. |
void |
setShowDownIcon(Boolean showDownIcon)
If using an icon for this button, whether to switch the icon image when the mouse goes down on the button. |
void |
setShowFileInline(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. |
void |
setShowFocusedIcon(Boolean showFocusedIcon)
If using an icon for this button, whether to switch the icon image when the button recieves focus. |
void |
setShowGridSummary(Boolean showGridSummary)
If showGridSummary is true, should this field show
a summary value. |
void |
setShowGroupSummary(Boolean showGroupSummary)
If 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 com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction is defined for the specified
field type. |
void |
setShowHover(Boolean showHover)
Whether to show hovers for this field. |
void |
setShowIfCondition(ListGridFieldIfFunction showIf)
A function, if provided, is evaluated to conditionally determine whether this field should be displayed. |
void |
setShowRollOverIcon(Boolean showRollOverIcon)
If using an icon for this button, whether to switch the icon image on mouse rollover. |
void |
setShowSelectedIcon(Boolean showSelectedIcon)
If using an icon for this button, whether to switch the icon image when the button becomes selected. |
void |
setShowValueIconOnly(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. |
void |
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. |
void |
setSummaryFunction(SummaryFunction summaryFunction)
If showGridSummary or showGroupSummary is true, this attribute can be used to
specify an explicit SummaryFunction for calculating the summary value to display. |
void |
setSummaryFunction(SummaryFunctionType summaryFunction)
If showGridSummary or showGroupSummary is true, this attribute can be used to
specify an explicit SummaryFunction for calculating the summary value to display. |
void |
setSummaryTitle(String summaryTitle)
Optional long summary title for this field, provided in addition to title . |
void |
setSuppressValueIcon(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. |
void |
setTarget(String target)
By default, clicking a link rendered by this item opens it in a new browser window. |
void |
setTitle(String title)
A title for this field, to display in the header of the listGrid object. |
void |
setType(ListGridFieldType type)
ListGrids picks a renderer for the view and edit mode of a field based on this attribute. |
void |
setValidateOnChange(Boolean validateOnChange)
If set to true, any validators for this field will
be run whenever the value of the field is changed. |
void |
setValidators(Validator... validators)
Array of Validator objects for this field. |
void |
setValueField(String valueField)
Specifies the optionDataSource field used to
retrieve the stored values that are to be mapped to the display values (specified by displayField ). |
void |
setValueIconHeight(Integer valueIconHeight)
Height for value icons for this listGrid field. |
void |
setValueIconLeftPadding(Integer valueIconLeftPadding)
How much padding should there be on the left of valueIcons for this field Overrides valueIconLeftPadding |
void |
setValueIconOrientation(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. |
void |
setValueIconRightPadding(Integer valueIconRightPadding)
How much padding should there be on the right of valueIcons for this field Overrides valueIconRightPadding |
void |
setValueIcons(Map<String,String> valueIcons)
This property is a mapping between data values and URLs of icons to display. |
void |
setValueIconSize(Integer valueIconSize)
Default width and height of value icons in this field. |
void |
setValueIconWidth(Integer valueIconWidth)
Width for value icons for this listGrid field. |
void |
setValueMap(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 canEdit , canEdit ), editors displayed for this
field will pick up their valueMap either from this value or from editorValueMap . |
void |
setValueMap(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 canEdit , canEdit ), editors displayed for this
field will pick up their valueMap either from this value or from editorValueMap . |
void |
setWidth(int width)
The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space, or "*" to allocate an equal portion of the remaining space. |
void |
setWidth(String width)
The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space, or "*" to allocate an equal portion of the remaining space. |
void |
setWrap(boolean wrap)
Control the list grid fields header wrap properties |
Methods inherited from class com.smartgwt.client.core.JsObject |
---|
isCreated, setJsObj |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public ListGridField()
public ListGridField(JavaScriptObject jsObj)
public ListGridField(String name)
public ListGridField(String name, int width)
public ListGridField(String name, String title)
public ListGridField(String name, String title, int width)
Method Detail |
---|
public static ListGridField getOrCreateRef(JavaScriptObject jsObj)
public void setGroupingMode(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
- groupingMode Default value is nullpublic 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.
public void setDefaultGroupingMode(String defaultGroupingMode)
'field.groupingMode'
is unset. See 'field.groupingModes'
.
defaultGroupingMode
- defaultGroupingMode Default value is nullpublic String getDefaultGroupingMode()
'field.groupingMode'
is unset. See 'field.groupingModes'
.
public void setGroupPrecision(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
- groupPrecision Default value is nullpublic 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 void setGroupGranularity(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
- groupGranularity Default value is nullpublic 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 void setCanGroupBy(Boolean canGroupBy)
canGroupBy
- canGroupBy Default value is truepublic Boolean getCanGroupBy()
public void setCanSortClientOnly(Boolean canSortClientOnly)
canSortClientOnly
- canSortClientOnly Default value is falsepublic Boolean getCanSortClientOnly()
public void setShowDefaultContextMenu(Boolean showDefaultContextMenu)
showDefaultContextMenu
- showDefaultContextMenu Default value is truepublic Boolean getShowDefaultContextMenu()
public void setCanExport(Boolean canExport)
'dataSourceField'
is explicitly set to
canExport: false.
canExport
- canExport Default value is nullpublic Boolean getCanExport()
'dataSourceField'
is explicitly set to
canExport: false.
public void setValueIconSize(Integer valueIconSize)
valueIconWidth
and {ListGridField.valueIconHeight}
valueIconSize
- valueIconSize Default value is nullpublic Integer getValueIconSize()
valueIconWidth
and {ListGridField.valueIconHeight}
public void setValueIconWidth(Integer valueIconWidth)
valueIconSize
, valueIconWidth
, and valueIconSize
.
valueIconWidth
- valueIconWidth Default value is nullpublic Integer getValueIconWidth()
valueIconSize
, valueIconWidth
, and valueIconSize
.
public void setValueIconHeight(Integer valueIconHeight)
valueIconSize
, valueIconHeight
, and valueIconSize
.
valueIconHeight
- valueIconHeight Default value is nullpublic Integer getValueIconHeight()
valueIconSize
, valueIconHeight
, and valueIconSize
.
public void setValueIconLeftPadding(Integer valueIconLeftPadding)
valueIconLeftPadding
valueIconLeftPadding
- valueIconLeftPadding Default value is nullpublic Integer getValueIconLeftPadding()
valueIconLeftPadding
public void setValueIconRightPadding(Integer valueIconRightPadding)
valueIconRightPadding
valueIconRightPadding
- valueIconRightPadding Default value is nullpublic Integer getValueIconRightPadding()
valueIconRightPadding
public void setEditorValueIconWidth(Integer editorValueIconWidth)
editorValueIconWidth
- editorValueIconWidth Default value is nullpublic Integer getEditorValueIconWidth()
public void setEditorValueIconHeight(Integer editorValueIconHeight)
editorValueIconHeight
- editorValueIconHeight Default value is nullpublic Integer getEditorValueIconHeight()
public void setShowValueIconOnly(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 showValueIconOnly
will be passed through to
editors displayed in this field.
showValueIconOnly
- showValueIconOnly Default value is nullpublic 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 showValueIconOnly
will be passed through to
editors displayed in this field.
public void setSuppressValueIcon(Boolean suppressValueIcon)
suppressValueIcon
- suppressValueIcon Default value is nullpublic Boolean getSuppressValueIcon()
public void setValueIconOrientation(String valueIconOrientation)
showValueIconOnly
is true
valueIconOrientation
- valueIconOrientation Default value is nullpublic String getValueIconOrientation()
showValueIconOnly
is true
public void setImageURLPrefix(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
- imageURLPrefix Default value is nullpublic 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.
public void setImageURLSuffix(String imageURLSuffix)
valueIcons
) or this is has ListGridFieldType
set to "image"
, this 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.imageURLSuffix
.
Note : This is an advanced setting
imageURLSuffix
- imageURLSuffix Default value is nullpublic String getImageURLSuffix()
valueIcons
) or this is has ListGridFieldType
set to "image"
, this 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.imageURLSuffix
.
public void setEditorImageURLPrefix(String editorImageURLPrefix)
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
- editorImageURLPrefix Default value is nullpublic String getEditorImageURLPrefix()
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.
public void setEditorImageURLSuffix(String editorImageURLSuffix)
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
- editorImageURLSuffix Default value is nullpublic String getEditorImageURLSuffix()
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.
public void setImageSize(int imageSize)
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
- imageSize Default value is 16public int getImageSize()
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.
public void 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
- imageWidth Default value is 16public 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.
public void 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 heigt of the image.
imageHeight
- imageHeight Default value is 16public 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 heigt of the image.
public void setType(ListGridFieldType type)
type
- type Default value is "text"public ListGridFieldType getType()
public void setName(String name)
The name of field is also the property in each record which holds the value for that field.
If a dataSource
is specified and the DataSource has a field with the same name, the ListGridField and DataSourceField are
merged so that properties on the ListGridField
name
- name Default value is nullpublic String getName()
The name of field is also the property in each record which holds the value for that field.
If a dataSource
is specified and the DataSource has a field with the same name, the ListGridField and DataSourceField are
merged so that properties on the ListGridField
public void setTitle(String title)
getFieldTitle(com.smartgwt.client.widgets.grid.ListGrid, int)
method on the field to return the HTML for the field
title.
title
- title Default value is nullpublic String getTitle()
getFieldTitle(com.smartgwt.client.widgets.grid.ListGrid, int)
method on the field to return the HTML for the field
title.
public void setTarget(String target)
target
attribute of
the anchor tag used to render the link. If you set listGridField.target to "javascript", the default behaviour is
to catch and consume mouse-clicks that would result in the link being followed. Instead, the ListGrid.addCellClickHandler(com.smartgwt.client.widgets.grid.events.CellClickHandler)
event is fired for the containing cell.
target
- target Default value is "_blank"public String getTarget()
target
attribute of
the anchor tag used to render the link. If you set listGridField.target to "javascript", the default behaviour is
to catch and consume mouse-clicks that would result in the link being followed. Instead, the ListGrid.addCellClickHandler(com.smartgwt.client.widgets.grid.events.CellClickHandler)
event is fired for the containing cell.
public void setFrozen(Boolean frozen)
FrozenFields
.
frozen
- frozen Default value is nullpublic Boolean getFrozen()
FrozenFields
.
public void setCanFreeze(Boolean canFreeze)
FrozenFields
.
canFreeze
- canFreeze Default value is nullpublic Boolean getCanFreeze()
FrozenFields
.
public void setCanHide(Boolean canHide)
canHide
- canHide Default value is nullpublic Boolean getCanHide()
public void setShowGridSummary(Boolean showGridSummary)
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 com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction
is defined for the specified field type.
showGridSummary
- showGridSummary Default value is nullpublic Boolean getShowGridSummary()
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 com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction
is defined for the specified field type.
public void setShowGroupSummary(Boolean showGroupSummary)
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 com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction
is defined for the specified
field type.
showGroupSummary
- showGroupSummary Default value is nullpublic Boolean getShowGroupSummary()
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 com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction
is defined for the specified
field type.
public void setPartialSummary(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
- partialSummary Default value is nullpublic 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 void setIncludeInRecordSummary(Boolean includeInRecordSummary)
includeInRecordSummaryFields
.
includeInRecordSummary
- includeInRecordSummary Default value is nullpublic Boolean getIncludeInRecordSummary()
includeInRecordSummaryFields
.
public void setIcon(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'
.
icon
- icon Default value is nullpublic 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'
.
public void setIconSize(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 iconSize
)
iconSize
- iconSize Default value is nullpublic 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 iconSize
)
public void setIconWidth(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 iconWidth
)editorIconWidth
is unset, this property will be
passed onto the editors for this field as iconWidth
, which will effect the default size for 'icons'
displayed in the editor.
iconWidth
- iconWidth Default value is nullpublic 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 iconWidth
)editorIconWidth
is unset, this property will be
passed onto the editors for this field as iconWidth
, which will effect the default size for 'icons'
displayed in the editor.
public void setIconHeight(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 iconHeight
)editorIconHeight
is unset, this property will be
passed onto the editors for this field as iconWidth
, which will effect the default size for 'icons'
displayed in the editor.
iconHeight
- iconHeight Default value is nullpublic 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 iconHeight
)editorIconHeight
is unset, this property will be
passed onto the editors for this field as iconWidth
, which will effect the default size for 'icons'
displayed in the editor.
public void setIconOrientation(String iconOrientation)
"left"
or "right"
iconOrientation
- iconOrientation Default value is "left"public String getIconOrientation()
"left"
or "right"
public void setIconSpacing(int iconSpacing)
iconSpacing
- iconSpacing Default value is 6public int getIconSpacing()
public void setShowDisabledIcon(Boolean showDisabledIcon)
showDisabledIcon
- showDisabledIcon Default value is truepublic Boolean getShowDisabledIcon()
public void setShowRollOverIcon(Boolean showRollOverIcon)
showRollOverIcon
- showRollOverIcon Default value is falsepublic Boolean getShowRollOverIcon()
public void setShowFocusedIcon(Boolean showFocusedIcon)
If showFocusedAsOver
is true, the "Over"
icon
will be displayed when the canvas has focus, otherwise a seperate "Focused"
icon will be displayed
showFocusedIcon
- showFocusedIcon Default value is falsepublic Boolean getShowFocusedIcon()
If showFocusedAsOver
is true, the "Over"
icon
will be displayed when the canvas has focus, otherwise a seperate "Focused"
icon will be displayed
public void setShowDownIcon(Boolean showDownIcon)
showDownIcon
- showDownIcon Default value is falsepublic Boolean getShowDownIcon()
public void setShowSelectedIcon(Boolean showSelectedIcon)
showSelectedIcon
- showSelectedIcon Default value is falsepublic Boolean getShowSelectedIcon()
public void setCellIcon(String cellIcon)
'field.icon'
, setting field.cellIcon will not show an icon in
the header.
cellIcon
- cellIcon Default value is nullpublic String getCellIcon()
'field.icon'
, setting field.cellIcon will not show an icon in
the header.
public void setShowFileInline(Boolean showFileInline)
showFileInline
- showFileInline Default value is nullpublic Boolean getShowFileInline()
public void setEditorIconWidth(Integer editorIconWidth)
iconWidth
.iconWidth
instead.
Note : This is an advanced setting
editorIconWidth
- editorIconWidth Default value is nullpublic Integer getEditorIconWidth()
iconWidth
.iconWidth
instead.
public void setEditorIconHeight(Integer editorIconHeight)
iconHeight
.iconHeight
instead.
Note : This is an advanced setting
editorIconHeight
- editorIconHeight Default value is nullpublic Integer getEditorIconHeight()
iconHeight
.iconHeight
instead.
public void setDefaultIconSrc(String defaultIconSrc)
defaultIconSrc
.
Note : This is an advanced setting
defaultIconSrc
- defaultIconSrc Default value is nullpublic String getDefaultIconSrc()
defaultIconSrc
.
public void setIconVAlign(String iconVAlign)
iconVAlign
.
Note : This is an advanced setting
iconVAlign
- iconVAlign Default value is nullpublic String getIconVAlign()
iconVAlign
.
public void setSummaryTitle(String summaryTitle)
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.Note : This is an advanced setting
summaryTitle
- summaryTitle Default value is nullpublic String getSummaryTitle()
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.
public void setHeaderBaseStyle(String headerBaseStyle)
headerBaseStyle
.headerTitleStyle
as well.
headerBaseStyle
- headerBaseStyle Default value is nullpublic String getHeaderBaseStyle()
headerBaseStyle
.headerTitleStyle
as well.
public void setHeaderTitleStyle(String headerTitleStyle)
headerTitleStyle
.headerButtonConstructor
is set to StretchImgButton
or a subclass thereof.
headerTitleStyle
- headerTitleStyle Default value is nullpublic String getHeaderTitleStyle()
headerTitleStyle
.headerButtonConstructor
is set to StretchImgButton
or a subclass thereof.
public void 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
- cellAlign Default value is nullpublic 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.
public void setBaseStyle(String baseStyle)
baseStyle
To override the baseStyle at the row level, use
'record[listGrid.recordBaseStyleProperty]'
instead.
baseStyle
- baseStyle Default value is nullpublic String getBaseStyle()
baseStyle
To override the baseStyle at the row level, use
'record[listGrid.recordBaseStyleProperty]'
instead.
public void setCanSort(Boolean canSort)
canSort
- canSort Default value is truepublic Boolean getCanSort()
public void setCanEdit(Boolean canEdit)
canEdit
- canEdit Default value is nullpublic Boolean getCanEdit()
public void setEnterKeyEditAction(EnterKeyEditAction enterKeyEditAction)
enterKeyEditAction
as
specified at the listGrid level while focus is in this field.
enterKeyEditAction
- enterKeyEditAction Default value is "done"public EnterKeyEditAction getEnterKeyEditAction()
enterKeyEditAction
as
specified at the listGrid level while focus is in this field.
public void setEscapeKeyEditAction(EscapeKeyEditAction escapeKeyEditAction)
escapeKeyEditAction
as
specified at the listGrid level while focus is in this field.
escapeKeyEditAction
- escapeKeyEditAction Default value is "cancel"public EscapeKeyEditAction getEscapeKeyEditAction()
escapeKeyEditAction
as
specified at the listGrid level while focus is in this field.
public void setValidateOnChange(Boolean validateOnChange)
validators
for this field will
be run whenever the value of the field is changed. Analgous to the validateOnChange
property.
validateOnChange
- validateOnChange Default value is nullpublic Boolean getValidateOnChange()
validators
for this field will
be run whenever the value of the field is changed. Analgous to the validateOnChange
property.
public void setRequired(Boolean required)
DataSourceField
,
enabling both client and server side validation.
required
- required Default value is nullpublic Boolean getRequired()
DataSourceField
,
enabling both client and server side validation.
public void setIsRemoveField(Boolean isRemoveField)
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
- isRemoveField Default value is nullpublic Boolean getIsRemoveField()
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.
public void setCanFilter(Boolean canFilter)
canFilter
- canFilter Default value is nullpublic Boolean getCanFilter()
public void setFilterOnKeypress(Boolean filterOnKeypress)
Note : This is an advanced setting
filterOnKeypress
- filterOnKeypress Default value is nullpublic Boolean getFilterOnKeypress()
public void setLinkText(String linkText)
linkText
.
linkText
- linkText Default value is nullpublic String getLinkText()
linkText
.
public void setEmptyCellValue(String emptyCellValue)
This is the field-specific attribute. You may also set the emptyCellValue at the grid level to define the emptyCellValue for all empty fields in the grid.
emptyCellValue
- emptyCellValue Default value is " "public String getEmptyCellValue()
This is the field-specific attribute. You may also set the emptyCellValue at the grid level to define the emptyCellValue for all empty fields in the grid.
public void setAutoFetchDisplayMap(Boolean autoFetchDisplayMap)
optionDataSource
. Same as autoFetchDisplayMap
, but defined on a per-field basis.
autoFetchDisplayMap
- autoFetchDisplayMap Default value is nullpublic Boolean getAutoFetchDisplayMap()
optionDataSource
. Same as autoFetchDisplayMap
, but defined on a per-field basis.
public void 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
thiis field's valueMap.
optionTextMatchStyle
- optionTextMatchStyle Default value is nullpublic 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
thiis field's valueMap.
public void setOptionOperationId(String optionOperationId)
'autoFetchDisplayMap'
is set, this attribute
provides a way to customize the operationId
passed to
dataSource.fetchData()
when retrieving the display map from the option dataSource.
optionOperationId
- optionOperationId Default value is nullpublic String getOptionOperationId()
'autoFetchDisplayMap'
is set, this attribute
provides a way to customize the operationId
passed to
dataSource.fetchData()
when retrieving the display map from the option dataSource.
public void setValueField(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
- valueField Default value is nullpublic 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 void setDisplayField(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, 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..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.
The display value
for a record with a specified displayField
can be picked up via com.smartgwt.client.widgets.grid.ListGrid#getDisplayValue
.
displayField
- displayField Default value is nullpublic 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, 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..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.
The display value
for a record with a specified displayField
can be picked up via com.smartgwt.client.widgets.grid.ListGrid#getDisplayValue
.
public void setShowHover(Boolean showHover)
com.smartgwt.client.widgets.grid.ListGridField#hoverHTML
. canHover
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 showHover
to false.
showHover
- showHover Default value is nullpublic Boolean getShowHover()
com.smartgwt.client.widgets.grid.ListGridField#hoverHTML
. canHover
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 showHover
to false.
public void setCanToggle(Boolean canToggle)
com.smartgwt.client..ValueMap
field to be edited without going into edit mode. When this
attribute is set, if 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, canEdit
must be set to true. Note
that you can enable toggling only (without allowing the user to edit other fields) by just setting 'grid.editEvent:"none"'
.
If 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 autoSaveEdits
has
been set to false, will be stored as an edit value for the record.
Note : This is an advanced setting
canToggle
- canToggle Default value is nullpublic Boolean getCanToggle()
com.smartgwt.client..ValueMap
field to be edited without going into edit mode. When this
attribute is set, if 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, canEdit
must be set to true. Note
that you can enable toggling only (without allowing the user to edit other fields) by just setting 'grid.editEvent:"none"'
.
If 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 autoSaveEdits
has
been set to false, will be stored as an edit value for the record.
public void getFieldTitle(ListGrid viewer, int fieldNum)
title
attribute on the field to specify the title. You can
use com.smartgwt.client.widgets.grid.ListGrid#setFieldProperties
to dynamically update the title.
viewer
- pointer back to the ListGridfieldNum
- index of this field in the grid's fields array.public 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(int, int, java.lang.String)
or ListGrid.setEditValues(int, java.util.Map)
.
addEditorEnterHandler
in interface HasEditorEnterHandlers
handler
- the editorEnter handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addEditorExitHandler(EditorExitHandler handler)
Callback fired when the user attempts to navigate away from the current edit cell, or complete the current edit.
Return false 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 handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRecordClickHandler(RecordClickHandler handler)
Executed when this field is clicked on. Note that if ListGrid.addRecordClickHandler(com.smartgwt.client.widgets.grid.events.RecordClickHandler)
is also defined, it will be fired for fields that
define a recordClick handler if the field-level handler returns true. Return false to prevent the grid-level handler
from firing.
addRecordClickHandler
in interface HasRecordClickHandlers
handler
- the recordClick handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addChangeHandler(ChangeHandler handler)
If this field is editable, any FormItem.addChangeHandler(com.smartgwt.client.widgets.form.fields.events.ChangeHandler)
handler
specified on the ListGridField will be passed onto the editors for this field.
addChangeHandler
in interface HasChangeHandlers
handler
- the change handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addChangedHandler(ChangedHandler handler)
If this field is editable, any FormItem.addChangedHandler(com.smartgwt.client.widgets.form.fields.events.ChangedHandler)
handler
specified on the ListGridField will be passed onto the editors for this field.
addChangedHandler
in interface HasChangedHandlers
handler
- the changed handler
HandlerRegistration
used to remove this handlerpublic void setDefaultFilterValue(String defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(Integer defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(Float defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(Boolean defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(Date defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDateFormatter(DateDisplayFormat dateFormatter)
com.smartgwt.client..Date#setShortDisplayFormat
. Specify any valid DateDisplayFormat
, or function to change the display format for dates used by this grid. If specified as a function, this function will be executed in the scope of the Date and should return the formatted string.displayFormat
.displayFormat
. In this case you may also need to set dateInputFormat
.
dateFormatter
- dateFormatter Default value is nullpublic DateDisplayFormat getDateFormatter()
DateUtil.setShortDateDisplayFormatter(com.smartgwt.client.util.DateDisplayFormatter)
. Specify any valid DateDisplayFormat
, or function to change the display format for dates used by this grid. If specified as a function, this function will be executed in the scope of the Date and should return the formatted string.displayFormat
.displayFormat
. In this case you may also need to set dateInputFormat
.
public void setIcons(FormItemIcon... icons)
icons
to be displayed in the editors displayed for this field Note : This is an advanced setting
icons
- icons Default value is nullpublic void setGroupingModes(Map groupingModes)
If groupingModes
are present and
canGroupBy
, 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,
groupingMode
is set to the user's chosen mode,
and this choice can be detected via the field
parameter to
com.smartgwt.client.widgets.grid.ListGridField#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
declaration, and the different grouping modes that are offered
automatically for various common types are defined this way.
groupingModes
- groupingModes Default value is nullpublic Map getGroupingModes()
If groupingModes
are present and
canGroupBy
, 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,
groupingMode
is set to the user's chosen mode,
and this choice can be detected via the field
parameter to
com.smartgwt.client.widgets.grid.ListGridField#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
declaration, and the different grouping modes that are offered
automatically for various common types are defined this way.
public void setCellFormatter(CellFormatter formatter)
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
com.smartgwt.client.widgets.grid.ListGridField#formatEditorValue
is provided for that purpose.
formatter
- the formatterpublic 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.
normalizer
- the sort normalizerpublic void setHoverCustomizer(HoverCustomizer hoverCustomizer)
hoverCustomizer
- the hover customizerpublic void setAlign(Alignment align)
cellAlign
.
align
- align Default value is nullpublic Alignment getAlign()
cellAlign
.
public void setWidth(int width)
width
- width Default value is "*"public void setWidth(String width)
width
- width Default value is "*"public String getWidth()
public void setWrap(boolean wrap)
wrap
- true to wrappublic void setHidden(boolean hidden)
public void setImgDir(String imgDir)
public void setPrompt(String prompt)
public void setDefaultValue(String defaultValue)
public void setDefaultValue(Integer defaultValue)
public void setDefaultValue(Boolean defaultValue)
public void setDefaultValue(Float defaultValue)
public void setDefaultValue(Date defaultValue)
public void setEditorType(FormItem editorType)
editorType
- the editor typepublic void setFilterEditorType(FormItem filterEditorType)
filterEditorType
- the filter editor typepublic void setFilterEditorValueMap(Map filterEditorValueMap)
filterEditorValueMap
- the filter editor value mappublic void setMultiple(boolean multiple)
multiple
- true for select listpublic void setEditorValueMap(Map editorValueMap)
editorValueMap
- the editor value mappublic void 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
- validators Default value is nullpublic void setValueMap(Map valueMap)
canEdit
, canEdit
), editors displayed for this
field will pick up their valueMap either from this value or from editorValueMap
. See also valueMap
.
valueMap
- valueMap Default value is nullpublic void setValueMap(String... valueMap)
canEdit
, canEdit
), editors displayed for this
field will pick up their valueMap either from this value or from editorValueMap
. See also valueMap
.
valueMap
- valueMap Default value is nullpublic void setValueIcons(Map<String,String> valueIcons)
editorValueIcons
.editor_
attributes:valueIconWidth
valueIconHeight
valueIconSize
valueIconLeftPadding
valueIconRightPadding
imageURLPrefix
imageURLSuffix
valueIcons
- valueIcons Default value is nullpublic void setEditorValueIcons(Map<String,String> editorValueIcons)
editorValueIcons
- editorValueIcons Default value is nullpublic void setOptionDataSource(DataSource optionDataSource)
valueField
and
displayField
in the loaded records,
to derive one valueMap entry per record loaded from the optionDataSource. Unlike the similar use of
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 recommended approach is:
displayField
attribute on the data field to the
name of the display field. Note that it is key that the server
return both the underlying stored value and the display value, as suggested above, because this approach allows the
optionDataSource
property to be used to provide paged valueMaps during inline
editing and showFilterEditor
. Note that pickList.optionDataSource
is a distinct setting from listGridField.optionDataSource, settable via editorProperties
(for editing) and filterEditorProperties
(for filtering).
optionDataSource
- optionDataSource Default value is nullpublic void setShowIfCondition(ListGridFieldIfFunction showIf)
showIf
- showIf criteriapublic void setSortDirection(SortDirection sortDirection)
sortField
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
sortDirection
- sortDirection Default value is nullpublic SortDirection getSortDirection()
sortField
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
public 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.
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.
public 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 handler
HandlerRegistration
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(Button buttonProperties)
buttonProperties
- the header button propertiespublic void setSummaryFunction(SummaryFunctionType summaryFunction)
showGridSummary
or showGroupSummary
is true, this attribute can be used to
specify an explicit SummaryFunction
for calculating the summary value to display.
summaryFunction
- summaryFunction Default value is nullpublic SummaryFunctionType getSummaryFunction()
showGridSummary
or showGroupSummary
is true, this attribute can be used to
specify an explicit SummaryFunction
for calculating the summary value to display.
public void setSummaryFunction(SummaryFunction summaryFunction)
showGridSummary
or showGroupSummary
is true, this attribute can be used to
specify an explicit SummaryFunction
for calculating the summary value to display.
summaryFunction
- summaryFunction Default value is nullpublic 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. 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.
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. 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.
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |