Aria uses a data binding technique that allows components to abstractly reference data in the model. This data can be simple scalar values or more complex types like lists and tables. From the UI perspective all that needs to be known is where the data resides in the model. Once the location has been declared Aria takes care of getting and saving the data via data binding objects which are implicitly constructed as your pages are loaded.
An example binding is shown below.
In the above example two user interface components are bound to data. The components are named by the
name
attribute while the location of the data is referenced by the
source
attribute.
These bindings cause the named UI components to be filled with data from the source nodes whenever the page containing the components is displayed. In this specific example the
ageCombo
is filled with items from the
customer/ageRanges
node within the data model, while the
firstnameEdit
is filled with data from the
firstname
model node.
Even if the model hasn't been populated Aria will automatically create storage for the data. So, if for instance the user interface component is an input component like an edit field Aria will create a node in the model to hold the user input. In this way the model can be subsequently referenced and the user interface value can be retrieved without knowing how the input was obtained. Similarly if the bound storage is updated or modified then the user input field will display the new value whenever it is redisplayed. Furthermore, the same model node can be bound to multiple user interface components so that the same value can be displayed across multiple pages or in different contexts.