Class ListGridField

All Implemented Interfaces:
HasHandlers, HasCellSavedHandlers, HasChangedHandlers, HasChangeHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasRecordClickHandlers, HasValueIconClickHandlers
Direct Known Subclasses:
ListGridRemoveField, ListGridSummaryField, TreeGridField

An ordinary JavaScript object containing properties that configures the display of and interaction with the columns of a ListGrid.
See Also:
  • Constructor Details

    • ListGridField

      public ListGridField()
    • ListGridField

      public ListGridField(JavaScriptObject jsObj)
    • ListGridField

      public ListGridField(String name)
    • ListGridField

      public ListGridField(String name, int width)
    • ListGridField

      public ListGridField(String name, String title)
    • ListGridField

      public ListGridField(String name, String title, int width)
  • Method Details

    • getOrCreateRef

      public static ListGridField getOrCreateRef(JavaScriptObject jsObj)
    • setAIFieldRequest

      public ListGridField setAIFieldRequest(AIFieldRequest aiFieldRequest)
      The settings that configure requests to AI to generate the values for this field. This can be set by the application directly or created and edited by the user with an AIFieldBuilder, either directly or via the grid header menu items to add an AI summary or sort field (see ListGrid.canAddAISummaryFields).

      Note that setting an aiFieldRequest will cause the default value of escapeHTML to be true.

      Parameters:
      aiFieldRequest - New aiFieldRequest value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getAIFieldRequest

      public AIFieldRequest getAIFieldRequest()
      The settings that configure requests to AI to generate the values for this field. This can be set by the application directly or created and edited by the user with an AIFieldBuilder, either directly or via the grid header menu items to add an AI summary or sort field (see ListGrid.canAddAISummaryFields).

      Note that setting an aiFieldRequest will cause the default value of escapeHTML to be true.

      Returns:
      Current aiFieldRequest value. Default value is null
      See Also:
    • setAiHoverContentsPrefix

      public ListGridField setAiHoverContentsPrefix(String aiHoverContentsPrefix)
      If set to a non-null value, override of ListGrid.aiHoverContentsPrefix for this field.
      Parameters:
      aiHoverContentsPrefix - New aiHoverContentsPrefix value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getAiHoverContentsPrefix

      public String getAiHoverContentsPrefix()
      If set to a non-null value, override of ListGrid.aiHoverContentsPrefix for this field.
      Returns:
      Current aiHoverContentsPrefix value. Default value is null
      See Also:
    • setAIHoverRequest

      public 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.

      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.

      Parameters:
      aiHoverRequest - New aiHoverRequest value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getAIHoverRequest

      public 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.

      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.

      Returns:
      Current aiHoverRequest value. Default value is null
      See Also:
    • setAllowFilterExpressions

      public ListGridField setAllowFilterExpressions(Boolean allowFilterExpressions)
      Field-level setting for 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.

      Parameters:
      allowFilterExpressions - New allowFilterExpressions value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getAllowFilterExpressions

      public Boolean getAllowFilterExpressions()
      Field-level setting for 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.

      Returns:
      Current allowFilterExpressions value. Default value is null
      See Also:
    • setAllowFilterOperators

      public ListGridField setAllowFilterOperators(Boolean allowFilterOperators)
      Per-field setting for 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.

      Parameters:
      allowFilterOperators - New allowFilterOperators value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getAllowFilterOperators

      public Boolean getAllowFilterOperators()
      Per-field setting for 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.

      Returns:
      Current allowFilterOperators value. Default value is null
    • setAlwaysShowOperatorIcon

      public ListGridField setAlwaysShowOperatorIcon(Boolean alwaysShowOperatorIcon)
      Per-field setting for 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.

      Parameters:
      alwaysShowOperatorIcon - New alwaysShowOperatorIcon value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getAlwaysShowOperatorIcon

      public Boolean getAlwaysShowOperatorIcon()
      Per-field setting for 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.

      Returns:
      Current alwaysShowOperatorIcon value. Default value is null
    • setApplyAfterSummary

      public ListGridField setApplyAfterSummary(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. 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

      Parameters:
      applyAfterSummary - New applyAfterSummary value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getApplyAfterSummary

      public 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. 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

      Returns:
      Current applyAfterSummary value. Default value is null
    • setArrowKeyEditAction

      public ListGridField setArrowKeyEditAction(ArrowKeyEditAction arrowKeyEditAction)
      What to do when a user hits arrow key while editing this field?
      See ListGrid.getArrowKeyEditAction().
      Parameters:
      arrowKeyEditAction - New arrowKeyEditAction value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getArrowKeyEditAction

      public ArrowKeyEditAction getArrowKeyEditAction()
      What to do when a user hits arrow key while editing this field?
      See ListGrid.getArrowKeyEditAction().
      Returns:
      Current arrowKeyEditAction value. Default value is null
      See Also:
    • setAsyncErrorCellValue

      public ListGridField setAsyncErrorCellValue(String asyncErrorCellValue)
      A field-specific value to display for cells when an error occurred during asynchronous generation.

      If set, this will override the grid-wide ListGrid.asyncErrorCellValue setting for the field.

      Parameters:
      asyncErrorCellValue - New asyncErrorCellValue value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getAsyncErrorCellValue

      public String getAsyncErrorCellValue()
      A field-specific value to display for cells when an error occurred during asynchronous generation.

      If set, this will override the grid-wide ListGrid.asyncErrorCellValue setting for the field.

      Returns:
      Current asyncErrorCellValue value. Default value is null
      See Also:
    • setAsyncMissingCellValue

      public ListGridField setAsyncMissingCellValue(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.

      If set, this will override the grid-wide ListGrid.asyncMissingCellValue setting for the field.

      Parameters:
      asyncMissingCellValue - New asyncMissingCellValue value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getAsyncMissingCellValue

      public 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.

      If set, this will override the grid-wide ListGrid.asyncMissingCellValue setting for the field.

      Returns:
      Current asyncMissingCellValue value. Default value is null
      See Also:
    • setAutoComplete

      public ListGridField setAutoComplete(AutoComplete autoComplete)
      Whether to allow browser autoComplete when editing this field.

      If unset, defaults to listGrid.autoComplete

      Parameters:
      autoComplete - New autoComplete value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getAutoComplete

      public AutoComplete getAutoComplete()
      Whether to allow browser autoComplete when editing this field.

      If unset, defaults to listGrid.autoComplete

      Returns:
      Current autoComplete value. Default value is null
      See Also:
    • setAutoFetchDisplayMap

      public ListGridField setAutoFetchDisplayMap(Boolean autoFetchDisplayMap)
      If true, automatically fetches records and derives a valueMap from optionDataSource.

      Same as ListGrid.autoFetchDisplayMap, but defined on a per-field basis.

      Parameters:
      autoFetchDisplayMap - New autoFetchDisplayMap value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getAutoFetchDisplayMap

      public Boolean getAutoFetchDisplayMap()
      If true, automatically fetches records and derives a valueMap from optionDataSource.

      Same as ListGrid.autoFetchDisplayMap, but defined on a per-field basis.

      Returns:
      Current autoFetchDisplayMap value. Default value is null
      See Also:
    • setAutoFit

      public 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. This direct approach is different from and less verbose than applying similar properties on the grid and overriding them on a per-field basis.
      Parameters:
      autoFit - New autoFit value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getAutoFit

      public AutoFitWidthApproach getAutoFit()
      When set, this attribute causes this field to be auto-sized directly by effectively setting 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.
      Returns:
      Current autoFit value. Default value is null
    • setAutoFitWidth

      public ListGridField setAutoFitWidth(Boolean autoFitWidth)
      Should this listGrid field autofit its width to either titles or content?

      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().

      Parameters:
      autoFitWidth - field to auto-fit. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getAutoFitWidth

      public Boolean getAutoFitWidth()
      Should this listGrid field autofit its width to either titles or content?

      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.

      Returns:
      Current autoFitWidth value. Default value is null
      See Also:
    • setAutoFitWidthApproach

      public ListGridField setAutoFitWidthApproach(AutoFitWidthApproach autoFitWidthApproach)
      When a user requests column autofitting via the 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.

      Parameters:
      autoFitWidthApproach - New autoFitWidthApproach value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getAutoFitWidthApproach

      public AutoFitWidthApproach getAutoFitWidthApproach()
      When a user requests column autofitting via the 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.

      Returns:
      Current autoFitWidthApproach value. Default value is null
    • setAutoFreeze

      public ListGridField setAutoFreeze(Boolean autoFreeze)
      Whether this field should be automatically frozen when other fields are frozen. When true, the field will be automatically frozen to the extreme of the grid. The automatically generated 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.

      Parameters:
      autoFreeze - New autoFreeze value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getAutoFreeze

      public Boolean getAutoFreeze()
      Whether this field should be automatically frozen when other fields are frozen. When true, the field will be automatically frozen to the extreme of the grid. The automatically generated 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.

      Returns:
      Current autoFreeze value. Default value is null
      See Also:
    • setBaseStyle

      public ListGridField setBaseStyle(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.
      Parameters:
      baseStyle - New baseStyle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getBaseStyle

      public 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.
      Returns:
      Current baseStyle value. Default value is null
      See Also:
    • setCanAutoFitWidth

      public ListGridField setCanAutoFitWidth(Boolean canAutoFitWidth)
      Should the user be allowed to perform one-time autofitting of this field via a header context-menu option?

      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.

      Parameters:
      canAutoFitWidth - New canAutoFitWidth value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCanAutoFitWidth

      public Boolean getCanAutoFitWidth()
      Should the user be allowed to perform one-time autofitting of this field via a header context-menu option?

      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.

      Returns:
      Current canAutoFitWidth value. Default value is null
      See Also:
    • setCanDragResize

      public ListGridField setCanDragResize(Boolean canDragResize)
      Whether this field can be dragResized using the mouse. If unset, the default behavior is governed by ListGrid.canResizeFields.
      Parameters:
      canDragResize - New canDragResize value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getCanDragResize

      public Boolean getCanDragResize()
      Whether this field can be dragResized using the mouse. If unset, the default behavior is governed by ListGrid.canResizeFields.
      Returns:
      Current canDragResize value. Default value is null
    • setCanEdit

      public ListGridField setCanEdit(Boolean canEdit)
      This property establishes default editability for the field. May be overridden by setting the 'canEdit' property at the listGrid level. If not explicitly set and this grid is bound to a dataSource, the 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.

      Overrides:
      setCanEdit in class Field
      Parameters:
      canEdit - New canEdit value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCanEdit

      public Boolean getCanEdit()
      This property establishes default editability for the field. May be overridden by setting the 'canEdit' property at the listGrid level. If not explicitly set and this grid is bound to a dataSource, the 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.

      Overrides:
      getCanEdit in class Field
      Returns:
      Current canEdit value. Default value is null
      See Also:
    • setCanEditAISummary

      public ListGridField setCanEditAISummary(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.
      Parameters:
      canEditAISummary - New canEditAISummary value. Default value is true
      Returns:
      ListGridField instance, for chaining setter calls
    • getCanEditAISummary

      public 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.
      Returns:
      Current canEditAISummary value. Default value is true
    • setCanEditFormula

      public ListGridField setCanEditFormula(Boolean canEditFormula)
      Can formula be edited from header context menu? Setting attribute to false prevents editing. A null or true value allows editing.

      Has no effect when ListGrid.canAddFormulaFields is false.

      Parameters:
      canEditFormula - New canEditFormula value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getCanEditFormula

      public Boolean getCanEditFormula()
      Can formula be edited from header context menu? Setting attribute to false prevents editing. A null or true value allows editing.

      Has no effect when ListGrid.canAddFormulaFields is false.

      Returns:
      Current canEditFormula value. Default value is null
    • setCanEditSummary

      public ListGridField setCanEditSummary(Boolean canEditSummary)
      Can summary be edited from header context menu? Setting attribute to false prevents editing. A null or true value allows editing.

      Has no effect when ListGrid.canAddSummaryFields is false.

      Parameters:
      canEditSummary - New canEditSummary value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getCanEditSummary

      public Boolean getCanEditSummary()
      Can summary be edited from header context menu? Setting attribute to false prevents editing. A null or true value allows editing.

      Has no effect when ListGrid.canAddSummaryFields is false.

      Returns:
      Current canEditSummary value. Default value is null
    • setCanExport

      public ListGridField setCanExport(Boolean canExport)
      Dictates whether the data in this field be exported. Explicitly set this to false to prevent exporting. Has no effect if the underlying dataSourceField is explicitly set to canExport: false.
      Overrides:
      setCanExport in class Field
      Parameters:
      canExport - New canExport value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getCanExport

      public Boolean getCanExport()
      Dictates whether the data in this field be exported. Explicitly set this to false to prevent exporting. Has no effect if the underlying dataSourceField is explicitly set to canExport: false.
      Overrides:
      getCanExport in class Field
      Returns:
      Current canExport value. Default value is null
    • setCanFilter

      public ListGridField setCanFilter(Boolean canFilter)
      If showing a filter row for this ListGrid, should the filter criteria for this field be editable
      Parameters:
      canFilter - New canFilter value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCanFilter

      public Boolean getCanFilter()
      If showing a filter row for this ListGrid, should the filter criteria for this field be editable
      Returns:
      Current canFilter value. Default value is null
      See Also:
    • setCanFreeze

      public ListGridField setCanFreeze(Boolean canFreeze)
      Whether this field should display freezing/unfreezing options in its header context menu. See FrozenFields.
      Parameters:
      canFreeze - New canFreeze value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCanFreeze

      public Boolean getCanFreeze()
      Whether this field should display freezing/unfreezing options in its header context menu. See FrozenFields.
      Returns:
      Current canFreeze value. Default value is null
      See Also:
    • setCanGroupBy

      public ListGridField setCanGroupBy(Boolean canGroupBy)
      Determines whether this field will be groupable in the header context menu.
      Parameters:
      canGroupBy - New canGroupBy value. Default value is true
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCanGroupBy

      public Boolean getCanGroupBy()
      Determines whether this field will be groupable in the header context menu.
      Returns:
      Current canGroupBy value. Default value is true
      See Also:
    • setCanHide

      public ListGridField setCanHide(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. 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.

      Parameters:
      canHide - New canHide value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCanHide

      public 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. 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.

      Returns:
      Current canHide value. Default value is null
      See Also:
    • setCanHilite

      public ListGridField setCanHilite(Boolean canHilite)
      Determines whether this field can be hilited. Set to false to prevent this field from appearing in HiliteEditor.
      Parameters:
      canHilite - New canHilite value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getCanHilite

      public Boolean getCanHilite()
      Determines whether this field can be hilited. Set to false to prevent this field from appearing in HiliteEditor.
      Returns:
      Current canHilite value. Default value is null
    • setCanReorder

      public ListGridField setCanReorder(Boolean canReorder)
      Whether this field can be reordered using the mouse. If unset, the default behavior is governed by 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.

      Parameters:
      canReorder - New canReorder value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getCanReorder

      public Boolean getCanReorder()
      Whether this field can be reordered using the mouse. If unset, the default behavior is governed by 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.

      Returns:
      Current canReorder value. Default value is null
    • setCanSort

      public ListGridField setCanSort(Boolean canSort)
      Enables or disables sorting by this column. If false, interactive sorting via header-clicks or menu-items will have no effect, but direct scripted calls to sort() or setSort() will work as expected.
      Parameters:
      canSort - New canSort value. Default value is true
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCanSort

      public Boolean getCanSort()
      Enables or disables sorting by this column. If false, interactive sorting via header-clicks or menu-items will have no effect, but direct scripted calls to sort() or setSort() will work as expected.
      Returns:
      Current canSort value. Default value is true
      See Also:
    • setCanSortClientOnly

      public ListGridField setCanSortClientOnly(Boolean canSortClientOnly)
      When true, this field can only be used for sorting if the data is entirely client-side.
      Parameters:
      canSortClientOnly - New canSortClientOnly value. Default value is false
      Returns:
      ListGridField instance, for chaining setter calls
    • getCanSortClientOnly

      public Boolean getCanSortClientOnly()
      When true, this field can only be used for sorting if the data is entirely client-side.
      Returns:
      Current canSortClientOnly value. Default value is false
    • setCanToggle

      public ListGridField setCanToggle(Boolean canToggle)
      Allows a boolean or 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

      Parameters:
      canToggle - New canToggle value. Default value is varies
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCanToggle

      public Boolean getCanToggle()
      Allows a boolean or 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.

      Returns:
      Current canToggle value. Default value is varies
      See Also:
    • setCellAlign

      public ListGridField setCellAlign(Alignment cellAlign)
      Horizontal alignment for cells in this field's column: "left", "right" or "center".
      If null, alignment is derived from align. If this field is editable, the alignment of cells in the body will also be reflected in any editors for the field.
      Parameters:
      cellAlign - New cellAlign value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCellAlign

      public Alignment getCellAlign()
      Horizontal alignment for cells in this field's column: "left", "right" or "center".
      If null, alignment is derived from align. If this field is editable, the alignment of cells in the body will also be reflected in any editors for the field.
      Returns:
      Current cellAlign value. Default value is null
      See Also:
    • setCellIcon

      public ListGridField setCellIcon(String cellIcon)
      For a field of type:"icon" only, set the icon that appears in body cells. Unless setting 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().

      Parameters:
      cellIcon - New cellIcon value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCellIcon

      public String getCellIcon()
      For a field of type:"icon" only, set the icon that appears in body cells. Unless setting 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().

      Returns:
      Current cellIcon value. Default value is null
      See Also:
    • setCellPrompt

      public ListGridField setCellPrompt(String cellPrompt)
      HTML to show in a hover over cells in this field. Useful for fixed hover text, such as a tooltip for an icon in a field of type "icon". To show a custom prompt per cell, see hoverHTML.
      Parameters:
      cellPrompt - New cellPrompt value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getCellPrompt

      public String getCellPrompt()
      HTML to show in a hover over cells in this field. Useful for fixed hover text, such as a tooltip for an icon in a field of type "icon". To show a custom prompt per cell, see hoverHTML.
      Returns:
      Current cellPrompt value. Default value is null
      See Also:
    • setDataPath

      public ListGridField setDataPath(String dataPath)
      dataPath for this field. This property allows the grid to display details of nested data structures in a flat list of columns.

      Note : This is an advanced setting

      Parameters:
      dataPath - New dataPath value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getDataPath

      public String getDataPath()
      dataPath for this field. This property allows the grid to display details of nested data structures in a flat list of columns.
      Returns:
      Current dataPath value. Default value is null
    • setDateFormatter

      public ListGridField setDateFormatter(DateDisplayFormat dateFormatter)
      Display format to use for date type values within this field.

      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.

      Parameters:
      dateFormatter - New dateFormatter value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getDateFormatter

      public DateDisplayFormat getDateFormatter()
      Display format to use for date type values within this field.

      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.

      Returns:
      Current dateFormatter value. Default value is null
      See Also:
    • setDecimalPad

      public ListGridField setDecimalPad(Integer decimalPad)
      Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.

      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.

      Parameters:
      decimalPad - New decimalPad value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getDecimalPad

      public Integer getDecimalPad()
      Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.

      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.

      Returns:
      Current decimalPad value. Default value is null
      See Also:
    • setDecimalPrecision

      public ListGridField setDecimalPrecision(Integer decimalPrecision)
      Applies only to fields of type "float" and affects how many significant digits are shown.

      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.

      Parameters:
      decimalPrecision - New decimalPrecision value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getDecimalPrecision

      public Integer getDecimalPrecision()
      Applies only to fields of type "float" and affects how many significant digits are shown.

      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.

      Returns:
      Current decimalPrecision value. Default value is null
      See Also:
    • setDefaultGroupingMode

      public ListGridField setDefaultGroupingMode(String defaultGroupingMode)
      Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and field.groupingMode is unset. See field.groupingModes.
      Parameters:
      defaultGroupingMode - New defaultGroupingMode value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getDefaultGroupingMode

      public String getDefaultGroupingMode()
      Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and field.groupingMode is unset. See field.groupingModes.
      Returns:
      Current defaultGroupingMode value. Default value is null
      See Also:
    • setDefaultIconSrc

      public ListGridField setDefaultIconSrc(String defaultIconSrc)
      If this field is editable, this property will be passed to editors displayed for cells within this field as FormItem.defaultIconSrc.

      Note : This is an advanced setting

      Parameters:
      defaultIconSrc - New defaultIconSrc value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getDefaultIconSrc

      public String getDefaultIconSrc()
      If this field is editable, this property will be passed to editors displayed for cells within this field as FormItem.defaultIconSrc.
      Returns:
      Current defaultIconSrc value. Default value is null
      See Also:
      • com.smartgwt.client.widgets.grid.ListGridField#getIcons
      • Grid Editing
    • setDefaultWidth

      public ListGridField setDefaultWidth(Integer defaultWidth)
      Optional "default width" for this field. If set, this value will be returned by the ListGrid.getDefaultFieldWidth() method, and used as the autoFit size for the field's content.
      Parameters:
      defaultWidth - New defaultWidth value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getDefaultWidth

      public Integer getDefaultWidth()
      Optional "default width" for this field. If set, this value will be returned by the ListGrid.getDefaultFieldWidth() method, and used as the autoFit size for the field's content.
      Returns:
      Current defaultWidth value. Default value is null
    • setDisplayField

      public ListGridField 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.

      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().

      Parameters:
      displayField - New displayField value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getDisplayField

      public String getDisplayField()
      Specifies the 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().

      Returns:
      Current displayField value. Default value is null
      See Also:
    • setDisplayValueFromRecord

      public ListGridField setDisplayValueFromRecord(Boolean displayValueFromRecord)
      If a 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

      Parameters:
      displayValueFromRecord - New displayValueFromRecord value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getDisplayValueFromRecord

      public Boolean getDisplayValueFromRecord()
      If a 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.

      Returns:
      Current displayValueFromRecord value. Default value is null
    • setEditorFormula

      public ListGridField setEditorFormula(UserFormula editorFormula)
      Shortcut to configure a FormItem.formula for the editor used when this field is edited.
      Parameters:
      editorFormula - New editorFormula value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getEditorFormula

      public UserFormula getEditorFormula()
      Shortcut to configure a FormItem.formula for the editor used when this field is edited.
      Returns:
      Current editorFormula value. Default value is null
    • setEditorIconHeight

      public ListGridField setEditorIconHeight(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.

      Note : This is an advanced setting

      Parameters:
      editorIconHeight - New editorIconHeight value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEditorIconHeight

      public 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.
      Returns:
      Current editorIconHeight value. Default value is null
      See Also:
      • com.smartgwt.client.widgets.grid.ListGridField#getIcons
      • Grid Editing
    • setEditorIconWidth

      public ListGridField setEditorIconWidth(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.

      Note : This is an advanced setting

      Parameters:
      editorIconWidth - New editorIconWidth value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEditorIconWidth

      public 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.
      Returns:
      Current editorIconWidth value. Default value is null
      See Also:
      • com.smartgwt.client.widgets.grid.ListGridField#getIcons
      • Grid Editing
    • setEditorImageURLPrefix

      public ListGridField setEditorImageURLPrefix(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. This can be used to modify the valueIcons within the editor.
      If unset, but imageURLPrefix is specified, that will be used instead.

      Note : This is an advanced setting

      Parameters:
      editorImageURLPrefix - New editorImageURLPrefix value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEditorImageURLPrefix

      public 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. This can be used to modify the valueIcons within the editor.
      If unset, but imageURLPrefix is specified, that will be used instead.
      Returns:
      Current editorImageURLPrefix value. Default value is null
      See Also:
    • setEditorImageURLSuffix

      public ListGridField setEditorImageURLSuffix(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. This can be used to modify the valueIcons within the editor.
      If unset, but imageURLPrefix is specified, that will be used instead.

      Note : This is an advanced setting

      Parameters:
      editorImageURLSuffix - New editorImageURLSuffix value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEditorImageURLSuffix

      public 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. This can be used to modify the valueIcons within the editor.
      If unset, but imageURLPrefix is specified, that will be used instead.
      Returns:
      Current editorImageURLSuffix value. Default value is null
      See Also:
    • setEditorTextFormula

      public ListGridField setEditorTextFormula(UserSummary editorTextFormula)
      Shortcut to configure a FormItem.textFormula for the editor used when this field is edited.
      Parameters:
      editorTextFormula - New editorTextFormula value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getEditorTextFormula

      public UserSummary getEditorTextFormula()
      Shortcut to configure a FormItem.textFormula for the editor used when this field is edited.
      Returns:
      Current editorTextFormula value. Default value is null
    • setEditorValueIconHeight

      public ListGridField 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. If unset, the editor's valueIcon width and height will be determined in the same way as it would be for a static cell.
      Parameters:
      editorValueIconHeight - New editorValueIconHeight value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEditorValueIconHeight

      public 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. If unset, the editor's valueIcon width and height will be determined in the same way as it would be for a static cell.
      Returns:
      Current editorValueIconHeight value. Default value is null
      See Also:
    • setEditorValueIcons

      public ListGridField 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. If unset, the editor's valueIcons will be determined in the same way as it would be for a static cell.
      Parameters:
      editorValueIcons - New editorValueIcons value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • setEditorValueIconWidth

      public ListGridField 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. If unset, the editor's valueIcon width and height will be determined in the same way as it would be for a static cell.
      Parameters:
      editorValueIconWidth - New editorValueIconWidth value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEditorValueIconWidth

      public 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. If unset, the editor's valueIcon width and height will be determined in the same way as it would be for a static cell.
      Returns:
      Current editorValueIconWidth value. Default value is null
      See Also:
    • setEditorValueMap

      public ListGridField setEditorValueMap(Map editorValueMap)
      A valueMap to use for editors shown for this field. By default if this is not specified field.valueMap will be used instead.

      Dynamic valueMaps can be provided by implementing ListGrid.getEditorValueMap().

      Parameters:
      editorValueMap - New editorValueMap value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • setEmptyCellValue

      public ListGridField setEmptyCellValue(String emptyCellValue)
      The value to display for a cell whose value is null or the empty string after applying 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.

      Parameters:
      emptyCellValue - New emptyCellValue value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEmptyCellValue

      public String getEmptyCellValue()
      The value to display for a cell whose value is null or the empty string after applying 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.

      Returns:
      Current emptyCellValue value. Default value is null
      See Also:
    • setEnableWhen

      public ListGridField setEnableWhen(Criteria enableWhen)
      Criteria to be evaluated to determine whether this field should be enabled.

      This criteria is dynamic and will be renterpreted each time the rule context changes.

      Parameters:
      enableWhen - New enableWhen value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEnableWhen

      public Criteria getEnableWhen()
      Criteria to be evaluated to determine whether this field should be enabled.

      This criteria is dynamic and will be renterpreted each time the rule context changes.

      Returns:
      Current enableWhen value. Default value is null
      See Also:
    • setEnterKeyEditAction

      public 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.
      Parameters:
      enterKeyEditAction - New enterKeyEditAction value. Default value is "done"
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEnterKeyEditAction

      public 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.
      Returns:
      Current enterKeyEditAction value. Default value is "done"
      See Also:
    • setEscapeHTML

      public ListGridField setEscapeHTML(Boolean escapeHTML)
      By default HTML values in ListGrid cells will be interpreted by the browser. Setting this flag to 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.

      Overrides:
      setEscapeHTML in class Field
      Parameters:
      escapeHTML - New escapeHTML value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEscapeHTML

      public Boolean getEscapeHTML()
      By default HTML values in ListGrid cells will be interpreted by the browser. Setting this flag to 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.

      Overrides:
      getEscapeHTML in class Field
      Returns:
      Current escapeHTML value. Default value is null
      See Also:
    • setEscapeKeyEditAction

      public 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.
      Parameters:
      escapeKeyEditAction - New escapeKeyEditAction value. Default value is "cancel"
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getEscapeKeyEditAction

      public 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.
      Returns:
      Current escapeKeyEditAction value. Default value is "cancel"
      See Also:
    • setExcludeFromState

      public ListGridField setExcludeFromState(Boolean excludeFromState)
      If true, then this field is excluded from the bound component's view state. In addition, the field will not be selected as the default title field by DataBoundComponent.getTitleField() if DataBoundComponent.titleField is not provided.
      Parameters:
      excludeFromState - New excludeFromState value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getExcludeFromState

      public Boolean getExcludeFromState()
      If true, then this field is excluded from the bound component's view state. In addition, the field will not be selected as the default title field by DataBoundComponent.getTitleField() if DataBoundComponent.titleField is not provided.
      Returns:
      Current excludeFromState value. Default value is null
      See Also:
    • setExportFieldWidth

      public 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. 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.

      Parameters:
      exportFieldWidth - New exportFieldWidth value. Default value is true
      Returns:
      ListGridField instance, for chaining setter calls
    • getExportFieldWidth

      public 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. 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.

      Returns:
      Current exportFieldWidth value. Default value is true
    • setExportFormat

      public ListGridField setExportFormat(String exportFormat)
      FormatString used during exports for numeric or date formatting. See DataSourceField.exportFormat.
      Parameters:
      exportFormat - New exportFormat value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getExportFormat

      public String getExportFormat()
      FormatString used during exports for numeric or date formatting. See DataSourceField.exportFormat.
      Returns:
      Current exportFormat value. Default value is null
      See Also:
    • setExportRawNumbers

      public ListGridField setExportRawNumbers(Boolean exportRawNumbers)
      Dictates whether numeric values should be exported as raw numbers instead of formatted values when using 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.

      Parameters:
      exportRawNumbers - New exportRawNumbers value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getExportRawNumbers

      public Boolean getExportRawNumbers()
      Dictates whether numeric values should be exported as raw numbers instead of formatted values when using 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.

      Returns:
      Current exportRawNumbers value. Default value is null
    • setExportRawValues

      public ListGridField setExportRawValues(Boolean exportRawValues)
      Dictates whether the data in this field should be exported raw by 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.
      Parameters:
      exportRawValues - New exportRawValues value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getExportRawValues

      public Boolean getExportRawValues()
      Dictates whether the data in this field should be exported raw by 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.
      Returns:
      Current exportRawValues value. Default value is null
    • setFilterEditorValueMap

      public ListGridField 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.
      Parameters:
      filterEditorValueMap - New filterEditorValueMap value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • setFilterOnKeypress

      public ListGridField setFilterOnKeypress(Boolean filterOnKeypress)
      If set this will override the 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

      Parameters:
      filterOnKeypress - New filterOnKeypress value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getFilterOnKeypress

      public Boolean getFilterOnKeypress()
      If set this will override the 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.

      Returns:
      Current filterOnKeypress value. Default value is null
      See Also:
    • setFilterOperator

      public ListGridField setFilterOperator(OperatorId filterOperator)
      With the 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.

      Parameters:
      filterOperator - New filterOperator value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
      • com.smartgwt.client.widgets.grid.ListGridField#setOperator
    • getFilterOperator

      public OperatorId getFilterOperator()
      With the 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.

      Returns:
      Current filterOperator value. Default value is null
      See Also:
    • setFormat

      public ListGridField setFormat(String format)
      FormatString for numeric or date formatting. See DataSourceField.format.
      Parameters:
      format - New format value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getFormat

      public String getFormat()
      FormatString for numeric or date formatting. See DataSourceField.format.
      Returns:
      Current format value. Default value is null
      See Also:
    • setFrozen

      public ListGridField setFrozen(Boolean frozen)
      Whether this field should be "frozen" for the purposes of horizontal scrolling. See FrozenFields.
      Parameters:
      frozen - New frozen value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getFrozen

      public Boolean getFrozen()
      Whether this field should be "frozen" for the purposes of horizontal scrolling. See FrozenFields.
      Returns:
      Current frozen value. Default value is null
      See Also:
    • setGroupGranularity

      public ListGridField setGroupGranularity(Integer groupGranularity)
      Granularity of grouping for numeric fields.

      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.

      Parameters:
      groupGranularity - New groupGranularity value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getGroupGranularity

      public Integer getGroupGranularity()
      Granularity of grouping for numeric fields.

      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.

      Returns:
      Current groupGranularity value. Default value is null
    • setGroupingMode

      public ListGridField setGroupingMode(String groupingMode)
      For a field that allows multiple 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.

      Parameters:
      groupingMode - New groupingMode value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getGroupingMode

      public String getGroupingMode()
      For a field that allows multiple 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.

      Returns:
      Current groupingMode value. Default value is null
      See Also:
    • setGroupingModes

      public ListGridField setGroupingModes(Map groupingModes)
      If this field can be grouped, this attribute represents the set of grouping styles that are available. For example, a "date" field might be able to be grouped by week or month, as well as by the date itself.

      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.

      Parameters:
      groupingModes - New groupingModes value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getGroupingModes

      public Map getGroupingModes()
      If this field can be grouped, this attribute represents the set of grouping styles that are available. For example, a "date" field might be able to be grouped by week or month, as well as by the date itself.

      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.

      Returns:
      Current groupingModes value. Default value is null
    • setGroupPrecision

      public ListGridField setGroupPrecision(Integer groupPrecision)
      For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping.

      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.

      Parameters:
      groupPrecision - New groupPrecision value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getGroupPrecision

      public Integer getGroupPrecision()
      For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping.

      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.

      Returns:
      Current groupPrecision value. Default value is null
    • setHeaderBaseStyle

      public ListGridField setHeaderBaseStyle(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.
      Parameters:
      headerBaseStyle - New headerBaseStyle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHeaderBaseStyle

      public 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.
      Returns:
      Current headerBaseStyle value. Default value is null
      See Also:
    • setHeaderButtonAriaRole

      public ListGridField setHeaderButtonAriaRole(String headerButtonAriaRole)
      Aria role for the header button for this field.

      Note : This is an advanced setting

      Parameters:
      headerButtonAriaRole - New headerButtonAriaRole value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getHeaderButtonAriaRole

      public String getHeaderButtonAriaRole()
      Aria role for the header button for this field.
      Returns:
      Current headerButtonAriaRole value. Default value is null
    • setHeaderButtonAriaState

      public ListGridField setHeaderButtonAriaState(Map headerButtonAriaState)
      Aria state for the header button for this field.

      Note : This is an advanced setting

      Parameters:
      headerButtonAriaState - New headerButtonAriaState value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getHeaderButtonAriaState

      public Map getHeaderButtonAriaState()
      Aria state for the header button for this field.
      Returns:
      Current headerButtonAriaState value. Default value is null
    • setHeaderHoverDelay

      public ListGridField setHeaderHoverDelay(Integer headerHoverDelay)
      Delay in ms for hovers shown over this field's header.

      If unset, any hoverDelay will be used for both header hovers and hovers shown over cells in the grid's body.

      Parameters:
      headerHoverDelay - New headerHoverDelay value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getHeaderHoverDelay

      public Integer getHeaderHoverDelay()
      Delay in ms for hovers shown over this field's header.

      If unset, any hoverDelay will be used for both header hovers and hovers shown over cells in the grid's body.

      Returns:
      Current headerHoverDelay value. Default value is null
    • setHeaderTitle

      public ListGridField setHeaderTitle(String headerTitle)
      Optional title for the header button for this field. If specified this will be displayed in the header button instead of title or name. Set to an empty string to suppress the title in the header button entirely.
      Parameters:
      headerTitle - New headerTitle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHeaderTitle

      public String getHeaderTitle()
      Optional title for the header button for this field. If specified this will be displayed in the header button instead of title or name. Set to an empty string to suppress the title in the header button entirely.
      Returns:
      Current headerTitle value. Default value is null
      See Also:
    • setHeaderTitleStyle

      public ListGridField setHeaderTitleStyle(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.
      Parameters:
      headerTitleStyle - New headerTitleStyle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHeaderTitleStyle

      public 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.
      Returns:
      Current headerTitleStyle value. Default value is null
      See Also:
    • setHidden

      public ListGridField setHidden(Boolean hidden)
      Marks field as initially hidden.
      The user will still be able to show the field via a context menu. This may be suppressed by setting 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.

      Parameters:
      hidden - New hidden value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHidden

      public Boolean getHidden()
      Marks field as initially hidden.
      The user will still be able to show the field via a context menu. This may be suppressed by setting 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.

      Returns:
      Current hidden value. Default value is null
      See Also:
    • setHideOnPhone

      public ListGridField setHideOnPhone(Boolean hideOnPhone)
      Set this property to true to suppress showing this field on mobile phones (handset-sized devices). To update this property at runtime use 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.

      Parameters:
      hideOnPhone - New hideOnPhone value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHideOnPhone

      public Boolean getHideOnPhone()
      Set this property to true to suppress showing this field on mobile phones (handset-sized devices). To update this property at runtime use 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.

      Returns:
      Current hideOnPhone value. Default value is null
      See Also:
    • setHideOnTablet

      public ListGridField setHideOnTablet(Boolean hideOnTablet)
      Set this property to true to suppress showing this field on tablets (tablet-sized devices). To update this property at runtime use 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.

      Parameters:
      hideOnTablet - New hideOnTablet value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHideOnTablet

      public Boolean getHideOnTablet()
      Set this property to true to suppress showing this field on tablets (tablet-sized devices). To update this property at runtime use 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.

      Returns:
      Current hideOnTablet value. Default value is null
      See Also:
    • setHiliteHTMLAfterFormat

      public ListGridField setHiliteHTMLAfterFormat(Boolean hiliteHTMLAfterFormat)
      If set to true, custom HTML applied as part of hiliting will be applied after 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.

      Parameters:
      hiliteHTMLAfterFormat - New hiliteHTMLAfterFormat value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getHiliteHTMLAfterFormat

      public Boolean getHiliteHTMLAfterFormat()
      If set to true, custom HTML applied as part of hiliting will be applied after 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.

      Returns:
      Current hiliteHTMLAfterFormat value. Default value is null
    • setHiliteIconHeight

      public ListGridField setHiliteIconHeight(Integer hiliteIconHeight)
      Height for hilite icons for this field. Overrides ListGrid.hiliteIconSize, ListGrid.hiliteIconHeight, and hiliteIconSize.
      Parameters:
      hiliteIconHeight - New hiliteIconHeight value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHiliteIconHeight

      public Integer getHiliteIconHeight()
      Height for hilite icons for this field. Overrides ListGrid.hiliteIconSize, ListGrid.hiliteIconHeight, and hiliteIconSize.
      Returns:
      Current hiliteIconHeight value. Default value is null
      See Also:
    • setHiliteIconLeftPadding

      public ListGridField setHiliteIconLeftPadding(Integer hiliteIconLeftPadding)
      How much padding should there be on the left of hilite icons for this field? Overrides ListGrid.hiliteIconLeftPadding
      Parameters:
      hiliteIconLeftPadding - New hiliteIconLeftPadding value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHiliteIconLeftPadding

      public Integer getHiliteIconLeftPadding()
      How much padding should there be on the left of hilite icons for this field? Overrides ListGrid.hiliteIconLeftPadding
      Returns:
      Current hiliteIconLeftPadding value. Default value is null
      See Also:
    • setHiliteIconPosition

      public ListGridField setHiliteIconPosition(HiliteIconPosition hiliteIconPosition)
      When ListGrid.hiliteIcons are present, where the hilite icon will be placed relative to the field value. See HiliteIconPosition. Overrides ListGrid.hiliteIconPosition.
      Parameters:
      hiliteIconPosition - New hiliteIconPosition value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHiliteIconPosition

      public HiliteIconPosition getHiliteIconPosition()
      When ListGrid.hiliteIcons are present, where the hilite icon will be placed relative to the field value. See HiliteIconPosition. Overrides ListGrid.hiliteIconPosition.
      Returns:
      Current hiliteIconPosition value. Default value is null
      See Also:
    • setHiliteIconRightPadding

      public ListGridField setHiliteIconRightPadding(Integer hiliteIconRightPadding)
      How much padding should there be on the right of hilite icons for this field? Overrides ListGrid.hiliteIconRightPadding
      Parameters:
      hiliteIconRightPadding - New hiliteIconRightPadding value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHiliteIconRightPadding

      public Integer getHiliteIconRightPadding()
      How much padding should there be on the right of hilite icons for this field? Overrides ListGrid.hiliteIconRightPadding
      Returns:
      Current hiliteIconRightPadding value. Default value is null
      See Also:
    • setHiliteIconSize

      public ListGridField setHiliteIconSize(Integer hiliteIconSize)
      Default width and height of hilite icons in this field. Takes precedence over hiliteIconWidth, hiliteIconHeight and hiliteIconSize specified at the component level. Can be overridden via hiliteIconWidth and hiliteIconHeight
      Parameters:
      hiliteIconSize - New hiliteIconSize value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHiliteIconSize

      public Integer getHiliteIconSize()
      Default width and height of hilite icons in this field. Takes precedence over hiliteIconWidth, hiliteIconHeight and hiliteIconSize specified at the component level. Can be overridden via hiliteIconWidth and hiliteIconHeight
      Returns:
      Current hiliteIconSize value. Default value is null
      See Also:
    • setHiliteIconWidth

      public ListGridField setHiliteIconWidth(Integer hiliteIconWidth)
      Width for hilite icons for this field. Overrides ListGrid.hiliteIconSize, ListGrid.hiliteIconWidth, and hiliteIconSize.
      Parameters:
      hiliteIconWidth - New hiliteIconWidth value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getHiliteIconWidth

      public Integer getHiliteIconWidth()
      Width for hilite icons for this field. Overrides ListGrid.hiliteIconSize, ListGrid.hiliteIconWidth, and hiliteIconSize.
      Returns:
      Current hiliteIconWidth value. Default value is null
      See Also:
    • setHoverDelay

      public ListGridField setHoverDelay(Integer hoverDelay)
      Delay in ms for hovers shown for cells in this field. If unset, the grid's hoverDelay will be used.

      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.

      Parameters:
      hoverDelay - New hoverDelay value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getHoverDelay

      public Integer getHoverDelay()
      Delay in ms for hovers shown for cells in this field. If unset, the grid's hoverDelay will be used.

      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.

      Returns:
      Current hoverDelay value. Default value is null
    • setHoverWidth

      public ListGridField setHoverWidth(Integer hoverWidth)
      Specifies the width of the canvas shown when the mouse hovers over cells in this field.

      If unset, default behavior is derived from ListGrid.headerHoverWidth.

      Parameters:
      hoverWidth - New hoverWidth value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getHoverWidth

      public Integer getHoverWidth()
      Specifies the width of the canvas shown when the mouse hovers over cells in this field.

      If unset, default behavior is derived from ListGrid.headerHoverWidth.

      Returns:
      Current hoverWidth value. Default value is null
    • setHoverWrap

      public ListGridField setHoverWrap(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. 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.

      Parameters:
      hoverWrap - New hoverWrap value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getHoverWrap

      public 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. 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.

      Returns:
      Current hoverWrap value. Default value is null
    • setIcon

      public ListGridField setIcon(String icon)
      Optional icon to show next to the title for this field. Should be set to a URL to an image. Relative paths will be evaluated starting at the imgDir of this component. This URL is partial - it may be updated to indicate the current disabled (etc) state of the field.

      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().

      Parameters:
      icon - New icon value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getIcon

      public String getIcon()
      Optional icon to show next to the title for this field. Should be set to a URL to an image. Relative paths will be evaluated starting at the imgDir of this component. This URL is partial - it may be updated to indicate the current disabled (etc) state of the field.

      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().

      Returns:
      Current icon value. Default value is null
      See Also:
    • setIconCursor

      public 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.

      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

      Parameters:
      iconCursor - New iconCursor value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getIconCursor

      public 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.

      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.

      Returns:
      Current iconCursor value. Default value is null
    • setIconHeight

      public ListGridField 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. (See StatefulCanvas.iconHeight)
      If this field is editable, and 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.
      Parameters:
      iconHeight - New iconHeight value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getIconHeight

      public 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. (See StatefulCanvas.iconHeight)
      If this field is editable, and 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.
      Returns:
      Current iconHeight value. Default value is null
      See Also:
      • getIcon()
      • com.smartgwt.client.widgets.grid.ListGridField#getIcons
    • setIconOrientation

      public ListGridField 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"
      Parameters:
      iconOrientation - New iconOrientation value. Default value is "left"
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getIconOrientation

      public 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"
      Returns:
      Current iconOrientation value. Default value is "left"
      See Also:
    • setIcons

      public 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

      Note : This is an advanced setting

      Parameters:
      icons - New icons value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • setIconSize

      public ListGridField 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. (See StatefulCanvas.iconSize)
      Parameters:
      iconSize - New iconSize value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getIconSize

      public 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. (See StatefulCanvas.iconSize)
      Returns:
      Current iconSize value. Default value is null
      See Also:
    • setIconSpacing

      public ListGridField setIconSpacing(int iconSpacing)
      Pixels between icon and title text.
      Parameters:
      iconSpacing - New iconSpacing value. Default value is 6
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getIconSpacing

      public int getIconSpacing()
      Pixels between icon and title text.
      Returns:
      Current iconSpacing value. Default value is 6
      See Also:
    • setIconVAlign

      public ListGridField setIconVAlign(String iconVAlign)
      If this field is editable, this property will be passed to editors displayed for cells within this field as FormItem.iconVAlign.

      Note : This is an advanced setting

      Parameters:
      iconVAlign - New iconVAlign value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getIconVAlign

      public String getIconVAlign()
      If this field is editable, this property will be passed to editors displayed for cells within this field as FormItem.iconVAlign.
      Returns:
      Current iconVAlign value. Default value is null
      See Also:
      • com.smartgwt.client.widgets.grid.ListGridField#getIcons
      • Grid Editing
    • setIconWidth

      public ListGridField 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. (See StatefulCanvas.iconWidth)
      If this field is editable, and 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.
      Parameters:
      iconWidth - New iconWidth value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getIconWidth

      public 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. (See StatefulCanvas.iconWidth)
      If this field is editable, and 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.
      Returns:
      Current iconWidth value. Default value is null
      See Also:
      • getIcon()
      • com.smartgwt.client.widgets.grid.ListGridField#getIcons
    • setIgnoreKeyboardClicks

      public ListGridField setIgnoreKeyboardClicks(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).

      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.

      Parameters:
      ignoreKeyboardClicks - New ignoreKeyboardClicks value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getIgnoreKeyboardClicks

      public 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).

      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.

      Returns:
      Current ignoreKeyboardClicks value. Default value is null
    • setImageHeight

      public ListGridField setImageHeight(int imageHeight)
      Height of image shown for fieldTypes image and imageFile in this field.

      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.

      Parameters:
      imageHeight - New imageHeight value. Default value is 16
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getImageHeight

      public int getImageHeight()
      Height of image shown for fieldTypes image and imageFile in this field.

      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.

      Returns:
      Current imageHeight value. Default value is 16
      See Also:
    • setImageSize

      public ListGridField setImageSize(int imageSize)
      Size of images shown for fieldTypes image and imageFile in this field. This setting overrides the global ListGrid default 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.

      Parameters:
      imageSize - New imageSize value. Default value is 16
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getImageSize

      public int getImageSize()
      Size of images shown for fieldTypes image and imageFile in this field. This setting overrides the global ListGrid default 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.

      Returns:
      Current imageSize value. Default value is 16
      See Also:
    • setImageURLPrefix

      public ListGridField 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 string
      Alternatively, if this field displays any valueIcons, this prefix will be applied to the beginning of any valueIcons when determining the URL for the image.

      Note : This is an advanced setting

      Parameters:
      imageURLPrefix - New imageURLPrefix value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getImageURLPrefix

      public 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 string
      Alternatively, if this field displays any valueIcons, this prefix will be applied to the beginning of any valueIcons when determining the URL for the image.
      Returns:
      Current imageURLPrefix value. Default value is null
      See Also:
    • setImageURLSuffix

      public ListGridField setImageURLSuffix(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.

      Note : This is an advanced setting

      Parameters:
      imageURLSuffix - New imageURLSuffix value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getImageURLSuffix

      public 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.
      Returns:
      Current imageURLSuffix value. Default value is null
      See Also:
    • setImageWidth

      public ListGridField setImageWidth(int imageWidth)
      Width of images shown for fieldTypes image and imageFile in this field.

      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.

      Parameters:
      imageWidth - New imageWidth value. Default value is 16
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getImageWidth

      public int getImageWidth()
      Width of images shown for fieldTypes image and imageFile in this field.

      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.

      Returns:
      Current imageWidth value. Default value is 16
      See Also:
    • setIncludeFrom

      public ListGridField setIncludeFrom(String includeFrom)
      Indicates this field's values should be fetched from another, related DataSource. The individual field will inherit settings such as 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.

      Parameters:
      includeFrom - New includeFrom value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getIncludeFrom

      public String getIncludeFrom()
      Indicates this field's values should be fetched from another, related DataSource. The individual field will inherit settings such as 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.

      Returns:
      Current includeFrom value. Default value is null
    • setIncludeInRecordSummary

      public ListGridField 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. If unset, fields are included if they are of type "integer" or "float" only (since most summary functions perform numeric calculations). See also includeInRecordSummaryFields.
      Parameters:
      includeInRecordSummary - New includeInRecordSummary value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getIncludeInRecordSummary

      public 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. If unset, fields are included if they are of type "integer" or "float" only (since most summary functions perform numeric calculations). See also includeInRecordSummaryFields.
      Returns:
      Current includeInRecordSummary value. Default value is null
    • setIncludeInRecordSummaryFields

      public ListGridField setIncludeInRecordSummaryFields(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.

      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.

      Parameters:
      includeInRecordSummaryFields - New includeInRecordSummaryFields value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getIncludeInRecordSummaryFields

      public 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.

      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.

      Returns:
      Current includeInRecordSummaryFields value. Default value is null
      See Also:
    • setInitialValue

      public ListGridField setInitialValue(Object initialValue)
      In an editable ListGrid, initial value for this field when the user begins editing a new record.

      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.

      Parameters:
      initialValue - New initialValue value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getInitialValue

      public Object getInitialValue()
      In an editable ListGrid, initial value for this field when the user begins editing a new record.

      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.

      Returns:
      Current initialValue value. Default value is null
      See Also:
    • setIsRemoveField

      public ListGridField setIsRemoveField(Boolean isRemoveField)
      If set to true and 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

      Parameters:
      isRemoveField - New isRemoveField value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getIsRemoveField

      public Boolean getIsRemoveField()
      If set to true and 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.
      Returns:
      Current isRemoveField value. Default value is null
      See Also:
    • setLeaveHeaderMenuButtonSpace

      public ListGridField setLeaveHeaderMenuButtonSpace(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?

      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

      Parameters:
      leaveHeaderMenuButtonSpace - New leaveHeaderMenuButtonSpace value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • setLinkText

      public ListGridField setLinkText(String linkText)
      The HTML to display in cells of this field if the fieldType is set to link.

      This property sets linkText that will be the same for all records. You can set linkText on a per-record basis via ListGridRecord.linkText.

      Parameters:
      linkText - New linkText value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getLinkText

      public String getLinkText()
      The HTML to display in cells of this field if the fieldType is set to link.

      This property sets linkText that will be the same for all records. You can set linkText on a per-record basis via ListGridRecord.linkText.

      Returns:
      Current linkText value. Default value is null
      See Also:
    • setLinkTextProperty

      public ListGridField setLinkTextProperty(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".
      Parameters:
      linkTextProperty - New linkTextProperty value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getLinkTextProperty

      public 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".
      Returns:
      Current linkTextProperty value. Default value is null
      See Also:
    • setLinkURLPrefix

      public ListGridField setLinkURLPrefix(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.

      Note : This is an advanced setting

      Parameters:
      linkURLPrefix - New linkURLPrefix value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getLinkURLPrefix

      public 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.
      Returns:
      Current linkURLPrefix value. Default value is null
    • setLinkURLSuffix

      public ListGridField setLinkURLSuffix(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.

      Note : This is an advanced setting

      Parameters:
      linkURLSuffix - New linkURLSuffix value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getLinkURLSuffix

      public 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.
      Returns:
      Current linkURLSuffix value. Default value is null
    • setMaxWidth

      public ListGridField setMaxWidth(Integer maxWidth)
      When 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.
      Parameters:
      maxWidth - New maxWidth value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getMaxWidth

      public Integer getMaxWidth()
      When 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.
      Returns:
      Current maxWidth value. Default value is null
      See Also:
    • setMinWidth

      public ListGridField setMinWidth(Integer minWidth)
      When a field is subject to autofitting (see ListGrid.autoFitFieldWidths), sets the minimum width of the field. The actual allowed minimum will be the maximum of:
      • this property,
      • width (if a number),
      • the aufofit value determined by the widest value content in this field's column
      • ListGrid.minFieldWidth
      Parameters:
      minWidth - New minWidth value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getMinWidth

      public Integer getMinWidth()
      When a field is subject to autofitting (see ListGrid.autoFitFieldWidths), sets the minimum width of the field. The actual allowed minimum will be the maximum of:
      • this property,
      • width (if a number),
      • the aufofit value determined by the widest value content in this field's column
      • ListGrid.minFieldWidth
      Returns:
      Current minWidth value. Default value is null
      See Also:
    • setMultiple

      public ListGridField setMultiple(Boolean multiple)
      Indicates that this field should always be Array-valued. This property will be passed through to the generated edit-item when editing the field - so if 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.

      Overrides:
      setMultiple in class Field
      Parameters:
      multiple - New multiple value. Default value is false
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getMultiple

      public Boolean getMultiple()
      Indicates that this field should always be Array-valued. This property will be passed through to the generated edit-item when editing the field - so if 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.

      Overrides:
      getMultiple in class Field
      Returns:
      Current multiple value. Default value is false
      See Also:
    • setName

      public ListGridField setName(String name)
      Name of this field. Must be unique within the 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.

      Overrides:
      setName in class DBCField
      Parameters:
      name - New name value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getName

      public String getName()
      Name of this field. Must be unique within the 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.

      Overrides:
      getName in class DBCField
      Returns:
      Current name value. Default value is null
      See Also:
    • setOptionCriteria

      public 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

      See also optionTextMatchStyle.

      Parameters:
      optionCriteria - New optionCriteria value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getOptionCriteria

      public 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

      See also optionTextMatchStyle.

      Returns:
      Current optionCriteria value. Default value is null
    • setOptionOperationId

      public ListGridField setOptionOperationId(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.
      Parameters:
      optionOperationId - New optionOperationId value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getOptionOperationId

      public 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.
      Returns:
      Current optionOperationId value. Default value is null
    • setOptionTextMatchStyle

      public 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.
      Parameters:
      optionTextMatchStyle - New optionTextMatchStyle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getOptionTextMatchStyle

      public 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.
      Returns:
      Current optionTextMatchStyle value. Default value is null
    • setPartialSummary

      public ListGridField setPartialSummary(Boolean partialSummary)
      Only applies to fields of type "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

      Parameters:
      partialSummary - New partialSummary value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getPartialSummary

      public Boolean getPartialSummary()
      Only applies to fields of type "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

      Returns:
      Current partialSummary value. Default value is null
    • setPendingAsyncCellValue

      public ListGridField setPendingAsyncCellValue(String pendingAsyncCellValue)
      A field-specific value to display for cells whose value is pending asynchronous generation.

      If set, this will override the grid-wide ListGrid.pendingAsyncCellValue setting for the field.

      Parameters:
      pendingAsyncCellValue - New pendingAsyncCellValue value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getPendingAsyncCellValue

      public String getPendingAsyncCellValue()
      A field-specific value to display for cells whose value is pending asynchronous generation.

      If set, this will override the grid-wide ListGrid.pendingAsyncCellValue setting for the field.

      Returns:
      Current pendingAsyncCellValue value. Default value is null
      See Also:
    • setPrompt

      public ListGridField setPrompt(String prompt)
      Causes a tooltip hover to appear on the header generated for this field (effectively sets Canvas.prompt for the header).
      Parameters:
      prompt - New prompt value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getPrompt

      public String getPrompt()
      Causes a tooltip hover to appear on the header generated for this field (effectively sets Canvas.prompt for the header).
      Returns:
      Current prompt value. Default value is null
      See Also:
    • setRequired

      public ListGridField 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.
      Overrides:
      setRequired in class Field
      Parameters:
      required - New required value. Default value is false
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getRequired

      public 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.
      Returns:
      Current required value. Default value is false
      See Also:
    • setRotateTitle

      public ListGridField setRotateTitle(Boolean rotateTitle)
      Whether to rotate the field's title so it's rendered vertically from bottom to top. If unset, default behavior is derived from ListGrid.rotateHeaderTitles.
      Parameters:
      rotateTitle - New rotateTitle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getRotateTitle

      public Boolean getRotateTitle()
      Whether to rotate the field's title so it's rendered vertically from bottom to top. If unset, default behavior is derived from ListGrid.rotateHeaderTitles.
      Returns:
      Current rotateTitle value. Default value is null
      See Also:
    • setSelectCellTextOnClick

      public ListGridField setSelectCellTextOnClick(Boolean selectCellTextOnClick)
      Should the cell content be natively selected (ready for copying to clip-board) on click?

      See ListGrid.selectCellTextOnClick for more information.

      Parameters:
      selectCellTextOnClick - New selectCellTextOnClick value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getSelectCellTextOnClick

      public Boolean getSelectCellTextOnClick()
      Should the cell content be natively selected (ready for copying to clip-board) on click?

      See ListGrid.selectCellTextOnClick for more information.

      Returns:
      Current selectCellTextOnClick value. Default value is null
    • setShouldPrint

      public ListGridField setShouldPrint(Boolean shouldPrint)
      Whether this field should be included in the printable representation of the grid.
      Parameters:
      shouldPrint - New shouldPrint value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getShouldPrint

      public Boolean getShouldPrint()
      Whether this field should be included in the printable representation of the grid.
      Returns:
      Current shouldPrint value. Default value is null
      See Also:
    • setShowAlternateStyle

      public ListGridField setShowAlternateStyle(Boolean showAlternateStyle)
      When set to false, don't apply alternate-row styling to this field.

      Note : This is an advanced setting

      Parameters:
      showAlternateStyle - New showAlternateStyle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getShowAlternateStyle

      public Boolean getShowAlternateStyle()
      When set to false, don't apply alternate-row styling to this field.
      Returns:
      Current showAlternateStyle value. Default value is null
    • setShowDefaultContextMenu

      public ListGridField setShowDefaultContextMenu(Boolean showDefaultContextMenu)
      When set to false, this field will not show a context menu in its header.
      Parameters:
      showDefaultContextMenu - New showDefaultContextMenu value. Default value is true
      Returns:
      ListGridField instance, for chaining setter calls
    • getShowDefaultContextMenu

      public Boolean getShowDefaultContextMenu()
      When set to false, this field will not show a context menu in its header.
      Returns:
      Current showDefaultContextMenu value. Default value is true
    • setShowDisabledIcon

      public ListGridField setShowDisabledIcon(Boolean showDisabledIcon)
      If using an icon for this button, whether to switch the icon image if the button becomes disabled.
      Parameters:
      showDisabledIcon - New showDisabledIcon value. Default value is true
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getShowDisabledIcon

      public Boolean getShowDisabledIcon()
      If using an icon for this button, whether to switch the icon image if the button becomes disabled.
      Returns:
      Current showDisabledIcon value. Default value is true
      See Also:
    • setShowDownIcon

      public ListGridField setShowDownIcon(Boolean showDownIcon)
      If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.
      Parameters:
      showDownIcon - New showDownIcon value. Default value is false
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getShowDownIcon

      public Boolean getShowDownIcon()
      If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.
      Returns:
      Current showDownIcon value. Default value is false
      See Also:
    • setShowEllipsisWhenClipped

      public ListGridField setShowEllipsisWhenClipped(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
      Parameters:
      showEllipsisWhenClipped - New showEllipsisWhenClipped value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getShowEllipsisWhenClipped

      public 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
      Returns:
      Current showEllipsisWhenClipped value. Default value is null
    • setShowFileInline

      public ListGridField 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.
      Parameters:
      showFileInline - New showFileInline value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getShowFileInline

      public 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.
      Returns:
      Current showFileInline value. Default value is null
    • setShowFilterEditorHovers

      public ListGridField setShowFilterEditorHovers(Boolean showFilterEditorHovers)
      When set to false, no hover is shown for the field editor in this field. Otherwise, a hover shows the current field's criteria description along with the 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().

      Parameters:
      showFilterEditorHovers - New showFilterEditorHovers value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getShowFilterEditorHovers

      public Boolean getShowFilterEditorHovers()
      When set to false, no hover is shown for the field editor in this field. Otherwise, a hover shows the current field's criteria description along with the 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().

      Returns:
      Current showFilterEditorHovers value. Default value is null
      See Also:
    • setShowFocusedIcon

      public ListGridField setShowFocusedIcon(Boolean showFocusedIcon)
      If using an icon for this button, whether to switch the icon image when the button receives focus.

      If StatefulCanvas.showFocusedAsOver is true, the "Over" icon will be displayed when the canvas has focus, otherwise a separate "Focused" icon will be displayed

      Parameters:
      showFocusedIcon - New showFocusedIcon value. Default value is false
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getShowFocusedIcon

      public Boolean getShowFocusedIcon()
      If using an icon for this button, whether to switch the icon image when the button receives focus.

      If StatefulCanvas.showFocusedAsOver is true, the "Over" icon will be displayed when the canvas has focus, otherwise a separate "Focused" icon will be displayed

      Returns:
      Current showFocusedIcon value. Default value is false
      See Also:
    • setShowGridSummary

      public ListGridField setShowGridSummary(Boolean showGridSummary)
      If 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.
      Parameters:
      showGridSummary - New showGridSummary value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getShowGridSummary

      public Boolean getShowGridSummary()
      If 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.
      Returns:
      Current showGridSummary value. Default value is null
    • setShowGroupSummary

      public ListGridField setShowGroupSummary(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.
      Parameters:
      showGroupSummary - New showGroupSummary value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getShowGroupSummary

      public 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.
      Returns:
      Current showGroupSummary value. Default value is null
    • setShowHilitesInGroupSummary

      public ListGridField setShowHilitesInGroupSummary(Boolean showHilitesInGroupSummary)
      Determines whether hiliting for this field is shown in a group summary. Set to false to prevent this field from showing hilite in a group summary.

      All hilites in group summary rows can be controlled with the ListGrid.showHilitesInGroupSummary property.

      Parameters:
      showHilitesInGroupSummary - New showHilitesInGroupSummary value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getShowHilitesInGroupSummary

      public Boolean getShowHilitesInGroupSummary()
      Determines whether hiliting for this field is shown in a group summary. Set to false to prevent this field from showing hilite in a group summary.

      All hilites in group summary rows can be controlled with the ListGrid.showHilitesInGroupSummary property.

      Returns:
      Current showHilitesInGroupSummary value. Default value is null
    • setShowHover

      public ListGridField setShowHover(Boolean showHover)
      Whether to show hovers for this field. The default hover will be the contents of the cell the user is hovering over, and can be customized via 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.

      Parameters:
      showHover - New showHover value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getShowHover

      public Boolean getShowHover()
      Whether to show hovers for this field. The default hover will be the contents of the cell the user is hovering over, and can be customized via 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.

      Returns:
      Current showHover value. Default value is null
      See Also:
    • setShowHoverComponents

      public ListGridField setShowHoverComponents(Boolean showHoverComponents)
      When set to true and showHover is also true for the field, shows a widget hovering at the mouse point.

      A number of builtin modes are provided - see HoverMode.

      Also supported at the ListGrid-level.

      Parameters:
      showHoverComponents - New showHoverComponents value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getShowHoverComponents

      public Boolean getShowHoverComponents()
      When set to true and showHover is also true for the field, shows a widget hovering at the mouse point.

      A number of builtin modes are provided - see HoverMode.

      Also supported at the ListGrid-level.

      Returns:
      Current showHoverComponents value. Default value is null
    • setShowRollOverIcon

      public ListGridField setShowRollOverIcon(Boolean showRollOverIcon)
      If using an icon for this button, whether to switch the icon image on mouse rollover.
      Parameters:
      showRollOverIcon - New showRollOverIcon value. Default value is false
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getShowRollOverIcon

      public Boolean getShowRollOverIcon()
      If using an icon for this button, whether to switch the icon image on mouse rollover.
      Returns:
      Current showRollOverIcon value. Default value is false
      See Also:
    • setShowSelectedIcon

      public ListGridField setShowSelectedIcon(Boolean showSelectedIcon)
      If using an icon for this button, whether to switch the icon image when the button becomes selected.
      Parameters:
      showSelectedIcon - New showSelectedIcon value. Default value is false
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getShowSelectedIcon

      public Boolean getShowSelectedIcon()
      If using an icon for this button, whether to switch the icon image when the button becomes selected.
      Returns:
      Current showSelectedIcon value. Default value is false
      See Also:
    • setShowTitle

      public ListGridField setShowTitle(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.
      Parameters:
      showTitle - New showTitle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getShowTitle

      public 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.
      Returns:
      Current showTitle value. Default value is null
    • setShowValueIconOnly

      public ListGridField 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.

      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.

      Parameters:
      showValueIconOnly - New showValueIconOnly value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getShowValueIconOnly

      public 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.

      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.

      Returns:
      Current showValueIconOnly value. Default value is null
      See Also:
    • setSkipLineBreaks

      public ListGridField setSkipLineBreaks(Boolean skipLineBreaks)
      By default, when escaping HTML, we convert line breaks (\r\n, \r, and \n) to HTML <br&gt 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.

      Parameters:
      skipLineBreaks - New skipLineBreaks value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getSkipLineBreaks

      public Boolean getSkipLineBreaks()
      By default, when escaping HTML, we convert line breaks (\r\n, \r, and \n) to HTML <br&gt 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.

      Returns:
      Current skipLineBreaks value. Default value is null
      See Also:
    • setSortByDisplayField

      public ListGridField setSortByDisplayField(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.
      Parameters:
      sortByDisplayField - New sortByDisplayField value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getSortByDisplayField

      public 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.
      Returns:
      Current sortByDisplayField value. Default value is null
    • setSortByMappedValue

      public ListGridField setSortByMappedValue(Boolean sortByMappedValue)
      If 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.
      Parameters:
      sortByMappedValue - New sortByMappedValue value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getSortByMappedValue

      public Boolean getSortByMappedValue()
      If 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.
      Returns:
      Current sortByMappedValue value. Default value is null
    • setSortDirection

      public ListGridField setSortDirection(SortDirection sortDirection)
      Specifies the default sorting direction for this column. If specified on the 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.

      Parameters:
      sortDirection - New sortDirection value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getSortDirection

      public SortDirection getSortDirection()
      Specifies the default sorting direction for this column. If specified on the 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.

      Returns:
      Current sortDirection value. Default value is null
      See Also:
    • setSpannedHeaderBaseStyle

      public ListGridField setSpannedHeaderBaseStyle(String spannedHeaderBaseStyle)
      Custom base style to apply to this field's header button instead of ListGrid.spannedHeaderBaseStyle when the grid is showing header spans.
      Parameters:
      spannedHeaderBaseStyle - New spannedHeaderBaseStyle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getSpannedHeaderBaseStyle

      public String getSpannedHeaderBaseStyle()
      Custom base style to apply to this field's header button instead of ListGrid.spannedHeaderBaseStyle when the grid is showing header spans.
      Returns:
      Current spannedHeaderBaseStyle value. Default value is null
      See Also:
    • setSummaryTitle

      public ListGridField setSummaryTitle(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.
      Optional long summary title for this field, provided in addition to 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

      Parameters:
      summaryTitle - New summaryTitle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getSummaryTitle

      public 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.
      Optional long summary title for this field, provided in addition to 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.

      Returns:
      Optional string method to return a long summary title for this field, if a dynamic summary title is required for this field. Default value is null
      See Also:
    • setSummaryValue

      public ListGridField setSummaryValue(String summaryValue)
      The value to display for a ListGridField when it appears in the 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).
      Parameters:
      summaryValue - New summaryValue value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getSummaryValue

      public String getSummaryValue()
      The value to display for a ListGridField when it appears in the 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).
      Returns:
      Current summaryValue value. Default value is null
      See Also:
    • setSummaryValueTitle

      public ListGridField setSummaryValueTitle(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. If unspecified the title will show up in the summary.
      Parameters:
      summaryValueTitle - New summaryValueTitle value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getSummaryValueTitle

      public 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. If unspecified the title will show up in the summary.
      Returns:
      Current summaryValueTitle value. Default value is null
    • setSuppressValueIcon

      public ListGridField 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.

      Note this property may also be set to false to avoid showing the standard ListGrid.booleanTrueImage and ListGrid.booleanFalseImage for fields of type boolean.

      Parameters:
      suppressValueIcon - New suppressValueIcon value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getSuppressValueIcon

      public 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.

      Note this property may also be set to false to avoid showing the standard ListGrid.booleanTrueImage and ListGrid.booleanFalseImage for fields of type boolean.

      Returns:
      Current suppressValueIcon value. Default value is null
      See Also:
    • setTarget

      public ListGridField setTarget(String target)
      By default, clicking a link rendered by this item opens it in a new browser window. You can alter this behavior by setting this property. The value of this property will be passed as the value to the 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.

      Parameters:
      target - New target value. Default value is "_blank"
      Returns:
      ListGridField instance, for chaining setter calls
    • getTarget

      public String getTarget()
      By default, clicking a link rendered by this item opens it in a new browser window. You can alter this behavior by setting this property. The value of this property will be passed as the value to the 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.

      Returns:
      Current target value. Default value is "_blank"
    • setTimeFormatter

      public ListGridField setTimeFormatter(TimeDisplayFormat timeFormatter)
      Time-format to apply to date type values within this field. If specified, any dates displayed in this field will be formatted as times using the appropriate format. This is most commonly only applied to fields specified as type "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

      Parameters:
      timeFormatter - New timeFormatter value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getTimeFormatter

      public TimeDisplayFormat getTimeFormatter()
      Time-format to apply to date type values within this field. If specified, any dates displayed in this field will be formatted as times using the appropriate format. This is most commonly only applied to fields specified as type "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.

      Returns:
      Current timeFormatter value. Default value is null
      See Also:
    • setTitle

      public ListGridField setTitle(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.

      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.

      Overrides:
      setTitle in class Field
      Parameters:
      title - name of the field, or index. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getTitle

      public 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.

      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.

      Overrides:
      getTitle in class Field
      Returns:
      Current title value. Default value is null
      See Also:
    • setType

      public ListGridField setType(ListGridFieldType type)
      ListGrids picks a renderer for the view and edit mode of a field based on this attribute. See ListGridFieldType for a summary of how types are rendered.
      Parameters:
      type - New type value. Default value is "text"
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getType

      public ListGridFieldType getType()
      ListGrids picks a renderer for the view and edit mode of a field based on this attribute. See ListGridFieldType for a summary of how types are rendered.
      Returns:
      Current type value. Default value is "text"
      See Also:
    • setUserFormula

      public ListGridField setUserFormula(UserFormula userFormula)
      Formula definition for this field.

      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:

      • the cached record values of the formula for this field
      • the common formula variable => field name map maintained by the component for calls to the FormulaBuilder
      • any generated field that references the field's calculated values
      Parameters:
      userFormula - field owning the formula. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getUserFormula

      public UserFormula getUserFormula()
      Formula definition for this field.

      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.

      Returns:
      Current userFormula value. Default value is null
    • setUserSummary

      public ListGridField setUserSummary(UserSummary userSummary)
      Summary definition for this field.

      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:

      • the cached record values of the summary for this field
      • any generated field that references the field's computed summaries
      Parameters:
      userSummary - field owning the summary. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getUserSummary

      public UserSummary getUserSummary()
      Summary definition for this field.

      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.

      Returns:
      Current userSummary value. Default value is null
    • setValidateOnChange

      public ListGridField setValidateOnChange(Boolean validateOnChange)
      If set to true, any validators for this field will be run whenever the value of the field is changed.

      Analogous to the FormItem.validateOnChange property.

      Parameters:
      validateOnChange - New validateOnChange value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getValidateOnChange

      public Boolean getValidateOnChange()
      If set to true, any validators for this field will be run whenever the value of the field is changed.

      Analogous to the FormItem.validateOnChange property.

      Returns:
      Current validateOnChange value. Default value is null
      See Also:
    • setValidators

      public ListGridField setValidators(Validator... validators)
      Array of Validator objects for this field. When the user edits cells in this field, these validators will be applied to the edited value.
      Note: for databound listGrids, this property may be specified on the DataSourceField, enabling both client and server side validation.
      Parameters:
      validators - New validators value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • setValign

      public ListGridField setValign(VerticalAlignment valign)
      Specifies vertical alignment in the column header for this field: "top", "center", or "bottom". If unset, default behavior is derived from ListGrid.headerTitleVAlign.
      Parameters:
      valign - New valign value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getValign

      public VerticalAlignment getValign()
      Specifies vertical alignment in the column header for this field: "top", "center", or "bottom". If unset, default behavior is derived from ListGrid.headerTitleVAlign.
      Returns:
      Current valign value. Default value is null
      See Also:
    • setValueField

      public ListGridField 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). Note that if this field is editable this will also be applied to this field's editors.
      Parameters:
      valueField - New valueField value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • getValueField

      public String getValueField()
      Specifies the 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.
      Returns:
      Current valueField value. Default value is null
    • setValueIconHeight

      public ListGridField setValueIconHeight(Integer valueIconHeight)
      Height for value icons for this listGrid field. Overrides ListGrid.valueIconSize, ListGrid.valueIconHeight, and valueIconSize.
      Parameters:
      valueIconHeight - New valueIconHeight value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getValueIconHeight

      public Integer getValueIconHeight()
      Height for value icons for this listGrid field. Overrides ListGrid.valueIconSize, ListGrid.valueIconHeight, and valueIconSize.
      Returns:
      Current valueIconHeight value. Default value is null
      See Also:
    • setValueIconLeftPadding

      public ListGridField setValueIconLeftPadding(Integer valueIconLeftPadding)
      How much padding should there be on the left of valueIcons for this field Overrides ListGrid.valueIconLeftPadding
      Parameters:
      valueIconLeftPadding - New valueIconLeftPadding value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getValueIconLeftPadding

      public Integer getValueIconLeftPadding()
      How much padding should there be on the left of valueIcons for this field Overrides ListGrid.valueIconLeftPadding
      Returns:
      Current valueIconLeftPadding value. Default value is null
      See Also:
    • setValueIconOrientation

      public ListGridField 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. Has no effect if showValueIconOnly is true
      Parameters:
      valueIconOrientation - New valueIconOrientation value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getValueIconOrientation

      public 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. Has no effect if showValueIconOnly is true
      Returns:
      Current valueIconOrientation value. Default value is null
      See Also:
    • setValueIconRightPadding

      public ListGridField setValueIconRightPadding(Integer valueIconRightPadding)
      How much padding should there be on the right of valueIcons for this field Overrides ListGrid.valueIconRightPadding
      Parameters:
      valueIconRightPadding - New valueIconRightPadding value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getValueIconRightPadding

      public Integer getValueIconRightPadding()
      How much padding should there be on the right of valueIcons for this field Overrides ListGrid.valueIconRightPadding
      Returns:
      Current valueIconRightPadding value. Default value is null
      See Also:
    • setValueIcons

      public ListGridField setValueIcons(Map<String,String> valueIcons)
      This property is a mapping from data values for this field to 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.

      Parameters:
      valueIcons - New valueIcons value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • setValueIconSize

      public ListGridField setValueIconSize(Integer valueIconSize)
      Default width and height of value icons in this field. Takes precedence over valueIconWidth, valueIconHeight and valueIconSize specified at the ListGrid level. Can be overridden via valueIconWidth and {ListGridField.valueIconHeight}
      Parameters:
      valueIconSize - New valueIconSize value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getValueIconSize

      public Integer getValueIconSize()
      Default width and height of value icons in this field. Takes precedence over valueIconWidth, valueIconHeight and valueIconSize specified at the ListGrid level. Can be overridden via valueIconWidth and {ListGridField.valueIconHeight}
      Returns:
      Current valueIconSize value. Default value is null
      See Also:
    • setValueIconWidth

      public ListGridField setValueIconWidth(Integer valueIconWidth)
      Width for value icons for this listGrid field. Overrides ListGrid.valueIconSize, ListGrid.valueIconWidth, and valueIconSize.
      Parameters:
      valueIconWidth - New valueIconWidth value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getValueIconWidth

      public Integer getValueIconWidth()
      Width for value icons for this listGrid field. Overrides ListGrid.valueIconSize, ListGrid.valueIconWidth, and valueIconSize.
      Returns:
      Current valueIconWidth value. Default value is null
      See Also:
    • setValueMap

      public ListGridField 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 ListGrid.canEdit, canEdit), editors displayed for this field will pick up their valueMap either from this value or from editorValueMap.

      See also DataSourceField.valueMap.

      Overrides:
      setValueMap in class Field
      Parameters:
      valueMap - New valueMap value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • setValueMap

      public ListGridField 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 ListGrid.canEdit, canEdit), editors displayed for this field will pick up their valueMap either from this value or from editorValueMap.

      See also DataSourceField.valueMap.

      Parameters:
      valueMap - New valueMap value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • setVisibleWhen

      public ListGridField setVisibleWhen(Criteria visibleWhen)
      Criteria to be evaluated to determine whether this field should be visible.

      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.

      Parameters:
      visibleWhen - New visibleWhen value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getVisibleWhen

      public Criteria getVisibleWhen()
      Criteria to be evaluated to determine whether this field should be visible.

      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.

      Returns:
      Current visibleWhen value. Default value is null
      See Also:
    • setWrap

      public ListGridField setWrap(Boolean wrap)
      Should the field title wrap if there is not enough space horizontally to accommodate it. If unset, default behavior is derived from ListGrid.wrapHeaderTitles. (This is a soft-wrap - if set the title will wrap at word boundaries.)

      Notes:

      • If autofitting is active, width and minWidth can be set to control the minimum field width - see the links for details.
      • This feature is incompatible with ListGrid.clipHeaderTitles, and clipHeaderTitles will be disabled for wrapping fields.
      Parameters:
      wrap - New wrap value. Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
      See Also:
    • getWrap

      public Boolean getWrap()
      Should the field title wrap if there is not enough space horizontally to accommodate it. If unset, default behavior is derived from ListGrid.wrapHeaderTitles. (This is a soft-wrap - if set the title will wrap at word boundaries.)

      Notes:

      • If autofitting is active, width and minWidth can be set to control the minimum field width - see the links for details.
      • This feature is incompatible with ListGrid.clipHeaderTitles, and clipHeaderTitles will be disabled for wrapping fields.
      Returns:
      Current wrap value. Default value is null
      See Also:
    • addEditorEnterHandler

      public HandlerRegistration addEditorEnterHandler(EditorEnterHandler handler)
      Add a editorEnter 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().

      Specified by:
      addEditorEnterHandler in interface HasEditorEnterHandlers
      Parameters:
      handler - the editorEnter handler
      Returns:
      HandlerRegistration used to remove this handler
    • addEditorExitHandler

      public HandlerRegistration addEditorExitHandler(EditorExitHandler handler)
      Add a editorExit 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)

      Specified by:
      addEditorExitHandler in interface HasEditorExitHandlers
      Parameters:
      handler - the editorExit handler
      Returns:
      HandlerRegistration used to remove this handler
    • formatCellValue

      public String formatCellValue(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.
      Return the HTML to display in cells of this field.

      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.

      Parameters:
      value - raw value for the cell, from the record for the row
      record - 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 cell
      colNum - column number for the cell.
      grid - the ListGrid displaying the cell
      Returns:
      HTML to display in the cell. See HTMLString
      See Also:
    • getAutoFreezePosition

      public 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.

      Some automatically generated fields, such as rowNumberField, expansionField and checkboxField, provide default implementations of this method.

      Returns:
      the index at which this autoFreeze field should appear in the frozen body
      See Also:
    • addRecordClickHandler

      public HandlerRegistration addRecordClickHandler(RecordClickHandler handler)
      Add a recordClick 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.

      Specified by:
      addRecordClickHandler in interface HasRecordClickHandlers
      Parameters:
      handler - the recordClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addValueIconClickHandler

      public HandlerRegistration addValueIconClickHandler(ValueIconClickHandler handler)
      Add a valueIconClick 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.

      Specified by:
      addValueIconClickHandler in interface HasValueIconClickHandlers
      Parameters:
      handler - the valueIconClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • setDefaultFilterValue

      public 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.
      Parameters:
      defaultFilterValue - the default filter value
    • setDefaultFilterValue

      public 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.
      Parameters:
      defaultFilterValue - the default filter value
    • setDefaultFilterValue

      public 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.
      Parameters:
      defaultFilterValue - the default filter value
    • setDefaultFilterValue

      public 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.
      Parameters:
      defaultFilterValue - the default filter value
    • setDefaultFilterValue

      public 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.
      Parameters:
      defaultFilterValue - the default filter value
    • setCellFormatter

      public void setCellFormatter(CellFormatter formatter)
      Sets a formatter that returns the HTML to display in each cell of the field, given the raw cell value. Overrides ListGrid.setCellFormatter(com.smartgwt.client.widgets.grid.CellFormatter).
      Parameters:
      formatter - formatter to apply to the cell values
      See Also:
    • setInactiveCellFormatter

      public void setInactiveCellFormatter(CellFormatter formatter)
      Field-level formatter for inactive content.

      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.

      Parameters:
      formatter - formatter to apply to inactive cell values
      See Also:
    • setEditValueFormatter

      public void setEditValueFormatter(CellEditValueFormatter formatter)
      Return the value to display in cells of this field which are being edited.

      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.

      Parameters:
      formatter - the CellEditValueFormatter
      See Also:
    • setEditValueParser

      public 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.
      Parameters:
      parser - the CellEditValueParser
      See Also:
    • setSortNormalizer

      public void setSortNormalizer(SortNormalizer normalizer)
      Optional function to return the value that should be used when sorting this field.

      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.

      Parameters:
      normalizer - the sort normalizer
    • setHoverCustomizer

      public void setHoverCustomizer(HoverCustomizer hoverCustomizer)
      * HTML to be shown in hovers over cells in the column described by this field.
      Parameters:
      hoverCustomizer - the hover customizer
    • setGroupSummaryCustomizer

      public void setGroupSummaryCustomizer(GroupSummaryCustomizer groupSummaryCustomizer)
      Parameters:
      groupSummaryCustomizer - the group summary customizer
    • setGridSummaryCustomizer

      public void setGridSummaryCustomizer(GridSummaryCustomizer gridSummaryCustomizer)
      Parameters:
      gridSummaryCustomizer - the grid summary customizer
    • setAlign

      public void setAlign(Alignment align)
      Horizontal alignment for field's column header: "left", "right" or "center". Applied to the column header title and cells by default. A separate alignment for cells can be specified via cellAlign.

      If null, default alignment depends on the field's declared type - generally "left" except for numbers which are "right" - and if rotateTitle has been specified, the default is always "center".

      Note that if this field is editable, the alignment of cells in the body will also be reflected in any editors for the field.
      Parameters:
      align - align Default value is null
    • getAlign

      public Alignment getAlign()
      Horizontal alignment for field's column header: "left", "right" or "center". Applied to the column header title and cells by default. A separate alignment for cells can be specified via cellAlign.
      If null, default alignment depends on the field's declared type - generally "left" except for numbers which are "right" - and if rotateTitle has been specified, the default is always "center".

      Note that if this field is editable, the alignment of cells in the body will also be reflected in any editors for the field.
      Returns:
      String
    • setWidth

      public 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 "*".

      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.

      Parameters:
      width - width Default value is "*"
    • setWidth

      public void setWidth(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 "*".

      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.

      Parameters:
      width - width Default value is "*"
    • getWidth

      public 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 "*".

      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.

      Returns:
      the field width as a String
    • setImgDir

      public void setImgDir(String imgDir)
      Deprecated.
      Parameters:
      imgDir - the imageURLPrefix
    • setDefaultValue

      public void setDefaultValue(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.
      See Also:
    • setDefaultValue

      public void setDefaultValue(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.
      See Also:
    • setDefaultValue

      public void setDefaultValue(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.
      See Also:
    • setDefaultValue

      public void setDefaultValue(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.
      See Also:
    • setDefaultValue

      public void setDefaultValue(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.
      See Also:
    • setDefaultValue

      public void setDefaultValue(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.
      See Also:
    • setEditorProperties

      public void setEditorProperties(FormItem editorProperties)
      Set the default 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).

      Parameters:
      editorProperties - the editor properties
      See Also:
    • setEditorType

      public void setEditorType(FormItem editorType)
      Parameters:
      editorType - FormItem with default properties to be applied when editing
    • setEditorType

      public void setEditorType(String editorType)
      The 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(com.smartgwt.client.widgets.form.fields.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 SetFilterItem.

      Parameters:
      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).
      Throws:
      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.
    • setEditorType

      public void setEditorType(Class<? extends FormItem> editorType)
      The 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(com.smartgwt.client.widgets.form.fields.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 SetFilterItem.

      Parameters:
      editorType - a FormItem subclass, which must have been registered with the reflection mechanism (except for built-in framework classes).
      Throws:
      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.
    • setFilterEditorType

      public void setFilterEditorType(FormItem filterEditorType)
      Parameters:
      filterEditorType - FormItem with default properties to be applied when editing in the filter row
    • setFilterEditorType

      public void setFilterEditorType(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. (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(com.smartgwt.client.widgets.form.fields.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 SetFilterItem.

      Parameters:
      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).
      Throws:
      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.
    • setFilterEditorType

      public void setFilterEditorType(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. (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(com.smartgwt.client.widgets.form.fields.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 SetFilterItem.

      Parameters:
      editorType - a FormItem subclass, which must have been registered with the reflection mechanism (except for built-in framework classes).
      Throws:
      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.
    • setFilterEditorProperties

      public 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. 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).

      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).

      Parameters:
      filterEditorProperties - the filter editor properties
      See Also:
    • setOptionDataSource

      public 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.

      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:

      • do not set listGridField.optionDataSource
      • declare two fields in the DataSource, eg "accountId" and "accountName".
      • Set the displayField attribute on the data field to the name of the display field.
      • When fetching records for display in a grid, have your server send back values for both fields, but show only the data field ("accountId") in the grid.
      In this case the cells in the accountId field will show the record value from the accountName field. This approach means the valueMap will never be loaded in its entirety, instead, each loaded record contains the valueMapping for that one record, as a pair of fields within the record.

      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:

      • When using the above approach, it is key that the server return both the underlying stored value and the display value, as suggested above. This approach allows the PickList.optionDataSource property to be used to provide paged valueMaps during inline editing and 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.
      • Setting 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.
      • If a displayField is specified, with no associated optionDataSource, and the field is editable, updating the edit value for the field may not automatically update the displayField edit value, meaning the user may not realize the edit value has been modified. If the new value came from the user editing the field, and the edit item has a valueMap or optionDataSource specified, the display value is picked up automatically and stored out on the displayField for the record. However if the value was set programmatically, the developer should also set the edit value for the display field to ensure the displayed value reflects the new edit value. Note that when this occurs, a warning will be logged which can be disabled via ListGrid.warnOnUnmappedValueFieldChange.
      • For very advanced usage a developer can use 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 information
      Parameters:
      optionDataSource - optionDataSource Default value is null
      Returns:
      ListGridField instance, for chaining setter calls
    • setShowIfCondition

      public void setShowIfCondition(ListGridFieldIfFunction showIf)
      A function, if provided, is evaluated to conditionally determine whether this field should be displayed. Evaluated on initial draw, then reevaluated on explicit calls to listGrid.refreshFields() or listGrid.setFields().

      Use 'showIf:"false"' to set a ListGrid field to initially hidden.

      Note that explicit calls to grid.showField() or hideField() will wipe out the showIf expression, as will the end user showing and hiding columns via the header contextMenu.

      Also note that fields marked as detail:true will be hidden by default even if ListGrid.showDetailFields is true. To show detail fields inherited from a DataSource, include an explicit field definition for the field and set this property to return true.

      Parameters:
      showIf - showIf criteria
    • setOptionFilterContext

      public void setOptionFilterContext(DSRequest optionFilterContext)
      If this field has an optionDataSource specified and &#010 autoFetchDisplayMap is set, this attribute&#010 provides a way to customize the dataSource request issued to fetch the display map from&#010 the option dataSource. This provides, among other capabilities, a way to trigger the server to return summary records.
      Parameters:
      optionFilterContext - optionFilterContext Default value is null
    • getOptionFilterContext

      public DSRequest getOptionFilterContext()
      If this field has an optionDataSource specified and &#010 autoFetchDisplayMap is set, this attribute&#010 provides a way to customize the dataSource request issued to fetch the display map from&#010 the option dataSource. This provides, among other capabilities, a way to trigger the server to return summary records.
      Returns:
      DSRequest Properties
    • addCellSavedHandler

      public HandlerRegistration addCellSavedHandler(CellSavedHandler handler)
      Add a cellSaved handler.

      Callback fired when field changes value as the result of a cell edit. Fired only on&#010 successful save of edit, when the new value doesn't match the value before editing.
      &#010

      &#010 Same signature as com.smartgwt.client.widgets.grid.ListGrid#addCellChangedHandler, but defined on a per-field basis.&#010&#010

      Specified by:
      addCellSavedHandler in interface HasCellSavedHandlers
      Parameters:
      handler - the cellSaved handler
      Returns:
      HandlerRegistration used to remove this handler
    • addChangeHandler

      public HandlerRegistration addChangeHandler(ChangeHandler handler)
      Add a change 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.

      Specified by:
      addChangeHandler in interface HasChangeHandlers
      Parameters:
      handler - the change handler
      Returns:
      HandlerRegistration used to remove this handler
    • addChangedHandler

      public HandlerRegistration addChangedHandler(ChangedHandler handler)
      Add a changed 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.

      Specified by:
      addChangedHandler in interface HasChangedHandlers
      Parameters:
      handler - the changed handler
      Returns:
      HandlerRegistration used to remove this handler
    • setGroupTitleRenderer

      public 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.

      Default title is the groupValue itself.

      Parameters:
      groupTitleRenderer - the group title renderer
    • setGroupValueFunction

      public void setGroupValueFunction(GroupValueFunction groupValueFunction)
      Function that returns the value which records should be grouped by.

      All records that for which getGroupValue() returns the same value appear in the same group. Default is the result of ListGrid.getCellValue().

      While any type of value may be returned, avoiding the use of string values may result in improved performance. In this case, GroupTitleRenderer.getGroupTitle(Object, GroupNode, ListGridField, String, ListGrid) may be implemented to map a numeric group value into a legible string.

      Parameters:
      groupValueFunction - the group value function
    • setEditorValueMapFunction

      public 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.
      Parameters:
      editorValueMapFunction - the editor value map function
    • setHeaderButtonProperties

      public void setHeaderButtonProperties(Canvas buttonProperties)
      Set the properties of the header button used for this field. The buttonProperties parameter should be the same class as the headerButtonConstructor for the ListGrid (most commonly Button, ImgButton or StretchImgButton, and typically set up in the load_skin.js file for the loaded theme).
      Parameters:
      buttonProperties - the header button properties.
    • setSummaryFunction

      public 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.

      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.

      Parameters:
      summaryFunction - summaryFunction
    • setSummaryFunction

      public void setSummaryFunction(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.

      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.

      Parameters:
      summaryFunction - summaryFunction
    • setSummaryFunction

      public 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.

      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.

      Parameters:
      summaryFunction - summaryFunction
    • addSummaryFunction

      public 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. 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).

      Parameters:
      summaryFunction -
    • addSummaryFunction

      public 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. 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).

      Parameters:
      summaryFunction -
    • setRecordSummaryFunction

      public void setRecordSummaryFunction(RecordSummaryFunctionType recordSummaryFunction)
      Only applies to fields of type "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.

      Parameters:
      recordSummaryFunction - recordSummaryFunction Default value is null
    • setRecordSummaryFunction

      public void setRecordSummaryFunction(RecordSummaryFunction recordSummaryFunction)
      Only applies to fields of type "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.

      Parameters:
      recordSummaryFunction - recordSummaryFunction Default value is null
    • getRecordSummaryFunction

      public RecordSummaryFunctionType getRecordSummaryFunction()
      Only applies to fields of type "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.

      Returns:
      RecordSummaryFunction
    • getListGrid

      public ListGrid getListGrid()
      Return the live ListGrid instance to which this ListGridField is assigned. May return null, if not yet assigned to a grid, or if the live grid instance has not yet been created, or has already been destroyed.
      Returns:
      ListGrid instance
    • setType

      public ListGridField setType(SimpleType type)
      Set the type directly to a defined SimpleType.
      Parameters:
      type - the SimpleType
    • getOperator

      public 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.

      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.

      Returns:
      Current operator value. Default value is null
      See Also: