The Portal Connector MVC API

This section contains documentation related to The Portal Connector MVC client-side API which can be used to leverage existing widget functionality. This version of the API makes use of the Kendo UI API (More information on that can be found here).

Working with the API

In order to begin working with the API in the first place, you will have to retrieve widgets to work with! There are a number of ways to retrieve widgets, including using the indexed form, the name of the form, and the find/findAll methods. Using the indexed form is simple enough:



tpc.forms[i]; /* ... */

Where i is the index of the form you wish to work with. In the vast majority of cases, the uppermost parent form will be at 0. Code completion will display all of the widgets on the page, which are typically named by the attribute they’ve been configured to use. For example:



tpc.forms[0].firstname; /* ... */

You can also find a form by its name similar to finding a widget. For example:

tpc.forms.formName; /* ... */



For the find method, passing in the name of the widget (Which is typically the attribute the widget has been configured to use) will return that widget as an object. For example:

tpc.find(“donotphone”);

Finally, the findAll method will return all widgets in an array of objects. For example:

tpc.findAll();