module:nmodule/webEditors/rc/wb/mgr/model/columns/PropertyPathMgrColumn

module:nmodule/webEditors/rc/wb/mgr/model/columns/PropertyPathMgrColumn

new (require("nmodule/webEditors/rc/wb/mgr/model/columns/PropertyPathMgrColumn"))(name, path, paramsopt)

Description:
  • API Status: Development

    Column for a property several levels deep relative to the row's subject component.
    The constructor is passed a '/' delimited string specifying a property path.

Source:
Mixes In:
Extends:
Parameters:
Name Type Attributes Description
name String

Optional A name for this column (if not provided, will be calculated)

path String

A slot path, specified as a '/' delimited string

params Object <optional>
Properties
Name Type Attributes Description
type Type <optional>

The type declaring the target slot, used to
obtain the slot facets.

getDefaultValue function <optional>

since Niagara 4.14, if the Complex containing the last
property in the path does not actually contain that property, this function will be used to
retrieve a default value. When committing, that default value will be newly added. It will
receive the row's Complex instance to calculate a default value, if desired.

Extends

Methods

buildCell(row, dom) → {Promise|*}

Description:
  • Builds out the DOM element, typically a td, that represents the
    intersection of this column with a particular row. Often this will simply
    be a simple toString() or similar, but could also do more sophisticated
    things like build widgets.

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

promise to be resolved when the element's contents
have 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 | *

commit(value, row, paramsopt) → {Promise}

Description:
  • Sets/adds the property on the slot resolved from the path. This requires the previous slots
    in the path to exist.

Source:
Parameters:
Name Type Attributes Description
value baja.Value
row module:nmodule/webEditors/rc/wb/table/model/Row
params Object <optional>
Properties
Name Type Attributes Description
batch baja.comm.Batch <optional>
Returns:

promise to be resolved when the value has
been set on the slot resolved from the path.

Type
Promise

destroyCell(row, dom) → {Promise|*}

Description:
  • Called when the table is destroying the DOM element built for a cell in this column. This
    gives a Column implementation the chance to clean up any resources that might have been
    created during the earlier call to #buildCell, perhaps destroying a widget in the cell,
    for example. As with #buildCell, if this completes synchronously and doesn't return a
    Promise, the caller must wrap this in a call to Promise.resolve().

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

getColumnIcon() → {String}

Description:
  • Get the icon URI for the type of slot in the last component of the path.
    Returns null if the URI could not be obtained because the slot's declaring
    type was not specified in the path.

Source:
Overrides:
Returns:

The URI for the icon for the target slot.

Type
String

getComplexFromPath(row) → {baja.Complex}

Description:
  • Get the complex this property is on.

Source:
Since:
  • Niagara 4.8
Parameters:
Name Type Description
row module:nmodule/webEditors/rc/wb/table/model/Row
Returns:
Type
baja.Complex

getConfigFor(rows) → {Object}

Description:
  • If editing only one row, then the facets used to configure the field
    editor will be taken from the component instance containing the final
    property in the property path.

    If editing multiple rows, the facets will be derived from the specified
    Type and the frozen slot at the end of the property path. If these are
    not present, no facets will be used.

Source:
Parameters:
Name Type Description
rows Array.<module:nmodule/webEditors/rc/wb/table/model/Row>
Returns:

config object for fe.makeFor, which might include facets
if the path's last element had a type declared.

Type
Object

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

getPropertyName()

Description:
  • Get the property name for this column.

Source:
Since:
  • Niagara 4.8
Returns:

String

getValueFor(row) → {*}

Description:
  • Get the value of this column for the given row. This will follow the slot
    path to obtain the value of the slot descended from the row's subject.

Source:
Overrides:
Parameters:
Name Type Description
row
Returns:
Type
*

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

mixin(Ctor)

Description:
  • Applies MgrColumn functionality to an arbitrary Column subclass.

Source:
Mixes In:
Parameters:
Name Type Description
Ctor function

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 the display name of the property slot at the end of the path.

Source:
Overrides:
Returns:

promise to be resolved with the display name for the final slot.

Type
Promise

(static) getPropValueFromPath(comp, path) → {baja.Value}

Description:
  • Take a subject component (e.g. a control point) and an array of slot
    names representing a slot path (e.g leading to a property on its point ext),
    and resolve the descendants of the subject using the property names.

Source:
Since:
  • Niagara 4.13
Parameters:
Name Type Description
comp baja.Complex
path Array.<(baja.Slot|string)>
Returns:
Type
baja.Value