Page
Represents the class for page.
Constructor Summary
Public Constructor | ||
public |
constructor(rawQuestionModels: object[], rawSurveyInfo: object) |
Member Summary
Public Members | ||
public get |
Fired before question models validation. |
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 after question models validation. |
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
|
source |
public |
changeLanguageOnTheNextPage(languageCode: string) Change language on the next page
|
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:
Name | Type | Attribute | Description |
rawQuestionModels | object[] | Models of current page questions. |
|
rawSurveyInfo | object | Survey level information. |
Public Members
public get beforeNavigateEvent: Event source
Fired before question models validation. The handler callback function can take parameters. When the handler is called, object will be passed as only parameter. Object has boolean property next that define way of navigation
public get dynamicQuestionTriggerChangedEvent: Event source
Fired on dynamic question trigger changed. The handler callback function can take parameters. When the handler is called, question model will be passed as only parameter.
public get dynamicQuestionsChangeCompleteEvent: Event source
Fired after dynamic question trigger fire and dynamic questions are changed. The handler callback function can take parameters. When the handler is called, array of question models will be passed as only parameter.
public get navigateEvent: Event source
Fired after question models validation. The handler callback function can take parameters. When the handler is called, object will be passed as only parameter. Object has boolean property next that define way of navigation
public get validationCompleteEvent: Event source
Fired on page validation complete; Use to implement custom error handling. The handler callback function can take parameters. When the handler is called, PageValidationResult will be passed as only parameter.
public get validationEvent: Event source
Fired on page validation; Use to implement custom validation logic. The handler callback function can take parameters. When the handler is called, PageValidationResult will be passed as only parameter.
Public Methods
public back(validate: boolean) source
Navigate backward in a survey
- @param {boolean} [validate=true] - Needs to validate.
Params:
Name | Type | Attribute | Description |
validate | boolean |
|
public changeLanguageOnTheNextPage(languageCode: string) source
Change language on the next page
- @param {int} [languageCode=''] - language code.
Params:
Name | Type | Attribute | Description |
languageCode | string |
|
public getQuestion(id: string): Question source
Get question by id
Params:
Name | Type | Attribute | Description |
id | string | Question id. |
public next(validate: boolean) source
Navigate forward in a survey
Params:
Name | Type | Attribute | Description |
validate | boolean |
|
Needs to validate. |
public replaceDynamicQuestions(rawQuestionModels: object[]): * source
Replace dynamic questions.
Params:
Name | Type | Attribute | Description |
rawQuestionModels | object[] | Updated question models. |
Return:
* |
public validate(raiseValidationCompleteEvent: boolean, validationRuleFilter: function): PageValidationResult source
Execute validation
Params:
Name | Type | Attribute | Description |
raiseValidationCompleteEvent | boolean |
|
Raise error if true. |
validationRuleFilter | function |
|
Custom filter function to apply specific validation rules only. |