Component-Specific APIs
Good news, everyone!
We are currently writing more material for our Javascript API. All of the objects and functions you see below are part of Nintex Apps's public API, even if they aren't fully documented yet. Feel free to experiment while we write about them—and check back later for updates.
Along with the standard functions available to all components, several of Nintex Apps's delivered components have their own specific APIs or component programming interface (CPIs). These CPIs accomplish specific logic within a component, and they are available on all instances of the given skuid.component.Component .
Public CPIs are available in the cpi namespace of a component instance. To access a component instance, use one of the get methods available in the skuid.component namespace.
Get by ID
Relies on having set a Unique Id value for the given component:
skuid.component.getId('uniqueId')
// Alternatively, you could use this alias to accomplish the same thing
skuid.$C('uniqueId')
Get by index within available component type instances
Retrieves a list of all instances of the given component type, and then uses the index to select a specific instance in that array:
skuid.component.getByType('componentType')[0]
// For example, get the first Tab Set in the page:
skuid.component.getByType('skuid__tabSet')[0]
Important: Private CPIs within the _cpi namespace are not supported for public use.
Accordion
Component type/XML element name: skuid__accordion
closeAllSections()
Closes all open sections within the selected Accordion.
// Assumes component is accessible via `accordion`
accordion.cpi.closeAllSections()
openAllSections()
Opens all closed sections within the selected Accordion.
// Assumes component is accessible via `accordion`
accordion.cpi.openAllSections()
toggleSection(sectionId)
Toggles a given Accordion section to be open or closed. Works by checking if the given sectionId is open or closed, then updates the Accordion's state with the opposite value.
Arguments: |
---|
|
// Assumes component is accessible via `accordion`
accordion.cpi.toggleSection('sectionUniqueId')
List
closeAllDrawers()
Closes all drawers for all rows in the selected List.
// Assumes component is accessible via `list`
list.cpi.closeAllDrawers()
openAllDrawers()
Opens all drawers for all rows in the selected List.
// Assumes component is accessible via `list`
list.cpi.openAllDrawers()
Filter Set
closeAllSections()
(Only applies to Filter Sets with a Vertical with accordions layout) Closes all accordion sections in the selected Filter Set.
// Assumes component is accessible via `filterSet`
filterSet.cpi.closeAllSections();
openAllSections()
(Only applies to Filter Sets with a Vertical with accordions layout) Opens all accordion sections in the selected Filter Set.
// Assumes component is accessible via `filterSet`
filterSet.cpi.openAllSections();
Tab Set
Component type/XML element name: skuid__tabSet
selectTab(tabId)
Selects and activates the tab for a given unique ID.
Arguments: |
---|
|
// Assumes component is accessible via `tabSet`
tabSet.cpi.selectTab('tabUniqueId')
getSelectedTabId()
Getter for the currently selected tab
Returns: | Return type: |
---|---|
Unique ID of the tab that is current selected | String |
// Assumes component is accessible via `tabSet`
tabSet.cpi.getSelectedTabId()
findTabToActivate()
Called internally when the currently selected tab is unrendered, finds another rendered tab to activate.
Table
Component type/XML element name: skuid__table
closeAllDrawers()
Closes all drawers for all rows in the selected Table.
// Assumes component is accessible via `table`
table.cpi.closeAllDrawers()
openAllDrawers()
Opens all drawers for all rows in the selected Table.
// Assumes component is accessible via `table`
table.cpi.openAllDrawers()