^

Create nodes

In create-nodes mode the complete datastructure is created by using the binding expressions (ref attributes) used throughout a fx-fore element.

To activate create-nodes mode add the attribute to the fx-fore element. The processor will create nodes for all elements that are not present in the loaded data. This mode is useful if you want to show controls for all possible elements of a dataset, even if they are not present in a given set (optional nodes).

A complete and complex datastructure can be created this way without requiring a template or reference document.

Using user interface

If your Fore element does not specify fx-bind elements, the resulting datastructure follows the order and structure of all binding expressions found in the user interface of the page (everything except the fx-model).

This is often already fine and you're good to go. If however you need to control the order of nodes for some reason see next section.

Using fx-bind to control order

If you strictly need to control the order of elements in the data and the user interface uses a different order of display, you can use fx-bind elements.

For the new-element binding below this means that without the fx-bind it would be the first child of root as it occurs first in the user interface. With the fx-bind it is forced behind bar.

This way the exact shape of the datastructure can be controlled. The general rule: if a fx-bind for the path exists it will be used to control the data order, otherwise the UI binding order applies.