new Binder(config)
Binds data from Local Knowledge to a template
Parameters:
Name |
Type |
Description |
config |
Object
|
Configuration for this object. The config supplied directly extends the control |
Members
context
Properties:
Name |
Type |
Description |
context |
Object
|
The context to call functions in |
expressionRegEx
Properties:
Name |
Type |
Description |
expressionRegEx |
RegExp
|
A regular expression used to find custom expressions that should be replaced with values from the data |
functionRegEx
Properties:
Name |
Type |
Description |
functionRegEx |
RegExp
|
A regular expression used to find a function in a template |
intRegEx
Properties:
Name |
Type |
Description |
intRegEx |
RegExp
|
A regular expression used to determine if a string is an integer value |
repeaterRegEx
Properties:
Name |
Type |
Description |
repeaterRegEx |
RegExp
|
A regular expression used to find a repeater section in a template |
templates
Properties:
Name |
Type |
Description |
templates |
Object
|
A dictionary of templates |
Methods
bindData(data, containerId)
Binds the data to a full template
Parameters:
Name |
Type |
Description |
data |
Object
|
the data to bind |
containerId |
string
|
The id of the container to add the bound html to |
bindMessage(data, containerId)
Binds the data to a message template
Parameters:
Name |
Type |
Description |
data |
Object
|
the data to bind |
containerId |
string
|
The id of the container to add the bound html to |
bindSummary(data, containerId)
Binds the data to a summary template
Parameters:
Name |
Type |
Description |
data |
Object
|
the data to bind |
containerId |
string
|
The id of the container to add the bound html to |