Note: 
  • All code samples below refer to the skuid object.

  • In the v2 API, this object is not directly accessible when working within a browser console—or when referring to another Nintex Apps page runtime.

  • If you are experiencing issues, use the skuid.runtime API to target the appropriate page context.

skuid.componentType

skuid.componentType.get()

skuid.componentType.getAll()

Returns: Return type:
An array of strings describing all component types on a page by name of component type. Array

skuid.componentType.list()

Return type:
Array

skuid.componentType.map()

Return type:
Object

skuid.componentType.register(typeName,typeDefinition)

Registers a Component Type with the given typeName. A registered Component Type acts like a constructor or initializer for that component.

Arguments:
  • typeName ( string ) -- The name of the registered Component Type, e.g. "fieldeditor", "barchart", "calendar"
  • typeDefinition ( function ) --

    A function that "initializes" or "constructs" an instance of the component. The function has the following signature:

    function( element, xmlDefinition, component )

    • element (jQuery-wrapped DOM element): The root/parent element for the new Component. (This element may or may not be attached to the DOM.)
    • xmlDefinition (jQuery-wrapped JS XMLDoc):
    • component (skuid.component.Component): A Component instance for your typeDefinition function to interact with.

EXAMPLE:

Copy
skuid.componentType.register('pagebanner',function(element,xmlDefinition,component){
   element.html('Welcome: ' + xmlDefinition.attr('person'));

skuid.componentType.unregister()