The property is defined only if the document is an XML form, that is, if the document was created in LiveCycle Designer. When defined, xfa is a static XFAObject, which is the root node of the underlying xfa model, and gives access to the xfa scripting object model (SOM).Refer to the document Adobe XML Form Object Model Reference for details on the xfa SOM. The document Converting Acrobat JavaScript for Use in LiveCycle Designer Forms has a comparison between the Acrobat and LiveCycle Designer scripting object models.Note: When executing this property from a folder level script, pass the Doc object from the document so that xfa will be executed in the proper context. See Example 2.Suppose this document is an XML form, and that there is a text field named EmployeeName. This example uses the xfa object to access and change the value of this field.var eN = this.xfa.form.form1.EmployeeName;console.println("\nEmployeeName: " + eN.rawValue);EmployeeName: A. C. RobateN.rawValue = "Robat, A. C."console.println("\nEmployeeName: " + eN.rawValue);EmployeeName: Robat, A. C.function isXFA(doc) {var wasWasNot = (typeof doc.xfa == "undefined") ? "not" : "";console.println("This document was "+wasWasNot+"created by Designer.");}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.429.html