Updates branches
- Source:
Methods
(static) activate(branchNode)
- Source:
Activates form controls. This function is separated so it can be overridden in custom apps.
Parameters:
Name | Type | Description |
---|---|---|
branchNode |
Element | branch node |
(static) clear(branchNode, path)
- Source:
Clears values from branchnode. This function is separated so it can be overridden in custom apps.
Parameters:
Name | Type | Description |
---|---|---|
branchNode |
Element | branch node |
path |
string | path of branch node |
(static) deactivate(branchNode)
- Source:
Deactivates form controls. This function is separated so it can be overridden in custom apps.
Parameters:
Name | Type | Description |
---|---|---|
branchNode |
Element | branch node |
(static) disable(branchNode, path, forceClearNonRelevant) → {boolean}
- Source:
Disables and hides a branch node/group
Parameters:
Name | Type | Description |
---|---|---|
branchNode |
Element | The element to hide and disable |
path |
string | path of branch node |
forceClearNonRelevant |
boolean | whether to empty the values of non-relevant nodes |
Returns:
whether the relevancy changed as a result of this action
- Type
- boolean
(static) enable(branchNode, path) → {boolean}
- Source:
Enables and reveals a branch node/group
Parameters:
Name | Type | Description |
---|---|---|
branchNode |
Element | The Element to reveal and enable |
path |
string | path of branch node |
Returns:
whether the relevant changed as a result of this action
- Type
- boolean
(static) evaluate(expr, contextPath, index) → {boolean}
- Source:
Evaluates a relevant expression (for future fancy stuff this is placed in a separate function)
Parameters:
Name | Type | Description |
---|---|---|
expr |
string | relevant XPath expression to evaluate |
contextPath |
string | Path of the context node |
index |
number | index of context node |
Returns:
result of evaluation
- Type
- boolean
(static) process(branchNode, path, result, forceClearNonRelevant)
- Source:
Processes the evaluation result for a branch
Parameters:
Name | Type | Description |
---|---|---|
branchNode |
Element | branch node |
path |
string | path of branch node |
result |
boolean | result of relevant evaluation |
forceClearNonRelevant |
boolean | whether to empty the values of non-relevant nodes |
(static) selfRelevant(branchNode) → {boolean}
- Source:
Checks whether branch currently has 'relevant' state
Parameters:
Name | Type | Description |
---|---|---|
branchNode |
Element | branch node |
Returns:
whether branch is currently relevant
- Type
- boolean
(static) setDisabledProperty(branchNode, bool)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
branchNode |
Element | branch node |
bool |
boolean | value to set disabled property to |
(static) update(updatedopt, forceClearNonRelevant)
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
updated |
UpdatedDataNodes |
<optional> |
The object containing info on updated data nodes. |
forceClearNonRelevant |
boolean | whether to empty the values of non-relevant nodes |
(static) updateNodes(nodes, forceClearNonRelevant)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
nodes |
Array.<Element> | Nodes to update |
forceClearNonRelevant |
boolean | whether to empty the values of non-relevant nodes |