ININ.Addins.UI.Views namespace

Member of ININ.Addins.UI Since 2016 R1 API Version 1

The ININ.Addins.UI.Views namespace provides APIs for interacting with the view system of the hosting application.

Methods

registerView(options) :IPromise

Async Static Since 2016 R1 API Version 1

Registers a view with the hosting application that can be selected by the end-user.

Views must be loaded as soon as possible in order to allow the views to be restored from persistence.

Views are loaded into sandboxed iframe elements and must use the provided APIs to communicate with the hosted application. To load the add-in API into the page for the view, add a reference to the versioned inin.addins.js file using a script tag. This file can be found in the CIC Web Applications zip file in the addins_sdk/client/lib directory. For example:

<script type="text/javascript" src="inin.addins.lib.js" data-callback="apiLoaded"></script>

The API will be loaded. Then the function specified on the data-callback attribute will be executed. The ININ.Addins namespace will be available globally on window.

Parameters

Name Type Description
options ININ.Addins.UI.Views.IViewRegistrationOptions

The view registration options.

Returns

An IPromise to whether the view was successfully registered or not.

Type
IPromise

updateView(options) :IPromise

Async Static Since 2018 R4 API Version 1

Updates a previously registered the view with a new configuration.

Currently only the URL can be modified after view registration. Modify and re-use the options object that is used when calling registerView

Parameters

Name Type Description
options ININ.Addins.UI.Views.IViewRegistrationOptions

The updated options for modifying the view.

Returns

An IPromise to whether the view was successfully modified or not.

Type
IPromise

Interfaces

IViewRegistrationOptions

Represents the view registration options to be passed to ININ.Addins.UI.Views.registerView in order to register a view with the application.