Search
Link Search Menu Expand Document
Kony Quantum is now HCL Volt MX. See Revised Terminology. Current Quantum users, see the important note about API naming.

FormController Methods

The FormController object contains the following methods.

getCurrentForm Method

Retrieves the name of the current form.

Syntax

getCurrentForm();

Parameters

None.

Return Values

Returns a string containing the name of the current form.

Example

ver currentForm = this.getCurrentForm();

getCurrentFormFriendlyName Method

Retrieves the friendly name of the current form.

Syntax

getCurrentFormFriendlyName();

Parameters

None.

Return Values

Returns a string containing the friendly name of the current form.

Example

ver currentFormFriendlyName= this.getCurrentFormFriendlyName();

getPreviousForm Method

Retrieves the name of the previous visible form.

Syntax

getPreviousForm();

Parameters

None.

Return Values

Returns a string containing the name of the previous visible form, or null if there is no previous visible form.

Example

ver previousForm = this.getPreviousForm();

getPreviousFormFriendlyName Method

Retrieves the friendly name of the previous visible form.

Syntax

getPreviousFormFriendlyName();

Parameters

None.

Return Values

Returns a string containing the friendly name of the previous visible form, or null if there is no previous visible form.

Example

ver previousFormFriendlyName = this.getPreviousFormFriendlyName();

pauseNavigation Method

Pauses when navigating from one form to another.

Syntax

pauseNavigation();

Parameters

None.

Return Values

None.

Remarks

Your app calls this method to pause when navigating from form to form and wait for tasks that need to be completed before the new form is shown. The only time your app can call this function is in the onNavigate event callback handler function, which you must provide. If your app calls it anywhere else, it does nothing.

To resume navigation, your app must call the resumeNavigation method.

Example

onNavigate : function(context, isBackNavigation)
{
    this.context = context;
    this.pauseNavigation();
    voltmx.net.invokeServiceAsync(url, this.callback1);
}

callback1: function(result)
{
    this.resumeNavigation();
}

resumeNavigation Method

Resumes the process of navigating from form to form.

Syntax

resumeNavigation();

Parameters

None.

Return Values

None.

Remarks

When your app is navigating from form to form, it can pause the process of navigation by calling the pauseNavigation method. After navigation has been paused, your app must call the resumeNavigation method to continue the navigation process and display the target form. If pauseNavigation has not been called, this method does nothing.

Important: Failing to call resumeNavigation after your app has called pauseNavigation may result in your app locking up.

Example

onNavigate : function(context, isBackNavigation)
{
    this.context = context;
    this.pauseNavigation();
    voltmx.net.invokeServiceAsync(url, this.callback1);
}

callback1: function(result)
{
    this.resumeNavigation();
}