Extends
Members
(readonly) element :HTMLElement
The control's HTML element. No assumptions should be made about the element's type (nodeName) or contents.
- HTMLElement
- Inherited From
(readonly) name :String
The control's authored name.
- String
- Inherited From
(readonly) nodeName :String
The control's report specification node name.
- String
- Since
- Inherited From
(readonly) parameter :String
The control's parameter name.
- String
- Since
Methods
addValues(aValues)
Add an array of values to a control. If the control does not support multiple values, only the first one provided is used.
Name | Type | Description |
---|---|---|
aValues | Array.<ParameterValue> | | The values. |
clearValues()
Clear (or deselect) all values for this control. For a text prompt, the text is set to empty. For a value prompt, all the selections are removed.
getDisplay() → {Boolean}
The display state of the control.
- Inherited From
true if the control is displayed and false if the control is not displayed.
- Type:
- Boolean
getValues(bAllOptionsopt) → {Array.<ParameterValue>|Array.<ParameterRangeValue>}
The current values for the control.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
bAllOptions | Boolean | <optional> | false | This optional parameter is applicable only to value prompts. The parameter specifies whether to retrieve all values or only selected values. If the parameter is true, then all options are returned. If the parameter is false or missing, then only the selected options are returned. The default value of this parameter is false. |
An array of the current values.
- Type:
- Array.<ParameterValue> |
Array.<ParameterRangeValue>
getVisible() → {Boolean}
The visibility state of the control.
- Inherited From
true if the control is visible and false if the control is hidden.
- Type:
- Boolean
setDisplay(bDisplay)
Set the display of the control.
WARNING:
If the control is authored to be initially not displayed using the property "Box type" with a value of "None", this is treated like a conditional render so the report output will not contain the control. Use a "Box type" of "None-Block" or "None-Inline" instead.
Name | Type | Description |
---|---|---|
bDisplay | Boolean | Pass true to display and false to not display the control. |
- Inherited From
setValidator(fnValidationCallback)
Changes the default validation function for a control to one defined by the user. When the specified function returns false, the UI element associated with the control indicates that a validation error occurred. When used in a multi-select control, the Insert button is disabled.
Name | Type | Description |
---|---|---|
fnValidationCallback | PromptControl~ValidationCallbackFunction | A user-defined function that takes the user input as a parameter and returns a Boolean value. |
oPage.getControlByName( "txtPhoneNumber" ).setValidator( fnPhoneNumberValidator );
setValues(aValues)
Resets the control and adds an array of values to a control. If the control doesn't support multiple values, only the first value provided is used. This is a convenience method that issues consecutive calls to clearValues() and addValues(). If the control does not support multiple values, only the first one provided is used.
Name | Type | Description |
---|---|---|
aValues | Array.<ParameterValue> | | The values. |
setVisible(bVisible)
Set the visibility of the control.
Name | Type | Description |
---|---|---|
bVisible | Boolean | Pass true to show and false to hide the control. |
- Inherited From
toggleDisplay()
Toggle the display of the control. See getDisplay
and setDisplay
for details.
- Inherited From
toggleVisibility()
Toggle the visibility of the control. See getVisible
and setVisible
for details.
- Inherited From
Type Definitions
ValidationCallbackFunction(aValues) → {Boolean}
A callback function used to validate prompt controls. The function is passed an array of the "values" portion of ParameterValue
or ParameterRangeValue
.
Name | Type | Description |
---|---|---|
aValues | Array | An array of the values. |
true if all values are valid or false if any of the values are invalid.
- Type:
- Boolean
fnPhoneNumberValidator( aValues ) => !aValues.some(value => !value.use.match( /^\(\d\d\d\) \d\d\d\-\d\d\d\d$/ ));