kony.mvc.registry Functions
The kony.mvc.registry
namespace contains the following functions.

Enables you to add a new form name, along with its controller, extension controller, and friendly name, to the registry.
Syntax 1
kony.mvc.registry.add(“friendlyName”, “formId”);
kony.mvc.registry.add(“friendlyName”, “formId”, “formController”);
kony.mvc.registry.add(“friendlyName”, “formId”, {“controllerName” : “formController” , “controllerType” : <controllerType>});
kony.mvc.registry.add(“friendlyName”, “formId”, “formController”, “formExtController”);
Syntax 2
kony.mvc.registry.add(
"friendlyName",
"formId",
{"controllerName" : "", "controllerExtName" : "", "controllerType" : ""});
Parameters
friendlyName [string] [Mandatory]
You can assign a "friendly" name to the form, which will be easier for you to remember than the actual formId. The friendlyName string maps the navigation path to the formId and its corresponding controller.
formId [string] [Mandatory]
The name of the form. Given formId as "f1," the Framework automatically searches for the availability of " f1.js" and "f1Controller.js" for initializations.
The following parameters are considered in the third parameter if it is a dictionary (Refer Syntax 2 and Example for more information):
formController [string] [Optional]
The name of the file that contains the form controller.
formExtController [string] [Optional]
The name of the file that contains the form extension controller. You can use form extension controllers to extend the functionality of the form.
controllerExtName [string] [Optional]
The name of the file that contains the extension controller.
controllerType [string] [Optional]
For data-driven forms, this parameter is kony.mvc.ModelFormController. You can inherit your own controller from kony.mvc.FormController and provide the name here.
kony.mvc.registry.add( "friendlyName", <config>);
NOTE: Support for this syntax is available on Quantum Visualizer V9 Service Pack 5 and later versions.
Parameters
friendlyName [string] [Mandatory]
You can assign a unique "friendly" name to the form, which will be easier for you to remember than the actual FormId.
config [Object] [Mandatory]
A JSON Object that contains the following key-value pairs:
- viewName [String or Array of Strings] [Mandatory]
The name of the Form View, Template View, or the Component View in String format. You can also provide a list of view names in an Array of Strings format.
- controllerName [String]
The name of the Form Controller, Template Controller, Component Controller, or Business Controller of the Component in String format.
- controllerExtName [String or Array of Strings]
The name of the Form Controller Extension or the Business Controller Extension of the Component. You can also provide a list of Form Controller Extension names in an Array of Strings format.
- controllerType [String]
The type of Form Controller. For model-driven forms, this parameter is kony.mvc.MDAFormController. You can inherit your own controller from kony.mvc.FormController and provide the name here.
- appName [String] [Mandatory in case of Micro Apps Architecture]
The name of the application in the Micro Apps Architecture.
Example
kony.mvc.registry.add( "friendlyName", "formId", {"controllerName" : "", "controllerExtName" : "", "controllerType" : ""});
Return Values
Returns true
if the form name is successfully added to the registry, otherwise it returns false
.
Returns false if the same friendly name has already been registered.
Remarks
- If the friendlyName or the formName parameter (or both) is an empty string,
null
, or undefined, this function does nothing. - If the formController parameter is
null
, undefined, not provided, or is an empty string, the string in the formId parameter is suffixed with the string "Controller." For example, if formIdcontains the string "form1" and the formController parameter is not provided, then "form1Controller" will used as the name of the form controller file. - You cannot make changes to the inter-app registry by using the Registry APIs. The registry entries of an app can only be modified by the app.

Retrieves the controller name from the registered friendly name.
Syntax
kony.mvc.registry.getControllerName(
friendlyName);
Parameters
friendlyName
The friendly name of the form to retrieve the name from.
Example
kony.mvc.registry.getControllerName("FriendlyName");
Return Values
Returns a string containing the controller name if the friendly name is registered and the controller name is found. Returns a string containing "<viewName>.Controller" if the friendly name is registered and the controller name is not found. Returns null
if the friendly name is not registered.

Removes the name of a form controller from the registry.
Syntax
kony.mvc.registry.remove(
friendlyName);
Parameters
friendlyName
The friendly name of the form whose controller is to be removed.
Example
kony.mvc.registry.remove(FriendlyName");
Return Values
None.