Sometimes the usual fx-repeat
does not do the job as it would interfere with the content
model of the repeated content. Examples are table
and all kind of lists.
In such situations the data-ref
attribute can be used instead.
A usual repeat uses the fx-repeat
element with a template
for repeating items.
All tables below bind to the same nodeset so adding/deleting items in one table will update the others.
To bind data nodes the data-ref
attribute is used instead of the usual ref
found
on the Fore elements.
You still have to wrap the repeated content in a template
as with usual repeats.
|
|
|
|
|
|
td
elements in a single row
|
The data-ref
can also be used deeper down in the markup like here on a tbody
.
A | B | C | D | E | F | x |
---|---|---|---|---|---|---|
|
|
|
|
|
|
|
It also works for lists...
To actually see the dynamic list delete the bound value from the control and hit space or click arrow.
Template Expressions work as expected within repeated content.
{field[@name="a"]} | {field[@name="b"]} | {field[@name="c"]} | {field[@name="d"]} | {field[@name="e"]} | {field[@name="f"]} |
A | B | C | D | E | F |
---|---|---|---|---|---|
{field[@name='a']} | {field[@name='b']} | {field[@name='c']} | {field[@name='d']} | {field[@name='e']} | {field[@name='f']} |
A | B | C | D | E | F | x |
---|---|---|---|---|---|---|
|
|
|
|
|
|
|