XFA Specification
Chapter 8, Dynamic Forms
Data Binding for Dynamic Forms
279
The following figure shows a non-empty merge to this fragment, in which the maximum occurrence
attributes limit the number of
pepperoni
and
olive
subforms even while some data remains
unmatched. Note that the
olives
subform merely defaults to a maximum occurrence of 1.
T
Template DOM
pizza
Form DOM
pizza
Data DOM
pizza
topping
relation = "unordered"
topping
relation = "unordered"
pepperoni
occur.max = "2"
pepperoni
pepperoni
greenPeppers
occur.max = "1"
greenPeppers
greenPeppers
greenPeppers
olives
olives
olives
olives
The max attribute forces exclusion of data siblings
Instance Manager
An
instance manager
is an object placed into the Form DOM by the data binding process for the use of
scripts. One instance manager is placed in the Form DOM for each dynamic subform in the Form DOM.
Using the instance manager the script can find out how many instances of the subform have been copied
into the Form DOM and it can delete instances or insert more instances. When an instance is deleted, if the
instance was bound to data, the binding is automatically broken. When a new instance is inserted the
instance manager may invoke the data binding process to attempt to bind the new instance.
Each instance manager is the peer of the subforms it manages. It is distinguished from them in two ways.
First, it is not a subform object but an instance manager object. Second, its name is different. The name of
the instance manager is an underscore (
“_”
) character followed by the name of the subforms it manages.
For example, if a subform is called
Member
, the subform manager for that subform is called
_Member
.
Caution:
It is legal for XFA node names to start with underscore. This can lead to a name conflict if two
sibling subforms have names that differ only by the presence of a leading underscore. It is the
responsibility of the form creator to ensure that this does not happen.
Home Index Bookmark Pages
Pages: Home Index All Pages