new (require("nmodule/webEditors/rc/wb/mgr/model/columns/PropertyMgrColumn"))()
API Status: Development
MgrColumn subclass that allows individual property values to be edited
on a component.
The column name will correspond directly to the slot name to modify.
Extends:
Methods
-
buildCell(row, dom)
-
Shows a display string of the desired property value of the row's
loaded Complex.Parameters:
Name Type Description rowmodule:nmodule/webEditors/rc/wb/table/model/Row domJQuery Returns:
resolves when the cell has been built
- Type
- Promise
-
commit(value, row [, params])
-
Sets/adds the property value on the row's
Componentsubject.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 backingComponent- 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()
-
If a
typeparam was given, then return an icon for the given slot on
that type. Otherwise, return null.Returns:
- Type
- String
-
getConfigFor(rows)
-
If editing only one row, then the facets used to configure the field
editor will be taken from the component instance in that one row.If editing multiple rows, then the facets will be taken from the
appropriate frozen slot on the column's configured Type, if present.Parameters:
Name Type Description rowsArray.<module:nmodule/webEditors/rc/wb/table/model/Row> Returns:
config object for
fe.makeFor, possibly including
properties derived from slot facets- 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
-
getValueFor(row)
-
Get the value of the Property specified in the constructor from the row's
loaded Complex.If the Complex does not have that Property:
If a
getDefaultValueparam was passed into this column's constructor, the
row's Complex will be passed into the function and the result will be
returned.If a
typeparam was passed into this column's constructor, the value
of the property from the default instance of the given type will be
returned.Parameters:
Name Type Description rowmodule:nmodule/webEditors/rc/wb/table/model/Row Throws:
-
if the row does not actually have a Complex loaded, or
does not have the specified Property (and type is unknown) - Type
- Error
Returns:
the Property value read from the Complex
- Type
- baja.Value
-
-
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.
Returns:
promise to be resolved with the display name
- Type
- Promise