Skip to main content

Tables


Tables

The table component is a highly configurable, feature rich and navigable data grid. It allows for presentation of data in many different ways, and it is often possible fulfil business requests, just by configuration. The table implements the common framework concept and uses Cytoscape.js#data eles data select keys to configure data into cells. Read Understanding the graph model to learn more about the high level concept.

{
"tables" : {
"example" : {
"datasets": ["rootNodesInitalLoadData"],
"columns": [
"title",
"owner",
"state",
"DEFAULT_SEPARATOR",
"related_docs"
],
"services": ["initialLoadService"],
"expand": {
"services": ["expandService"],
"datasets": ["expandData"]
}
}
}
}

Table properties

Prop NameDescriptionData TypeRequiredExample
columnsList of column names to display in the table. "DEFAULT_SEPARATOR" is a built in column that adds a small space in between columns.array stringyes["title", "name","DEFAULT_SEPARATOR" "state"]
contextMenuReference to a context menu definition.stringno"issueContextMenu"
datasetsReferences to datasets providing data for the table.array stringyes["issueData"]
deferredServicesServices loaded lazily after initial render.array stringno["lazyLoadDetails"]
dropHandlerReference to a drop handler for drag-and-drop functionality.stringno"dropHandler": "cr_table_drop_zone",
expandConfiguration for expandable rows or data.objectnoTable expand
nameName of the table (not used explicitly here).stringyes"IssueTable"
servicesReferences to services fetching data for the table.array stringno"services": ["fetchAllIssues"]
settingsTable-specific settings (e.g., drag behavior, column mapping).objectno{"multiDraggable": true}
toolbarsReference to a toolbar definition for interactivity.stringno"toolbars": "toolbar_issue_details"

Context menu

Right-clicking a table row shows a context menu. Define menus in the top-level contextMenus map and reference one by name from the table's contextMenu property. Each menu is an array of command-name references — commands themselves are defined in the top-level commands map (same pattern used by toolbars).

{
"tables": {
"productStructure": {
"datasets": ["contextNode"],
"columns": ["title", "owner", "state"],
"contextMenu": "openWithMenu"
}
},
"contextMenus": {
"openWithMenu": ["openWith", "promote", "demote"]
},
"commands": {
"openWith": {
"type": "openWith",
"isMenu": true,
"label": "Open With",
"openApps": {
"ENOLCMI_AP": { "label": "Item Lifecycle" },
"VPLMProjectManagement_AP": { "label": "Project Management" },
"ENO3DMultiCAD_AP": { "label": "3D Multi CAD" }
}
},
"promote": {
"label": "Promote",
"type": "genericService",
"settings": {
"relatedConfig": {
"services": ["promoteItemService"],
"responseMapping": { "expression": "results[0].maturityState", "attribute": "state" }
}
}
},
"demote": {
"label": "Demote",
"type": "genericService",
"settings": {
"relatedConfig": {
"services": ["demoteItemService"],
"responseMapping": { "expression": "results[0].maturityState", "attribute": "state" }
}
}
}
}
}

contextMenus map

FieldDescriptionTypeRequired
<menuName>An ordered list of command-name references. Items are rendered in declaration order.array of stringyes

Open With submenu

If one of the referenced commands has type: "openWith", it is rendered as a submenu (with a arrow) instead of a plain menu item. Hovering the entry reveals a submenu containing:

  1. The apps declared in the command's openApps, in declaration order.
  2. A More apps… entry (always appended) — opens the Compass side panel so the user can pick any other compatible app.

The submenu label comes from the openWith command's label. openApps is an object where each key is the app ID and the value is { "label": "..." }.

Any context menu entry can be turned into a nested submenu by setting isMenu: true and defining the submenu in the top-level menus array. Hovering the entry reveals the submenu with a arrow.

{
"contextMenus": {
"myMenu": [
"openWith",
{ "name": "stateActions", "isMenu": true }
]
},
"menus": [
{
"name": "stateActions",
"label": "State Actions",
"icon": "Workflow",
"commands": [
{ "name": "promote" },
{ "name": "demote" }
]
}
],
"commands": {
"promote": {
"label": "Promote",
"type": "genericService",
"settings": {
"relatedConfig": {
"services": ["promoteItemService"],
"responseMapping": [
{ "expression": "results[0].maturityState", "attribute": "state" }
]
}
}
},
"demote": {
"label": "Demote",
"type": "genericService",
"settings": {
"relatedConfig": {
"services": ["demoteItemService"],
"responseMapping": [
{ "expression": "results[0].maturityState", "attribute": "state" }
]
}
}
}
}
}

The context menu entry { "name": "stateActions", "isMenu": true } tells the renderer to look up stateActions in the menus array and render it as a submenu. The label and icon on the menu definition control what the parent entry looks like. Commands inside the submenu are looked up from the same top-level commands map.

