Note: Nintex Apps data centers are located in West US and Australia (AUS). In-region processing of Nintex Apps data is only available in these regions.

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.component

Functions

skuid.component.factory()

Creates and registers a new skuid.component.Component by looking for a registered componentType of the given name and, if one exists, applying it to the DOM element provided. If the name is not recognized, returns an error message.

Arguments: Returns: Return type:
  • options ( object ) --

    A simple JavaScript object with the following properties:

    • element ( DOM element ): Optional. The (optionally jQuery-wrapped) DOM element to which the component will be applied. If not provided, a DOM element will be created in memory, meaning the component will exist in the background and not be visible on the page.
    • definition ( string -or- XMLDoc -or- jQuery-wrapped XMLDoc ): Optional. An XML string or JS XMLDoc (optionally jQuery-wrapped) that specifies the component to be rendered, including its properties. Typically generated with skuid.utils.makeXMLDoc(xmlString).
    • type ( string ): Optional. The name of the registered component. If not provided, the component name will be extracted from definition.

    Note:  Either definition or type must be defined, or the component will not be rendered and an error message will be returned. Note that some standard Nintex Apps Components expect an XML definition and may produce errors if given only a type name.

A Component or a string describing an error condition.

skuid.component.Component or string

skuid.component.getAll()

Gets all skuid.component.Components on the Nintex Apps page.

Returns: Return type:
Any available skuid.component.Components array

skuid.component.getById(componentGUID)

Gets an instance of a skuid.component.Component by its ID.

Note:  skuid.$C() can be used as a shortcut to this API.

Arguments: Returns: Return type:
  • componentGUID ( string ) -- The globally unique ID of the skuid.component.Component to get.

The specified skuid.component.Component

object

skuid.component.getByType()

Gets any instances of a skuid.component.Component by its componentType. If not instances are available, returns an empty array.

Returns: Return type:
skuid.component.Component[] array

skuid.component.register()

skuid.component.Component

Instances of skuid.component.Component are the JavaScript objects behind the WYSIWYG Nintex Apps components dragged and dropped into an app page within the Page Designer.

Constructor

Use skuid.component.factory() to create new instances of Components.

Properties

Property Type Required Description
skuid.component.Component Unknown Type No No description available.
skuid.component.Component.isRendered boolean No

Read-only. Indicates whether the Component is rendered. If conditional rendering has been defined for the Component, this property will be changed whenever the Component is conditionally rendered / unrendered. Calling render() on an un-rendered Component will also set this property to true.

skuid.component.Component.xmlDefinition $( XML Element ) No

A jQuery-wrapped XML Element representing the XML used to construct the Component. This property may be undefined for dynamically generated Components generated by passing in just a type name and not a full XML definition to skuid.component.factory()

Prototype Functions

skuid.component.Component.prototype.addProblem(problem)

Adds a problem to the page, which is displayed in the Page Problems Wrapper:

Arguments:
  • problem ( string ) -- A user-friendly error message

skuid.component.Component.prototype.addProblems(problems)

Adds multiple problems to the page.

Arguments:
  • problems ( string ) -- An array of user-friendly error messages

skuid.component.Component.prototype.conditionallyRender()

Examines any render conditions defined on a Component and, if all conditions are met, renders the Component, otherwise the Component is unrendered. If no render conditions exist, the Component will always be rendered.

Returns: Rytpe:
The Component, to support function chaining. skuid.component.Component

skuid.component.Component.prototype.getElement()

Return the DOM element of this Component.

Returns: Return type:
The jQuery-wrapped DOM element which is the parent element for the component. String

skuid.component.Component.prototype.getId()

Return the unique identifier for this Component.

Returns: Return type:
The unique ID for this component. String

skuid.component.Component.prototype.getType()

Return the type of Component that this is an instance of.

Returns: Return type:
The type of this Component, e.g. 'calendar', 'skuidvis__chart' String

skuid.component.Component.prototype.id()

Returns the unique identifier for this Component.

Returns: Return type:
The unique ID for this component. String

skuid.component.Component.prototype.render()

Renders or re-renders the Component. That is, applies the Component's associated Component Type to this Component and its DOM element.

Returns: Return type:
The Component, to support function chaining. skuid.component.Component

skuid.component.Component.prototype.unrender()

Unrenders the Component in the DOM while retaining the component's information in memory for eventual rerendering through the render() function.

skuid.component.Component.prototype.unregister()

Completely removes the Component in the DOM while also removing the component's information from memory—meaning it cannot be rerendered.

Functions

skuid.component.Component.createChildComponents(componentDefinitions,elementToAppendTo,context,state)

Creates Child Components for a Component and marks the current component as the "parent" for each.

Arguments:
  • componentDefinitions -- JS or XML definitions for new Components to create. An array of objects or XML Nodes.
  • elementToAppendTo -- A DOM element to append the new Child Components to.
  • context ( object ) -- Optional object of context to use when rendering the Child Components. Defaults to this Component's context.
  • state ( object ) -- Initial state for the new Components to be created.

skuid.component.FieldRenderer

skuid.component.FieldRenderer(config)

Used to create a new FieldRenderer object.

For information on how to build custom field renderers, see the UI Code topic for general concepts and the Custom Field Renderer topic for implementation details.

Arguments:
  • config ( Object ) --

    An object representing the configuraiton of the field renderer. The config object is made of the following attributes:

    • readModeStrategy - (String): The rendering strategy for the FieldRenderer when in read mode. Valid options are "element" and "virtual"
    • read - (Function) : The function used in read mode. Expected to have different return types depending on value of "readModeStrategy"
    • editModeStrategy - (String) : The rendering strategy for the FieldRenderer when in edit mode. Valid options are "element" and "virtual"
    • edit - (Function) : The function used in edit mode. Expected to have different return types depending on value of "editModeStrategy"