new (require("nmodule/webEditors/rc/wb/mgr/model/columns/PropertyPathMgrColumn"))(name, path, params)
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.
Extends:
Parameters:
| Name | Type | 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 |
Properties
|
Methods
-
buildCell(row, dom)
-
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 simpletoString()or similar, but could also do more sophisticated
things like build widgets.Parameters:
Name Type Description rowmodule:nmodule/webEditors/rc/wb/table/model/Row domJQuery - Inherited From:
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 inPromise.resolve()when appropriate.- Type
- Promise | *
-
commit(value, row [, params])
-
Sets/adds the property on the slot resolved from the path. This requires the previous slots
in the path to exist.Parameters:
Name Type Argument Description valuebaja.Value rowmodule:nmodule/webEditors/rc/wb/table/model/Row paramsObject <optional>
Properties
Name Type Argument Description batchbaja.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)
-
Called when the table is destroying the DOM element built for a cell in this column. This
gives aColumnimplementation 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 toPromise.resolve().Parameters:
Name Type Description rowmodule:nmodule/webEditors/rc/wb/table/model/Row domJQuery - Inherited From:
Returns:
- Type
- Promise | *
-
getColumnIcon()
-
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.Returns:
The URI for the icon for the target slot.
- Type
- String
-
getComplexFromPath(rows)
-
Get the complex this property is on.
Parameters:
Name Type Description rowsmodule:nmodule/webEditors/rc/wb/table/model/Row - Since:
-
- Niagara 4.8
Returns:
String
-
getConfigFor(rows)
-
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.Parameters:
Name Type Description rowsArray.<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()
-
Get the flags set on this column.
- Inherited From:
Returns:
- Type
- Number
-
getName()
-
Get the column name or
nullif none was given.- Inherited From:
Returns:
- Type
- String
-
getPropertyName()
-
Get the property name for this column.
- Since:
-
- Niagara 4.8
Returns:
String
-
getValueFor(row)
-
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.Parameters:
Name Type Description rowReturns:
- Type
- *
-
hasFlags(flags)
-
Return true if the column has all of the given flags.
Parameters:
Name Type Description flagsNumber flags to check for
- Inherited From:
Returns:
- Type
- Boolean
-
isEditable()
-
Return true if the column is editable.
- Inherited From:
Returns:
- Type
- Boolean
-
isExportable()
-
Return true if the column should show up in export operations, e.g. to CSV.
- Since:
-
- Niagara 4.8
- Inherited From:
Returns:
- Type
- Boolean
-
isHidable()
-
Return true if the column should available in the table's show/hide context menu.
Defaults to true.- Inherited From:
Returns:
- Type
- Boolean
-
isReadonly()
-
Return true if the column is readonly.
- Inherited From:
Returns:
- Type
- Boolean
-
isSortable()
-
Returns a boolean indicating whether the column should not be sortable via the table headings.
Defaults to true.- Inherited From:
Returns:
- Type
- Boolean
-
isUnseen()
-
Return true if the column is unseen.
- Inherited From:
Returns:
- Type
- Boolean
-
mixin(Ctor)
-
Applies
MgrColumnfunctionality to an arbitraryColumnsubclass.Parameters:
Name Type Description Ctorfunction -
setEditable(editable)
-
Set or unset the column's
EDITABLEflag. Emits aflagsChangedevent.Parameters:
Name Type Description editableboolean - Inherited From:
-
setExportable(exportable)
-
Set or unset whether the column should show up in export operations.
Parameters:
Name Type Description exportableboolean - Since:
-
- Niagara 4.8
- Inherited From:
-
setFlags(flags)
-
Set the column's flags.
Parameters:
Name Type Description flagsNumber - Inherited From:
Throws:
-
if a non-Number given
- Type
- Error
-
setHidable(hidable)
-
Set or unset whether the column should be allowed to be hidden or shown by the table's
show/hide context menu.Parameters:
Name Type Description hidableboolean - Inherited From:
-
setReadonly(readonly)
-
Set or unset the column's
READONLYflag. Emits aflagsChangedevent.Parameters:
Name Type Description readonlyboolean - Inherited From:
-
setSortable(sortable)
-
Set or unset whether the column should be allowed to be sorted by the table heading.
Parameters:
Name Type Description sortableboolean - Inherited From:
-
setUnseen(unseen)
-
Set or unset the column's
UNSEENflag. Emits aflagsChangedevent.Parameters:
Name Type Description unseenboolean - Inherited From:
-
toDisplayName()
-
Resolves the display name of the property slot at the end of the path.
Returns:
promise to be resolved with the display name for the final slot.
- Type
- Promise