FieldDescriptionTypeRequired
nameUnique identifier referenced by isMenu: true entries in contextMenus.stringyes
labelDisplay label for the submenu parent entry.stringyes
iconIcon name for the submenu parent entry (uses the platform icon set).stringno
commandsOrdered list of { "name": "<commandName>" } references into the top-level commands map.arrayyes

contextMenus entry fields (when using isMenu)

A context menu array item can be either a plain string (command reference) or an object:

FieldDescriptionTypeRequired
nameCommand or menu name to look up.stringyes
isMenuSet to true to render this entry as a submenu (resolved from the menus array). Omit or set to false for a plain command.booleanno
labelInline label override. When present, overrides the label from the resolved command/menu definition.stringno
iconInline icon override.stringno

Command types

Commands referenced from a context menu (or from inside a menus submenu) support the following type values:

typeDescription
openWithRenders an Open With submenu populated by the command's openApps.
genericServiceCalls a service on the selected row's object. services is an array of service names (strings). After the call completes, the row is refreshed according to settings.relatedConfig.refreshBehavior or responseMapping.

Commands without a type are treated as plain menu items — clicking invokes the configured onClick handler (if any).

refreshBehavior values

ValueDescription
refreshRowWithColumnServiceRe-fetches column-level services for the affected row only.
refreshRowRe-renders the row from the current graph data without a network call. Used automatically when responseMapping is defined.

responseMapping — update the row from the service response

When a genericService command returns data that should be immediately reflected in the table (for example a maturity state change), use responseMapping instead of refreshRowWithColumnService. The row updates instantly from the service response — no second network round-trip is needed.

"promote": {
"label": "Promote",
"type": "genericService",
"settings": {
"relatedConfig": {
"services": ["promoteItemService"],
"responseMapping": { "expression": "results[0].maturityState", "attribute": "state" }
}
}
}

responseMapping fields:

FieldDescriptionTypeRequired
expressionJSONata expression evaluated against the raw HTTP response body.stringyes
attributeGraph node attribute to write the result to. Must match the data field of the target column definition.stringyes

Finding the right attribute name — look at the column definition; the data field is the graph attribute:

"maturity_state": {
"label": "Maturity State",
"data": "state"
}

Here "data": "state" means the graph attribute is state, so "attribute": "state" is correct.

Multiple attributes — pass an array:

"responseMapping": [
{ "expression": "results[0].maturityState", "attribute": "state" },
{ "expression": "results[0].owner", "attribute": "owner" },
{ "expression": "results[0].modifiedDate", "attribute": "modified" }
]

JSONata expressions can transform values, not just extract them:

{ "expression": "$uppercase(results[0].maturityState)", "attribute": "stateLabel" }

When responseMapping is defined, refreshBehavior is ignored — the row re-renders directly from the updated graph data.

Open with app (column-level)

You may also set openWith, openApps or openApp on individual columns. openApp is a shortcut for a single-app left-click launch (no menu); openWith and openApps follow the same right-click rules as above.

Selecting an entry invokes the platform-provided handler (the same one the OOTB Compass uses), so the chosen app opens via TransientWidget with the row's object as context.

Settings properties

Prop NameDescriptionData TypeRequiredExample
colorMappedColumnReference to a column name that will have color mapping applied.stringno"priority"
multiDraggableAllows selecting multiple rows for drag-and-drop. The related column data is dragged together.booleannotrue
onTableRowDropEnableEnables a drop zone on top of the table for supporting drag-and-drop connections.booleannotrue
paginationEnableif set false then pagination disabled for table.booleanno"paginationEnable": false
paginationConfigControl selectable pagination sizes and the default usedobjectno"paginationConfig":{ "pagination": true, "itemsPerPage":[25,50,100], "defaultItemsPerPage": 25 }

Expand properties

Expand setting defines how rows or nodes are expanded in a structure table. For expanding node in some cases a service call is needed to fetch the data. Dataset is used to navigate to or from the node / row to get child nodes.

Prop NameDescriptionData TypeRequiredExample
datasetsDefines which datasets to call to navigate from row or node to get child nodes.array stringyes"expand": { "services": [ "physicalProductService" ], "datasets": [ "ups1Level" ] },
servicesIn case data is not yet present in data store (graph) services are used to load data on expandRow that is getting expanded as used as contextId while calling servicearray stringno"expand": { "services": [ "physicalProductService" ], "datasets": [ "ups1Level" ] },
expandRootNodesOnLoadSet to true for making default expand enable for level 1booleanno"expand": { "services": [ "physicalProductService" ], "datasets": [ "ups1Level" ], "expandRootNodesOnLoad": true }

Advanced table implementations

The table component allows advanced implementations such as custom rendering or data calculations using the plugin architecture. Learn more about plugins in Plugin code extensions.