public class | source

Page

Represents the class for page.

Constructor Summary

Public Constructor
public

constructor(rawQuestionModels: object[], rawSurveyInfo: object)

Member Summary

Public Members
public get

Fired before navigation.

source
public get

Fired on dynamic question trigger changed.

source
public get

Fired after dynamic question trigger fire and dynamic questions are changed.

source
public get

formValues: object

Object with values representing question answer for server.

source
public get

Fired on navigation.

source
public get

questions: Array

Models of current page questions.

source
public get

server variables collection.

source
public get

Survey level metadata.

source
public get

Test navigator model.

source
public get

Fired on page validation complete; Use to implement custom error handling.

source
public get

Fired on page validation; Use to implement custom validation logic.

source

Method Summary

Public Methods
public

back(validate: boolean)

Navigate backward in a survey

  • @param {boolean} [validate=true] - Needs to validate.
source
public

changeLanguageOnTheNextPage(languageCode: string)

Change language on the next page

  • @param {int} [languageCode=''] - language code.
source
public

Forward to the last interview question for cati and capi.

source
public

getQuestion(id: string): Question

Get question by id

source
public

next(validate: boolean)

Navigate forward in a survey

source
public

replaceDynamicQuestions(rawQuestionModels: object[]): *

Replace dynamic questions.

source
public

validate(raiseValidationCompleteEvent: boolean, validationRuleFilter: function): PageValidationResult

Execute validation

source

Public Constructors

public constructor(rawQuestionModels: object[], rawSurveyInfo: object) source

Params:

NameTypeAttributeDescription
rawQuestionModels object[]

Models of current page questions.

rawSurveyInfo object

Survey level information.

Public Members

public get beforeNavigateEvent: Event source

Fired before navigation.

public get dynamicQuestionTriggerChangedEvent: Event source

Fired on dynamic question trigger changed.

public get dynamicQuestionsChangeCompleteEvent: Event source

Fired after dynamic question trigger fire and dynamic questions are changed.

public get formValues: object source

Object with values representing question answer for server.

public get navigateEvent: Event source

Fired on navigation.

public get questions: Array source

Models of current page questions.

public get serverVariables: ServerVariables source

server variables collection.

public get surveyInfo: SurveyInfo source

Survey level metadata.

public get testNavigator: TestNavigator source

Test navigator model.

public get validationCompleteEvent: Event source

Fired on page validation complete; Use to implement custom error handling.

public get validationEvent: Event source

Fired on page validation; Use to implement custom validation logic.

Public Methods

public back(validate: boolean) source

Navigate backward in a survey

  • @param {boolean} [validate=true] - Needs to validate.

Params:

NameTypeAttributeDescription
validate boolean
  • optional
  • default: true

public changeLanguageOnTheNextPage(languageCode: string) source

Change language on the next page

  • @param {int} [languageCode=''] - language code.

Params:

NameTypeAttributeDescription
languageCode string
  • optional
  • default:

public fastForward() source

Forward to the last interview question for cati and capi.

public getQuestion(id: string): Question source

Get question by id

Params:

NameTypeAttributeDescription
id string

Question id.

Return:

Question

Corresponding question object.

public next(validate: boolean) source

Navigate forward in a survey

Params:

NameTypeAttributeDescription
validate boolean
  • optional
  • default: true

Needs to validate.

public replaceDynamicQuestions(rawQuestionModels: object[]): * source

Replace dynamic questions.

Params:

NameTypeAttributeDescription
rawQuestionModels object[]

Updated question models.

Return:

*

public validate(raiseValidationCompleteEvent: boolean, validationRuleFilter: function): PageValidationResult source

Execute validation

Params:

NameTypeAttributeDescription
raiseValidationCompleteEvent boolean
  • optional
  • default: true

Raise error if true.

validationRuleFilter function
  • optional
  • default: null

Custom filter function to apply specific validation rules only.

Return:

PageValidationResult

Page validation result.