module:nmodule/webEditors/rc/wb/table/model/columns/IconColumn

module:nmodule/webEditors/rc/wb/table/model/columns/IconColumn

new (require("nmodule/webEditors/rc/wb/table/model/columns/IconColumn"))()

Description:
  • API Status: Development

    Column type used to show an icon in a specific column the table. This
    column type will not, by default, be available in the show/hide menu, and
    will not have the sorting functionality available. Users of this type can
    change this behavior by calling the #setSortable and #setHidable
    functions after construction.

Source:
Extends:

Extends

Methods

buildCell(row, dom) → {Promise}

Description:
  • Build the dom for the cell. This will build an IconEditor for each
    icon returned by the getValueFor function.

Source:
Overrides:
Parameters:
Name Type Description
row module:nmodule/webEditors/rc/wb/table/model/Row
dom JQuery
Returns:

A promise resolved with the img element added to the dom.

Type
Promise

destroyCell(row, dom) → {Promise}

Description:
  • Destroy the IconEditor that was created for this cell.

Source:
Overrides:
Parameters:
Name Type Description
row module:nmodule/webEditors/rc/wb/table/model/Row
dom JQuery
Returns:
Type
Promise

getColumnIcon() → {String}

Description:
  • Returns a URI for an icon representing this column. Returns null by
    default; override as needed in subclasses.

Source:
Inherited From:
Returns:

a URI for an icon to be shown for this column.

Type
String

getFlags() → {Number}

Description:
  • Get the flags set on this column.

Source:
Inherited From:
Returns:
Type
Number

getName() → {String}

Description:
  • Get the column name or null if none was given.

Source:
Inherited From:
Returns:
Type
String

getValueFor(row) → {baja.Icon|Array.<baja.Icon>}

Description:
  • Gets the icon URI for the given row. By default, this will delegate to
    the Row's getIcon() function. This function can be overridden to allow
    the source of the icon to be more flexible. This method may return a single
    icon, or an array of icons.

Source:
Overrides:
Parameters:
Name Type Description
row module:nmodule/webEditors/rc/wb/table/model/Row

A table row

Returns:

the icon(s) for the row, or null if the row does not
specify any.

Type
baja.Icon | Array.<baja.Icon>

hasFlags(flags) → {Boolean}

Description:
  • Return true if the column has all of the given flags.

Source:
Inherited From:
Parameters:
Name Type Description
flags Number

flags to check for

Returns:
Type
Boolean

isEditable() → {Boolean}

Description:
  • Return true if the column is editable.

Source:
Inherited From:
Returns:
Type
Boolean

isExportable() → {Boolean}

Description:
  • Return true if the column should show up in export operations, e.g. to CSV.

Source:
Since:
  • Niagara 4.8
Inherited From:
Returns:
Type
Boolean

isHidable() → {Boolean}

Description:
  • Return true if the column should available in the table's show/hide context menu.
    Defaults to true.

Source:
Inherited From:
Returns:
Type
Boolean

isReadonly() → {Boolean}

Description:
  • Return true if the column is readonly.

Source:
Inherited From:
Returns:
Type
Boolean

isSortable() → {Boolean}

Description:
  • Returns a boolean indicating whether the column should not be sortable via the table headings.
    Defaults to true.

Source:
Inherited From:
Returns:
Type
Boolean

isUnseen() → {Boolean}

Description:
  • Return true if the column is unseen.

Source:
Inherited From:
Returns:
Type
Boolean

setEditable(editable)

Description:
  • Set or unset the column's EDITABLE flag. Emits a flagsChanged event.

Source:
Inherited From:
Parameters:
Name Type Description
editable boolean

setExportable(exportable)

Description:
  • Set or unset whether the column should show up in export operations.

Source:
Since:
  • Niagara 4.8
Inherited From:
Parameters:
Name Type Description
exportable boolean

setFlags(flags)

Description:
  • Set the column's flags.

Source:
Inherited From:
Parameters:
Name Type Description
flags Number
Throws:

if a non-Number given

Type
Error

setHidable(hidable)

Description:
  • Set or unset whether the column should be allowed to be hidden or shown by the table's
    show/hide context menu.

Source:
Inherited From:
Parameters:
Name Type Description
hidable boolean

setReadonly(readonly)

Description:
  • Set or unset the column's READONLY flag. Emits a flagsChanged event.

Source:
Inherited From:
Parameters:
Name Type Description
readonly boolean

setSortable(sortable)

Description:
  • Set or unset whether the column should be allowed to be sorted by the table heading.

Source:
Inherited From:
Parameters:
Name Type Description
sortable boolean

setUnseen(unseen)

Description:
  • Set or unset the column's UNSEEN flag. Emits a flagsChanged event.

Source:
Inherited From:
Parameters:
Name Type Description
unseen boolean

toDisplayName() → {Promise|*}

Description:
  • Resolves a display name for this column.

Source:
Inherited From:
Returns:

promise to be resolved when the element's display name
has been fully built. It's also acceptable for overrides of this function
to complete synchronously without returning a promise, so be sure to wrap
calls to this function in Promise.resolve() when appropriate.

Type
Promise | *