XFA Specification
Chapter 8, Dynamic Forms
Layout for Dynamic Forms
282
[subform (inner[2])
[subform (inner[3])
[subform (inner[4])
[subform (outer[2])]
[subform (inner[0])
[subform (inner[1])
keep.next="contentArea"]
keep.next="contentArea"]
keep.next="contentArea"]
keep.next="contentArea"]
keep.next="contentArea"]
When these objects are inserted into the Layout DOM each group of
inner
subforms adheres together,
but there is no adherence between groups of
inner
subforms or between
inner
and
outer
subforms.
Break Conditions for Dynamic Forms
As explained in
“Flowing Between ContentArea Objects” on page 234,
the layout processor by default
moves to a new
contentArea
if and when the current
contentArea
overflows (which can only happen
with flowing layout). However the
overflow
property of the object can force the layout processor to
move to a different
pageArea
and/or
contentArea
when the overflow occurs, as discussed in
“Break on
Entry” on page 283.
In addition the object’s
breakBefore
property can force the layout processor to
move to a different
pageArea
and/or
contentArea
just before the layout processor places the object, as
discussed in
“Break on Exit” on page 286.
Finally, the object’s
breakAfter
property can force it to move
to a different
pageArea
and/or
contentArea
after it has placed the object, as discussed in
“Break on
Overflow” on page 287.
Note:
The preferred syntax for expressing break conditions has changed in XFA 2.4. The old syntax using
the
break
element is still permitted but is deprecated and will be removed from some future
version of this specification.
The
overflow
,
breakBefore
, and
breakAfter
elements can force the layout processor to go to a
particular
contentArea
or a particular
pageArea
. In either case, an attribute of the element provides
either an XML ID or a SOM expression identifying the target. If there is an object of the correct type
matching the XML ID or SOM expression the layout processor traverses the subtree below the
pageArea
in the Template DOM, taking the shortest route to get from the node corresponding to the current
contentArea
to the target node. (This traversal may have side-effects, which are discussed in
“Leaders
and Trailers” on page 241.)
On the descending part of the traversal it adds new instances of
pageSet
and/or
pageArea
objects as appropriate to the Layout DOM. When the destination of the break is a
pageArea
, the layout processor then descends into a
contentArea
, adding new instances of
contentArea
objects to the Layout DOM if necessary.
The ability to specify the break target via a SOM expression is new in XFA 2.4. The expression is evaluated
in the context of the object that is currently being laid down.
@@TBD - this is a shame if true - it would be
more useful if $ was the current layout containter.
A before or after break condition (but not an overflow break condition) can be controlled by a script at
layout time. If a non-empty script is supplied within a
breakBefore
or
breakAfter
element, the layout
processor executes the script at the appropriate time (just before or just after laying down the object). The
script must return a Boolean value. If the script returns True the break is executed. If the the script returns
False the break is inhibited. The ability to control the break via a script is new in XFA 2.4.
The three types of layout breaks are processed at a different times and under different circumstances.
Consequently a single object may freely assert any two or all three. If the object being placed asserts
breakAfter
and the next object to be placed asserts
breakBefore
the two breaks are processed
sequentially.
Break conditions are also used with positioned layout, as discussed in
“Break Conditions” on page 216.
Home Index Bookmark Pages
Pages: Home Index All Pages