Caplin Trader 5.1.0

Class: module:ct-element/styler/RegExpStyler

module:ct-element/styler/RegExpStyler()

new module:ct-element/styler/RegExpStyler()

Applies a CSS class to a control, conditionally on the value matches the regular expression.

RegExpStyler is typically used in the XML Renderer Framework.
Extends:

Extends

Methods

style(vValue, mAttributes, oControl)

Applies a CSS class to a control, conditionally on the value matches the regular expression.

Attribute Options:

Option Description
invert if set to true, a non-match will be considered a successful match
class the CSS class name to apply upon a successful match.
select if set to true, the control value will be selected upon a successful match.
Parameters:
Name Type Description
vValue Variant

the value to match

mAttributes Map

the list of attributes, specified here and in @link module:ct-element/formatter/RegExpFormatter}.

oControl module:ct-control/Control

control to apply the CSS class

Overrides: