Native XFA event creation and dispatch

Version 2.1205.6 extends supported property creation with repeated event children under fields, subforms and exclusion groups, plus a singleton script child under an event

Create a native handler

var e = Ref(this.parent.answer.getElement("event", 0))
e.activity = "click"
var s = Ref(e.getElement("script", 0))
s.contentType = "application/x-formcalc"
s.rawValue = "this.parent.marker.rawValue = this.parent.marker.rawValue + 1"

New events expose click, refOnly and the containing object as activity, listener and reference defaults; event occurrences remain subject to runtime node budgets and the 65,536 occurrence ceiling

The script is executed with its own listener owner as this, so container scripts use container-relative names rather than assuming a field's parent

Template and instance behaviour

Actual input, focus and lifecycle processing reads both template declarations and sparse Form instance properties

Template event occurrence n is paired with Form event occurrence n; additional Form events follow the declared events, and a replacement is executed once rather than alongside the old template handler

Event and script attributes inherit individually until overridden; an explicitly empty script replaces template content, whilst changing only script attributes retains inherited content

Created handlers retain their selected data context, persist in saved XDP and participate again after reload; initialize handlers execute once per accepted runtime instance

Input dispatch freezes admitted handlers and references before execution, so a handler added during a dispatch becomes eligible on a later dispatch

Sparse listener candidates are indexed by declaration ancestry before actual instance qualification, keeping unrelated fields out of the owner plan

Limits and evidence

A second script occurrence or conflicting event action choice fails the surrounding transaction; this feature does not add execution or creation APIs for submit, sign, encrypt or execute actions

Generated merged event views retain owned copies separately from borrowed nodes, check bounded snapshot storage before allocation and release their resource leases after use

Tests/XFA/CreatedEventDispatch records four focused provider-disabled Linux groups covering created activities, save/reload, sparse inheritance, clearing, real input and focus, cross-field references, distinct repeated data scopes, container initialisation and atomic rollback

The shared schema also supplies provider metadata; this delivery does not claim a new JavaScript-provider execution qualification, every imported/remerged/generated presentation, unrestricted event families or complete XFA compatibility

Element structure follows XFA 3.3; activity defaults are also described in the Adobe scripting reference