<fx-insert>
Description
Action to insert node(s) into instance data.
Attributes
| Name | Description | Default |
|---|
| at | index position in nodeset where to insert new node(s) | 0 |
| context | optional XPath pointing to parent node of node to insert | |
| position | with regard to ‘at’ can be either ‘before’ or ‘after’ | after |
| origin | XPath pointing to nodes to be inserted into referenced nodeset | |
| keepValues | Boolean attribute. When present will keep text-values of origin nodes | false |
| ref | XPath pointing to node(s) to insert. If context is given ref is relative to that | |
Events
| Name | Description |
|---|
| execute-action | dispatched when insert executes - mostly for internal debugging purposes |
| detail[action] - the action object itself |
| detail[event] - current event object |
| detail[path] - a DOMNodeIndex |
| insert | dispatched when nodes have been inserted |
| detail[insertedNodes] - the inserted nodes |
| detail[position] - the position of the insert in the nodeset |
| index-changed | dispatch right after insertion of new nodes |
| detail[insertedNode] - the inserted node(s) |
| detail[index] - the new index |
Examples