Navigation Manager APIs
The Navigation Manager provides three main APIs.
- kony.mvc.resolveNameFromContext API
- kony.mvc.getNavigationManager API
- kony.mvc.getApplication Manager API
kony.mvc.resolveNameFromContext API
In scenarios where micro apps are used, the resolveNameFromContext API can be used to resolve the paths during inter-app access of forms and templates.
Syntax
kony.mvc.resolveNameFromContext({"appName" : "", "friendlyName" : ""})
Input Parameters
Parameter | Description |
---|---|
appName [String] [Mandatory] | The name of the app in the project. |
friendlyName [String] [Mandatory] | The friendly name of the form or template. |
Example
kony.mvc.resolveNameFromContext({"appName" : "Accounts", "friendlyName" : "flex1"})
Return Values
None.
Remarks
The resolveNameFromContext API can be used in the following scenarios:
- To return the inter-app form in the appService and postAppinit events in case of micro apps.
- To configure another App Template in the current app.
- To configure an inter-app Form as a Camera overlay.
NOTE: In a composite app, the application events of the base app are given a higher priority.
kony.mvc.getNavigationManager API
The getNavigationManager API returns the navigation manager object of the app (both composite and independent apps).
The navigation manager object contains the following functions:

The navigate method enables inter-app or intra-app navigation.
Syntax
var obj = { "context" : this, "params" : { } , "callbackModelConfig" : {} }; kony.mvc.getNavigationManager().navigate(obj);
Input Parameters
Example
var obj = { "context" : this, "params" : { } , "callbackModelConfig" : {} };
var navManager = kony.mvc.getNavigationManager() navManager.navigate(obj);
Return Values
None.
kony.mvc.getApplicationManager API
The getApplicationManager API returns the application manager object of the app (both composite and independent apps).
The application manager object contains the following functions:

The getCurrentAppContext function returns the application context of the current app.
Syntax
var context = appManager.getCurrentAppContext()
Input Parameters
None
Example
var appManager = kony.mvc.getApplicationManager() var context = appManager.getCurrentAppContext();
Return Values
Returns the application context of the current app.

The getCurrentAppName function returns the name of the current app.
Syntax
applicationManager.getCurrentAppName();
Input Parameters
None
Example
var applicationManager = kony.mvc.getApplicationManager() applicationManager.getCurrentAppName();
Return Values
String - Returns the application name of the current app in String format.

The isCompositeApp function returns the type of the app - either composite or independent.
Syntax
applicationManager.isCompositeApp();
Input Parameters
None
Example
var applicationManager = kony.mvc.getApplicationManager() applicationManager.isCompositeApp();
Return Values
Boolean - Returns the value true if the app is a composite app. Returns the value false if the app is not a composite app.

The setAppContext function sets the application context for the specified app.
Syntax
applicationManager.setAppContext({"appName" : "", "context" : {}};
Input Parameters
Parameter | Description |
---|---|
appName [String] [Mandatory] | The name of the app in the project. |
context [Mandatory] |
The context to be updated to the app. |
Example
var applicationManager = kony.mvc.getApplicationManager() applicationManager.setAppContext({"appName" : "", "context" : {}};
Return Values
None
Remarks
The data provided in the context parameter is updated in the target application.