Class: ControlProxy¶
The ControlProxy is a developer-facing class that provides access to a control. It is passed to rules to provide access to a control for application-specific customizations.
Hierarchy¶
-
ControlProxy
Implements¶
Summary¶
Constructors¶
Properties¶
Class Properties¶
Inherited Properties¶
Accessors¶
Class Accessors¶
Inherited Accessors¶
Methods¶
Class Methods¶
- _getExecuteSource
- applyValidation
- clearValidation
- clearValidationOnValueChange
- getCaption
- getName
- getPageProxy
- getType
- getValue
- isContainer
- redraw
- setEditable
- setStyle
- setValidationProperty
- setValue
- setVisible
Inherited Methods¶
Constructors¶
constructor¶
+ new ControlProxy(context
: IContext): ControlProxy
Overrides ClientAPI.constructor
Parameters:
Name | Type |
---|---|
context |
IContext |
Returns: ControlProxy
Properties¶
Protected
_control¶
• _control: any
Accessors¶
Methods¶
Protected
_getExecuteSource¶
▸ _getExecuteSource(): ExecuteSource
Overrides ClientAPI._getExecuteSource
Returns: ExecuteSource
applyValidation¶
▸ applyValidation(): void
Implementation of IControlProxy
Applies the validation view, if it's supported for the given control
Returns: void
clearValidation¶
▸ clearValidation(): void
Implementation of IControlProxy
Hides the validaiton view. Shorter version of: clientAPI.setupValidationProperties('ValidationViewIsHidden', true).applyValidation();
Returns: void
clearValidationOnValueChange¶
▸ clearValidationOnValueChange(): void
Implementation of IControlProxy
Hides the validaiton view while changing value
Returns: void
getCaption¶
▸ getCaption(): string
Implementation of IControlProxy
Returns: string
the caption of the contol
getName¶
▸ getName(): string
Implementation of IControlProxy
Returns: string
the name of the contol
getPageProxy¶
▸ getPageProxy(): IPageProxy
Implementation of IControlProxy
Returns: IPageProxy
the Page, which the control belongs to
getType¶
▸ getType(): string
Implementation of IControlProxy
Returns: string
the type of the contol
getValue¶
▸ getValue(): any
Implementation of IControlProxy
Returns: any
the value of the contol
isContainer¶
▸ isContainer(): boolean
Implementation of IControlProxy
Determine if the control is a container control
Returns: boolean
returns true if the control is a container control. Otherwise, returns false. It always returns false for a simple control
redraw¶
▸ redraw(): Promise‹any›
Implementation of IControlProxy
Use this method to redraw the control. In cases where a control does not have redraw semantics the control's container will redraw
Returns: Promise‹any›
setEditable¶
▸ setEditable(value
: boolean): this
Implementation of IControlProxy
Set the control's editable status
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean | editable setting |
Returns: this
this - allows chaining
setStyle¶
▸ setStyle(styleClass
: string, subView
: string): this
Implementation of IControlProxy
Apply styles to a control
Parameters:
Name | Type | Description |
---|---|---|
styleClass |
string | The name of the style class to be applied |
subView |
string | The name of the subview to apply the style to. If this is '', the style is applied to the entire control. |
Returns: this
setValidationProperty¶
▸ setValidationProperty(key
: string, value
: any): ControlProxy
Implementation of IControlProxy
Sets the validationProperties parameter of the underlying Observable. Currently only the FormCell Observable is supported.
This will not cause the UI to rerender. To redraw the form cell, use the applyValidation API.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | the key of the validaiton property Available keys: - SeparatorBackgroundColor (hex color as string e.g.: 'ffffff') - SeparatorIsHidden (boolean) - ValidationMessage (string) - ValidationMessageColor (hex color as string e.g.: 'ffffff') - ValidationViewBackgroundColor (hex color as string e.g.: 'ffffff') - ValidationViewIsHidden (boolean) |
value |
any | the value of the validation property |
Returns: ControlProxy
the current instance of the ControlProxy class
setValue¶
▸ setValue(value
: any, notify
: boolean): this
Implementation of IControlProxy
Set the value in the control
Parameters:
Name | Type | Default | Description |
---|---|---|---|
value |
any | - | value to be set |
notify |
boolean | true | whether to send the notification |
Returns: this
this - allows chaining
setVisible¶
▸ setVisible(value
: boolean, redraw
: boolean): this
Implementation of IControlProxy
Sets the control's visible state with / without redraw
Parameters:
Name | Type | Default | Description |
---|---|---|---|
value |
boolean | - | visible state |
redraw |
boolean | true | true if redraw after set the visible state |
Returns: this