Adobe 6.2 AEM Forms Scripting Reference
விளம்பரம்
விளம்பரம்
Designer Scripting Reference
AEM 6.2 Forms
Legal notices
For legal notices, see http://help.adobe.com/en_US/legalnotices/index.html.
Last updated 5/24/16
Contents
Version mapping to the XML Forms Architecture (XFA) . . . . . . . . . . . . . . . . . . . . . 2
XML Form Object Model Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
i
ii
iii
iv
v
vi
vii
viii
ix
x
wordSpacingMinimum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
wordSpacingOptimum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Scripting methods for Acrobat and Adobe Reader . . . . . . . . . . . . . . . . . . . . . . . . 546
Understanding the XML Form Object Model . . . . . . . . . . . . . . . . . . . . . . . . . . 676
XML Form Object Model DOMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
xi
1
About the Scripting Reference
1.
About the Scripting Reference
1
The Adobe
®
XML Form Object Model, based on the Adobe XML Forms Architecture, represents the underlying technology behind the Adobe XML form solution and incorporates XML architectural concepts such as Document Object Model (DOM). Using this technology, form developers can create complex and flexible form-based applications for use with the client or the server.
Designer enables a form developer to build intelligent forms using only the options provided in the
Designer graphical interface.
By scripting against the XML Form Object Model, form developers may further manipulate all aspects of the form, extending the functionality of the form beyond what is available through the
Designer interface. For example, you might use a simple calculation to automatically update costs on a purchase order, or you might use scripting to modify the appearance of your form in response to the locale of the user.
Scripting is supported in two languages: FormCalc, a calculation language created by Adobe Systems
Incorporated, and JavaScript, a powerful and popular scripting language.
Each host, such as Adobe® Acrobat and Adobe® Reader, is responsible for implementing the available methods. Some methods, such as beep, do not make sense on a server. The server does not implement these methods and instead can output an error message if a user tries to call the method.
For information about the basics of creating scripts, see
Scripting Basics
.
1.1.
Subforms and containers
In Designer, forms are documents that are created from a hierarchy of optionally repeating building-blocks known as subforms. Each subform controls a portion of the overall structure, presentation, and behavior of the form. Individual subforms enclose a combination of objects that produce fillable regions (fields) and non-fillable regions (draws). Subforms may also contain other subforms, and each subform may have properties that determine how and when the subform is instantiated into a constructed form.
Within each form is a concept of a container. A container is an object that holds data or values.
Simple containers, those that are not capable of holding other containers or objects, include fields
(text, numeric, buttons) and drawn objects (text, circle, line). All containers capable of holding other containers as well as non-container objects are considered complex containers. Subforms are an example of a complex container.
2.3
2.2
2.1
2.7
2.6
2.5
2.4
3.1
3.0
2.9
2.8
3.6
3.5
3.3
3.2
About the Scripting Reference
1.2.
Version mapping to the XML Forms Architecture (XFA)
Each version of Designer ships with a specific version of XML Forms Architecture (XFA). XFA represents the underlying technology beneath the Adobe XML forms solution.
The version of XFA in which a scripting property or method was added is included in the description of each property and method.
XFA Version Designer Version
No public release
10.0
No public release
9.0.1
9.0
8.2.1
No public release
8.2
No public release
8.1
8.0
7.1
No public release
7.0
6.0
2
3
XML Form Object Model Class Hierarchy
2.
XML Form Object Model Class Hierarchy
2
The XML Form Object Model consists of models that each contain a set of objects. Each object is derived from one of the set of classes that define common properties and methods. An object inherits these common properties and methods but may also add properties and methods that are unique to that object, relative to other objects derived from the same class.
As with traditional class structures, each class inherits properties and methods from its parent class.
Objects, in turn, inherit from the parent class from which they derive.
Each model uses a hierarchy of objects. Objects do not inherit properties and methods from other objects, but instead inherit directly from the class hierarchy. The hierarchy of objects within a model represents the XML structure of that model.
2.1.
object class
The object class is the base class from which all other classes, objects, and models are either directly or indirectly derived.
2.1.1.
Class hierarchy
None
Parent class Current class
object
Objects derived from this class
2.1.2.
Properties
Name
Description
Determines the name of the class of this object.
Type
String Get
Access
XML Form Object Model Class Hierarchy
2.1.3.
Methods
None
2.2.
list class
The list class represents a list of nodes.
2.2.1.
Class hierarchy
Parent class
2.2.2.
Properties
list
Current class
None
Objects derived from this class
Name
2.2.3.
Methods
Description
Specifies the number of objects in the list.
Name
Description
Appends a node to the end of the node list.
Inserts a node before a specific node in the node list.
Describes a zero-based index into the collection.
Removes a node from the node list.
Type
Integer Read
Access
Returns
Empty
Empty
Object
Empty
4
5
XML Form Object Model Class Hierarchy
2.3.
treeList class
The treeList class represents a list of tree nodes.
2.3.1.
Class hierarchy
list
Parent class
2.3.2.
Properties
None
2.3.3.
Methods
Current class
treeList
None
Objects derived from this class
Name
Description
Gets the first child of this node with the given name.
Returns
Object
2
2.4.
tree class
The
tree class represents the structure from which the nodeclass class is derived.
2.4.1.
Class hierarchy
Parent class
tree
Current class
None
Objects derived from this class
XML Form Object Model Class Hierarchy
2.4.2.
Properties
Name
Description
Returns a collection of like-named, in-scope nodes.
Returns a collection of like-class, in-scope nodes.
Returns the position of this object in its collection of like-class, in-scope objects.
Type
Object
Object
Integer
Returns the position of this node in its collection of like-named, in-scope nodes.
Integer
Specifies an identifier that may be used to specify this object or event in script expressions.
String
Returns a list of all child objects of the current object.
Returns the parent object of the current object.
Reads the reference syntax expression for this node.
Object
Object
String
Access
Read
Read
Read
Read
Read
/Write
Read
Read
Read
2.4.3.
Methods
Name Description
Evaluates the specified reference syntax expression, beginning with the current XML form object model object, and returns the value of the object specified in the reference syntax expression.
Returns
Object
Evaluates the specified reference syntax expression, beginning with the current XML form object model object, and returns the value of the object or objects specified in the reference syntax expression.
Object
2.5.
node class
The node class represents the primary data type for XML Form Object Model objects.
6
XML Form Object Model Class Hierarchy
2.5.1.
Class hierarchy
Parent class
Current class
node
Objects derived from this class
2.5.2.
Properties
Name Description
Specifies a generic user-defined XML ID type.
Specifies whether this object is a container object.
Indicates whether the current data value is the null value.
Specifies the model for the current object.
Returns the namespace for the object.
Type
String
Boolean
Boolean
Object
String
Access
Read
/Write
Read
Read
Read
Read
2
7
XML Form Object Model Class Hierarchy
Name
Description
Retrieves or sets that child object in the case where a parent object can only have one of a particular child object.
Type
Object
Access
Read
/Write
2.5.3.
Methods
Name
Description
Applies an XSL transformation to the XML representation of the current node. It is equivalent to calling saveXML and transforming the result with the specified XSL document.
Evaluates the reference syntax expression using the current context and sets the value of the found node. If the node doesn’t exist, it can be created.
Makes a copy of an object.
Gets a specified property value.
Returns a specified child object.
Checks if a specific property has been defined for this node.
Loads and appends a specified XML document to the current object.
Saves the current node to a string, but includes only a subset of the child nodes.
Saves the XML structure of the current “node class” on pagevii to a string.
Sets the value of a specified property.
Sets a specified object to be the current object.
Returns
String
Object
Object
String
Object
Boolean
Empty
String
String
Empty
Empty
2.6.
container class
The container class provides container objects for the form model.
8
9
XML Form Object Model Class Hierarchy
2.6.1.
Class hierarchy
Parent class
Current class
container
Objects derived from this class
2.6.2.
Properties
None
2.6.3.
Methods
Name
Description
Gets a delta script object for a specific property.
Recursively gets all the delta script objects for this container object and all its descendants.
Returns
Object
Object
2
2.7.
content class
The content class provides content objects for the form and template models. Form designs and completed forms are visually composed of objects that represent content, such as images and text.
XML Form Object Model Class Hierarchy
2.7.1.
Class hierarchy
Parent class
Current class
content
Objects derived from this class
2.7.2.
Properties
None
2.7.3.
Methods
None
2.8.
model class
The model class is the base class for the root objects of each model.
2.8.1.
Class hierarchy
Parent class
Current class
model
Objects derived from this class
10
XML Form Object Model Class Hierarchy
2.8.2.
Properties
Name
Description
Specifies the object that is represented by the alias for this model.
Specifies the current object, which is the starting object for the
“resolveNode” on pagecccli and “resolveNodes” on pageccclii methods.
Type
Object
Object
Access
Read
/Write
Read
/Write
2.8.3.
Methods
Name
Description
Removes all items from the current error log.
Creates a new node based on a valid class name.
Determines if a specified namespace is functionally equivalent, that is compatible, with the namespace of this model. It determines if the two namespaces are equivalent, even though the strings that represent them may not be identical.
Returns
Empty
Object
Boolean
2
2.9.
textNode class
The textNode class represents objects that store textual data directly instead of using the #text
object derived from the nodeclass class.
11
XML Form Object Model Class Hierarchy
2.9.1.
Class hierarchy
Parent class
Current class
textNode
Objects derived from this class
2.9.2.
Properties
Name
Description
Represents the actual value stored by an object.
Specifies the value of the current object.
2.9.3.
Methods
None
Type
String
String
Access
Read /Write
Read /Write
12
Scripting Objects
3.
Scripting Objects
3
For each object supported in this scripting environment, there is a brief description of the associated properties and methods, along with links to detailed descriptions of the properties and methods.
In addition, each object has an accompanying table that shows the parent and child object hierarchy in relation to the current object. This parent and child hierarchy is meant to provide a mechanism for quickly determining the scripting syntax required to reference a particular object.
3.1.
arc
The arc object describes an arc or an ellipse.
3.1.1.
Hierarchy of objects
Model Child objects
3.1.2.
Parent class
3.1.3.
Properties
Name Description
Enables you to convert an arc into a circle.
Describes the justification of a line or edge.
Specifies the angle where the beginning of the arc renders.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
13
Name
Description
Specifies the length of the arc as an angle.
Invokes a prototype.
Invokes an external prototype.
3.1.4.
Methods
None
3.2.
area
The area object represents the grouping of other container objects on a form.
3.2.1.
Hierarchy of objects
Scripting Objects
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Model Child objects
3.2.2.
Parent class
3.2.3.
Properties
Name
Description Type
Specifies the number of columns spanned by this object when used inside a subform with a layout type of row.
String
Access
Read
/Write
14
Scripting Objects
Name
Description
Controls whether a form object is included when the form is printed.
Invokes a prototype.
Invokes an external prototype.
Specifies the X coordinate of the container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
Specifies the Y coordinate of a container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
Type
String
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
3.2.4.
Methods
None
3.3.
assist
The assist object supplies additional information about a container for users of interactive form applications.
It provides a means to specify the toolTip and behavior for a spoken prompt.
3.3.1.
Hierarchy of objects
Model Child objects
3.3.2.
Parent class
15
Scripting Objects
3.3.3.
Properties
Name
Description
Specifies the role played by the parent container.
Invokes a prototype.
Invokes an external prototype.
3.3.4.
Methods
None
Type
String
String
String
Access
Read /Write
Read /Write
Read /Write
3.4.
barcode
The barcode object supplies the information required to display a barcode. This information includes the type of barcode and a set of options that varies from one type of barcode to another.
Designer can support two types of barcodes: hardware and software. However, an XFA application is not required to support any particular set of barcodes. Hardware barcodes are displayed by particular printers. The set of supported barcodes may vary depending on the display device, because some printers have built-in support for particular barcodes. Software barcodes are drawn stroke by stroke by the XFA application itself. When displaying on a screen, which is not accessible to barcode readers, an XFA application may also revert to displaying just a placeholder rather than an accurate barcode.
For each type of barcode there are usually two separate specifications, one for the barcode itself and one for the barcode’s placement in relation to the physical page and to surrounding printed matter.
The creator of the form design is responsible for ensuring that the barcode is placed correctly on the page. The XFA application is responsible for correctly rendering the barcode using the user data. The user data must be compatible with the barcode; that is, it must conform to the allowed character set and string length.
3.4.1.
Hierarchy of objects
Model Child objects
16
Scripting Objects
3.4.2.
Parent class
3.4.3.
Properties
Name
Specifies an optional number of data columns to encode for supported barcodes. This property applies to two-dimensional (2D) barcodes only.
String
String
Specifies the maximum number of characters for this instance of the barcode. This property applies to one-dimensional barcodes only.
Defines preprocessing that is applied to the data written in the barcode.
String
Specifies an optional number of data rows to encode for supported barcodes. This property applies to 2D barcodes only.
Specifies an optional ending control character to append to barcode data.
String
String
Specifies an optional error correction level to apply to supported barcodes. This property applies to 2D barcodes only.
String
Determines the height of a set of bars used to encode one character of supplied text.
String
Specifies different aspects of a barcode depending on the class of barcodes being used.
String
Specifies whether to print the check digits in the human-readable text.
String
Description
Specifies the character encoding of the value that is encoded into a barcode.
Specifies an algorithm for the checksum to insert into the barcode.
An optional ratio of rows to columns for supported 2D barcodes.
Type
String
String
Access
Read
/Write
Read
/Write
Read
/Write
String
Specifies an optional starting control character to add to the beginning of the barcode data.
String
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
17
Scripting Objects
Name
Description
Specifies the location of any text associated with the barcode.
Truncates the right edge of the barcode for supported formats.
Specifies the pattern used by an object.
Represents the mode in a UPS Maxicode barcode.
Invokes a prototype.
Invokes an external prototype.
Specifies a ratio of wide bar to narrow bar in supported barcodes.
Type
String
String
String
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.4.4.
Methods
None
3.5.
bind
The bind object controls the behavior of its parent object during merge operations.
3.5.1.
Hierarchy of objects
3.5.2.
Parent class
Model
Child objects
18
Scripting Objects
3.5.3.
Properties
Name
Description Type
Specifies the type of content in the referenced document, expressed as a MIME type.
String
String Controls the role played by enclosing an object in a data-binding
(merge) operation.
Specifies a reference syntax expression defining the node in the data model to which the enclosing container will bind.
String
Specifies the encoding of binary content in the referenced document.
Invokes a prototype.
String
String
Invokes an external prototype.
String
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
3.5.4.
Methods
None
3.6.
bindItems
The bindItems object identifies a set of data nodes for binding.
The application of the bindItems object is a binding operation. The links between the list items and the referenced data are active. Any change to the data causes an immediate update to the list items.
3.6.1.
Hierarchy of objects
Model Child objects
3
19
Scripting Objects
3.6.2.
Parent class
3.6.3.
Properties
Name Description Type
Specifies the name of the associated connection control in the connection set.
String
String
Resolves a data value for each data node in the set identified by the ref object.
Resolves a data value for each data node in the set identified by the ref object.
String
Access
Read
/Write
Read
/Write
Read
/Write
3.6.4.
Methods
None
3.7.
bookend
The bookend object stores properties that identify optional subforms that bookend the contents of the parent subform.
The leader property identifies an optional
subform or subformSet that is laid out first, before
the contents of the parent container. The trailer property identifies an optional
subform or subformSet object that is laid out last, after the contents of the parent container. In this way, these properties bookend the contents of the parent container. This is true regardless of how many contentArea or pageArea objects the parent container spans.
3.7.1.
Hierarchy of objects
Model Child objects
none
20
Scripting Objects
3.7.2.
Parent class
3.7.3.
Properties
Name
Description Type
Specifies the subform or subformSet object to place at the top of a content or page area.
String
String Specifies the subform or subformSet object to place at the bottom of a content or page area.
Invokes a prototype.
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.7.4.
Methods
None
3.8.
boolean
The boolean object describes a single unit of data content representing a boolean logical value.
3.8.1.
Hierarchy of objects
Model Child objects
3
None
21
Scripting Objects
3.8.2.
Parent class
3.8.3.
Properties
Name
Description
Represents the actual value stored by an object.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
3.8.4.
Methods
None
3.9.
border
The border object describes the border surrounding an object.
3.9.1.
Hierarchy of objects
Type
Boolean
String
String
Boolean
Access
Read /Write
Read /Write
Read /Write
Read /Write
Model Child objects
3.9.2.
Parent class
22
Scripting Objects
3.9.3.
Properties
3
Name
Description
Describes the constraints on moving to a new page or content area after rendering an object.
Describes the justification of a line or edge.
Type
String
String
Specifies an object’s visibility.
Controls whether a form object is included when the form is printed.
Invokes a prototype.
Invokes an external prototype.
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
3.9.4.
Methods
None
3.10. break (deprecated)
The break object describes the constraints on moving to a new page or content area before or after rendering an object.
3.10.1. Hierarchy of objects
Model Child objects
23
Scripting Objects
3.10.2. Parent class
3.10.3. Properties
Name Description Type
Specifies the constraints on moving to a new page or content area after rendering the subform.
As of XFA version 2.8, this property is deprecated. See
Specifies the explicit destination page or content area for the after (deprecated) property.
As of XFA version 2.8, this property is deprecated. See
Specifies the constraints on moving to a new page or content area before rendering the subform.
As of XFA version 2.8, this property is deprecated. See
Specifies the explicit destination page or content area for
the before (deprecated) property.
As of XFA version 2.8, this property is deprecated. See
String
String
String
String
(bookendLeader)Specifies a subform to place into the current content area or page before any other content.
Identifies a subform to place into the current content area or page after any other content.
String
String
Specifies the subform to place at the top of the content area or page when it is entered as a result of an overflow.
As of XFA version 2.8, this property is deprecated. See
String
Specifies the explicit content area that will be the transition target when the current content area or page area overflows.
String
String
Specifies the subform to place at the bottom of the content area or page when it overflows.
As of XFA version 2.8, this property is deprecated. See
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
24
Scripting Objects
Name
Description Type
Determines whether it is necessary to start a new content area or page even when the current content area or page has the required name.
String
Invokes a prototype.
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
3
3.10.4. Methods
None
3.11. breakAfter
The breakAfterobject describes the conditional constraints on moving to a new page or content area after laying down the parent container. The breakAfter object is invoked after laying out the parent subform. The leaders or trailers are laid down before and after any jump that the breakAfter object mandates.
An optional script object associated with the
breakAfterobject determines whether it is respected. This scriptobject defaults to the true condition, which means that breakAfterobjects with noscriptobject are always invoked.
The
breakAfterobject is functionally equivalent to the deprecated syntax of break(depre-
cated).after(deprecated) and afterTarget(deprecated).
3.11.1. Hierarchy of objects
Child objects
3.11.2. Parent class
Model
25
Scripting Objects
3.11.3. Properties
Name
Description Type
Specifies the subform or subformSet object to place at the top of a content or page area.
String
String Determines whether it is necessary to start a new content area or page even when the current content area or page has the required name.
Specifies the object upon which the action will occur.
String
Specifies the constraints on moving to a new page or content area before laying out the parent subform.
Specifies the subform or subformSet object to place at the bottom of a content or page area.
Invokes a prototype.
Invokes an external prototype.
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
3.11.4. Methods
None
3.12. breakBefore
The breakBeforeobject describes the conditional constraints for moving to a new page or content area before laying down the parent container. The breakBefore object is invoked before laying out the parent subform. The leaders and trailers are laid down before and after any jump that the break-
Before object mandates.
An optional script object associated with the
breakBeforeobject determines whether it is respected. This scriptobject defaults to the true condition, which means that breakBeforeobjects with noscriptobject are always invoked.
The breakBefore object is functionally equivalent to the deprecated syntax of break(depre-
cated).before(deprecated) and beforeTarget(deprecated).
26
Scripting Objects
3.12.1. Hierarchy of objects
3.12.2. Parent class
3.12.3. Properties
Model
Child objects
Name
Description Type
Specifies the subform or subformSet object to place at the top of a content or page area.
String
Determines whether it is necessary to start a new content area or page even when the current content area or page has the required name.
String
Specifies the object upon which the action will occur.
String
Specifies the constraints on moving to a new page or content area before laying out the parent subform.
Specifies the subform or subformSet object to place at the bottom of a content or page area.
Invokes a prototype.
Invokes an external prototype.
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.12.4. Methods
None
3
27
Scripting Objects
3.13. button
The button object describes a push-button control.
3.13.1. Hierarchy of objects
3.13.2. Parent class
3.13.3. Properties
Model
Child objects
Name
Description
Specifies the visual appearance of a button when activated by a user.
All values support two states (up and down) except push which supports three states (up, down, and rollover).
Invokes a prototype.
Type
String
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
3.13.4. Methods
None
3.14. calculate
The calculate object controls the calculation of a field’s value.
28
Scripting Objects
3.14.1. Hierarchy of objects
Model
Child objects
3.14.2. Parent class
3.14.3. Properties
Name
Description
When used with the calculate object, the override property indicates whether the field allows overrides to occur and disables or enables
calculations. When used with the value object, the override property
indicates whether a calculation override has occurred.
Invokes a prototype.
Type
String
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
3.14.4. Methods
None
3.15. caption
The caption object describes a descriptive label associated with a form design object.
3
29
Scripting Objects
3.15.1. Hierarchy of objects
Model
Child objects
3.15.2. Parent class
3.15.3. Properties
Name
Description
Specifies the placement of the caption.
Specifies an object’s visibility.
A measurement value that specifies the height or width of the caption.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.15.4. Methods
None
30
Scripting Objects
3.16. certificate
The certificate object holds a certificate.
3.16.1. Hierarchy of objects
3.16.2. Parent class
3.16.3. Properties
Model
none
Child objects
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.16.4. Methods
None
3.17. certificates
The certificates object holds a collection of certificate filters.
String
String
Type Access
Read /Write
Read /Write
3
31
Scripting Objects
3.17.1. Hierarchy of objects
Model
Child objects
3.17.2. Parent class
3.17.3. Properties
Name Description Type
Specifies whether checking the certificate status is required when a digital signature is signed. The certificate status can be checked against a certificate revocation list (CRL) or an Online Certificate
Status Protocol (OCSP) response.
Specifies the URL for this object.
String
String
Specifies the type of URL represented by the certificates object.
Invokes a prototype.
Invokes an external prototype.
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.17.4. Methods
None
32
Scripting Objects
3.18. checkButton
The checkButton object describes the visual appearance of a Check Box or Radio Button in
Designer. Check Box and Radio Button objects are defined by the field object.
NOTE
:
A group of Radio Button objects is enclosed within an exclGroup object.
3
3.18.1. Hierarchy of objects
Model Child objects
3.18.2. Parent class
3.18.3. Properties
Name Description
Specifies whether the check box or radio button can support an additional third state that represents a neutral value.
Indicates the shape to use when filling a Check Box object.
Specifies whether the check box or radio button displays with a square or round outline.
String
A measurement specifying the size of the check box or radio button outline representing either the height and width for a check box, or the diameter for a radio button.
String
Invokes a prototype.
String
Invokes an external prototype.
Type
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
String
Read
/Write
Read
/Write
33
Scripting Objects
3.18.4. Methods
None
3.19. choiceList
The choiceList object describes the visual appearance of a Drop-down List or List Box in
Designer. Drop-down List and List Box objects are defined by the field object.
3.19.1. Hierarchy of objects
Model Child objects
3.19.2. Parent class
3.19.3. Properties
Name
Description
Specifies when a user’s selections are propagated to the data model.
Type
String
Determines when the choice list is presented by interactive applications.
Determines if a user can type a value into a drop-down list.
Invokes a prototype.
Invokes an external prototype.
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
34
Scripting Objects
3.19.4. Methods
None
3.20. color
The color object describes a unique color on a form.
3.20.1. Hierarchy of objects
3.20.2. Parent class
3.20.3. Properties
Model
Name
Description
Specifies the color space.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
3.20.4. Methods
None
Child objects
String
String
String
String
Type Access
Read /Write
Read /Write
Read /Write
Read /Write
3
35
Scripting Objects
3.21. comb
The comb object describes a comb field, where each letter of the field is divided by a black vertical line that spans the distance between the top and bottom edges of the field. The comb object is available for only dynamic or interactive PDF generation forms. Static PDF forms, and all other output formats, ignore this object.
Only single- line comb fields can be created, and to display field data as a comb, you must set the value of the hand property for the border object of the field to right. The maxChars property on the textEdit object determines the number of combs to create.
NOTE
:
If a textEdit object is a multiline field or a rich-text field, the presence of a comb child object will not produce a comb field at runtime.
3.21.1. Hierarchy of objects
3.21.2. Parent class
3.21.3. Properties
Model
none
Child objects
Name Description Type
Indicates the number of cells drawn for a comb field. This is not affected by the number of characters in the field’s value.
Integer
Invokes a prototype.
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
3.21.4. Methods
None
36
Scripting Objects
3.22. command
The command object specifies a single command to execute against the data source.
3.22.1. Hierarchy of objects
Model Child objects
3.22.2. Parent class
3.22.3. Properties
3
Name
Description
Specifies the number of seconds to attempt a query.
Invokes a prototype.
Invokes an external prototype.
3.22.4. Methods
None
Type
String
String
String
Access
Read /Write
Read /Write
Read /Write
3.23. connect
The connect object describes the relationship between its containing object and a connection to a web service, schema, or data description. Connections are defined outside the form design in a separate packet with its own schema.
37
Scripting Objects
3.23.1. Hierarchy of objects
Model
Child objects
3.23.2. Parent class
3.23.3. Properties
Name
Description Type
Specifies the name of the associated connection control in the connection set.
String
Specifies the number of seconds to delay opening the data source after a connection is made.
String
String Specifies a reference syntax expression defining the node in the data model to which the enclosing container will bind.
Specifies the number of seconds to attempt a query.
String
Specifies the contexts in which to use the connection.
Invokes a prototype.
Invokes an external prototype.
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.23.4. Methods
None
38
Scripting Objects
3.24. connectionSet
The connectionSet object is the root object of the connectionSet model.
3.24.1. Hierarchy of objects
Model
Child objects
3.24.2. Parent class
3.24.3. Properties
None
3.24.4. Methods
None
3.25. connectString
The connectString object specifies the connection string to use to connect to the database.
3.25.1. Hierarchy of objects
Model Child objects
3
None
39
Scripting Objects
3.25.2. Parent class
3.25.3. Properties
Name
3.25.4. Methods
None
Description
Invokes a prototype.
Invokes an external prototype.
String
String
Type Access
Read /Write
Read /Write
3.26. contentArea
The contentArea object describes a region within a page area eligible for receiving content.
3.26.1. Hierarchy of objects
Model Child objects
3.26.2. Parent class
40
Scripting Objects
3.26.3. Properties
Name
Description
A measurement of the height for the layout.
Controls whether a form object is included when the form is printed.
Invokes a prototype.
Invokes an external prototype.
A measurement specifying the width for the layout.
Type
String
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
Specifies the X coordinate of the container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
String
Specifies the Y coordinate of a container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
String Read
/Write
3.26.4. Methods
None
3.27. corner
The corner object describes the appearance of a vertex between two edges.
3.27.1. Hierarchy of objects
Model Child objects
3
41
Scripting Objects
3.27.2. Parent class
3.27.3. Properties
Name
Description Type
Specifies whether the corner appears convex (it joins the edges tangentially) or is inverted and appears concave (it joins the edges at right angles).
String
Specifies the shape of the corner.
Specifies an object’s visibility.
String
String
Specifies the radius of the corner.
Specifies the appearance of a line.
Specifies the thickness or weight of the line.
Invokes a prototype.
Invokes an external prototype.
String
String
String
String
String
Access
Read /Write
Read /Write
Read /Write
Read /Write
Read /Write
Read /Write
Read /Write
Read /Write
3.27.4. Methods
None
3.28. dataGroup (deprecated)
The dataGroup object is the parent of a list of XML data nodes within an XML data file. The nodes enclosed within the dataGroup (deprecated) object are either actual data values or other XML data objects, such as dataGroup (deprecated) objects. Subforms, as they appear in XML data files, are an example of data groups.
42
Scripting Objects
3.28.1. Hierarchy of objects
Model
dataGroup (deprecated)
Child objects
3.28.2. Parent class
3.28.3. Properties
None
3.28.4. Methods
None
3.29. dataModel
The dataModel object is the root object of the data model.
3.29.1. Hierarchy of objects
3.29.2. Parent class
Model
Child objects
43
3
Scripting Objects
3.29.3. Properties
None
3.29.4. Methods
None
3.30. dataValue
The dataValue object represents a container object that stores a value or values. For example, a dataValue object would be a field on a form.
NOTE
:
A dataValue object can have additional dataValue child objects that store additional data. Typically this is not the case.
3.30.1. Hierarchy of objects
3.30.2. Parent class
3.30.3. Properties
Model
none
Child objects
Name
Description
Represents the actual value stored by an object.
Determines whether a data value should be included in value of the parent object or as a property of the parent.
Type
Varies
String
Access
Read
/Write
Read
/Write
44
Scripting Objects
Name
Description Type
Specifies the type of content in the referenced document, expressed as a MIME type.
String
Indicates whether the current data value is the null value.
Boolean
Specifies the value of the current object.
String
Access
Read
/Write
Read
/Write
Read
/Write
3
3.30.4. Methods
None
3.31. dataWindow
The dataWindow object represents the range of records from the source data currently loaded into the data model.
3.31.1. Hierarchy of objects
3.31.2. Parent class
3.31.3. Properties
Model
none
Child objects
Name Description
Returns the current record number within the range of records contained by the current dataWindow object.
Type
Integer
Access
Read
45
Name
Scripting Objects
Description Type
Indicates whether a valid data window is currently defined.
Boolean
Returns the number of records in the data window following the current record.
Integer
Returns the number of records that are in the data window prior to the current record.
Integer
Access
Read
Read
Read
3.31.4. Methods
Name
Description
Moves the current record of the data window to a particular record within the range of records in the data.
Indicates if a particular dataGroup object is also a single record.
Repositions the current record to another location within the range of records.
Returns a record in a position relative to the current record.
Returns
Empty
Boolean
Empty
Object
3.32. date
The date object describes a calendar date.
3.32.1. Hierarchy of objects
3.32.2. Parent class
Model
None
Child objects
46
Scripting Objects
3.32.3. Properties
Name
Description
Represents the actual value stored by an object.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
3.32.4. Methods
None
3.33. dateTime
The dateTime object represents a date and time value.
3.33.1. Hierarchy of objects
3.33.2. Parent class
Model
None
Child objects
Type
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
47
Scripting Objects
3.33.3. Properties
Name
Description
Represents the actual value stored by an object.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
Type
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.33.4. Methods
None
3.34. dateTimeEdit
The dateTimeEdit object describes a control intended to aid in the selection of date and time.
3.34.1. Hierarchy of objects
Model Child objects
3.34.2. Parent class
48
Scripting Objects
3.34.3. Properties
Name
Description
Specifies whether a field can scroll horizontally.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
3.34.4. Methods
None
3.35. decimal
The decimal object represents a number with a fixed number of digits after the decimal.
3.35.1. Hierarchy of objects
3.35.2. Parent class
Model
None
Child objects
3
49
Scripting Objects
3.35.3. Properties
Name
Description
Represents the actual value stored by an object.
Specifies the maximum number of digits (inclusively) following the decimal point to capture and store.
Specifies the maximum number of digits (inclusively) preceding the decimal point to capture and store.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
Type
Double
String
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
3.35.4. Methods
None
3.36. defaultUi (deprecated)
The defaultUi object controls the depiction of objects whose appearance is delegated to the application.
3.36.1. Hierarchy of objects
Model Child objects
50
Scripting Objects
3.36.2. Parent class
3.36.3. Properties
Name
Invokes a prototype.
Invokes an external prototype.
Description Type
String
String
Access
Read
/Write
Read
/Write
3.36.4. Methods
None
3.37. delete
The delete object specifies the delete current record operation from the data source.
3.37.1. Hierarchy of objects
3.37.2. Parent class
Model
None
Child objects
3
51
Scripting Objects
3.37.3. Properties
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.37.4. Methods
None
3.38. desc
The desc object describes human-readable metadata.
3.38.1. Hierarchy of objects
3.38.2. Parent class
3.38.3. Properties
Model
Name
Description
Invokes a prototype.
Invokes an external prototype.
None
Child objects
Type
String
String
Access
Read
/Write
Read
/Write
Type
String
String
Access
Read /Write
Read /Write
52
Scripting Objects
3.38.4. Methods
Name
Description
Collects a comprehensive Extensible Metadata Platform (XMP) metadata packet for the document.
Returns
String
3
3.39. digestMethod
The digestMethod object lists an array of acceptable digest algorithms to use while signing. The valid values for PDF 1.7 are SHA1, SHA256, SHA384, SHA512 and RIPEMD160.
This object applies only if the digital credential that is signing contains RSA public/private keys. If it contains DSA public/private keys, then the digest algorithm is always SHA1 and this object is ignored. The default value, if not specified, is implementation-specific.
3.39.1. Hierarchy of objects
Child objects
3.39.2. Parent class
3.39.3. Properties
Model
Name
Description
Invokes a prototype.
Invokes an external prototype.
None
Type
String
String
Access
Read
/Write
Read
/Write
53
Scripting Objects
3.39.4. Methods
None
3.40. digestMethods
The digestMethods object contains a list of acceptable digestMethod object values. If the credential contains RSA public/private keys, the valid values are SHA1, SHA256, SHA384, SHA512,
RIPEMD160. If the credential contains DSA public/private keys, the only valid value is SHA1.
3.40.1. Hierarchy of objects
3.40.2. Parent class
3.40.3. Properties
Model
Name
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
Child objects
Type
String
String
String
Access
Read
\Write
Read
/Write
Read
/Write
3.40.4. Methods
None
54
Scripting Objects
3.41. draw
3
The draw object contains non-interactive form design content. Within Designer, for example, the draw object describes the text, static image, circle, line, and rectangle objects.
3.41.1. Hierarchy of objects
Model Child objects
3.41.2. Parent class
3.41.3. Properties
Name
Description
Represents the actual value stored by an object.
Specifies the location of the container’s anchor point when it is placed by using a positioned layout strategy.
String
String
Specifies the number of columns spanned by this object when used inside a subform with a layout type of row.
A measurement of the height for the layout.
String
Type
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
55
Scripting Objects
Name
Description
Specifies the horizontal text alignment.
Type
String
Specifies the language, currency, and time/date formatting to use for the content of the object.
String
Specifies the maximum height for layout purposes.
String
Specifies the maximum width for layout purposes.
Specifies the minimum height for layout purposes.
Specifies the minimum width for layout purposes.
Specifies an object’s visibility.
Specifies the unformatted value of the current object.
String
String
String
String
String
Controls whether a form object is included when the form is printed.
String
Rotates the object around its anchor point by the specified angle.
Invokes a prototype.
Invokes an external prototype.
Specifies the vertical text alignment.
A measurement specifying the width for the layout.
String
String
String
String
String
Specifies the X coordinate of the container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
String
Specifies the Y coordinate of a container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
56
Scripting Objects
3.41.4. Methods
None
3.42. dSigData
The dSigData object describes a unit of XML digital signature data.
3.42.1. Hierarchy of objects
Child objects
3.42.2. Parent class
3.42.3. Properties
Model
None
Name
Description
Represents the actual value stored by an object.
Specifies the value of the current object.
Type
String
String
Access
Read
/Write
Read
/Write
3
3.42.4. Methods
Name
Gets a specified property value.
Description Returns
String
57
Scripting Objects
3.42.5. edge
The edge object describes an arc, line, or one side of a border or rectangle.
TIP
:
In the case where the edge object describes one side of a border or rectangle, a corner object describes the vertex between two edge objects. If you are attempting to change properties of the edge object to achieve a behavior, for example to change the border color of a form object, then you may also need to set the color of the cornerobjects.
3.42.6. Hierarchy of objects
Model Child objects
3.42.7. Parent class
3.42.8. Properties
Name
3.42.9. Methods
None
Description
Specifies the rendered termination of the stroke.
Specifies an object’s visibility.
Specifies the appearance of a line.
Specifies the thickness or weight of the line.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
String
String
String
Access
Read /Write
Read /Write
Read /Write
Read /Write
Read /Write
Read /Write
58
Scripting Objects
3.43. effectiveInputPolicy
3
The effectiveInputPolicy object is used for the web service request. Authentication policy information is found only in the effectiveInputPolicy object, because servers are not required to authenticate themselves to the client.
3.43.1. Hierarchy of objects
Child objects
Model
3.43.2. Parent class
3.43.3. Properties
None
Name
3.43.4. Methods
None
Description
Invokes a prototype.
Invokes an external prototype.
String
String
Type Access
Read /Write
Read /Write
3.44. effectiveOutputPolicy
The effectiveOutputPolicy object is used for the web service result of a web service request.
The effectiveOutputPolicy is always empty.
59
Scripting Objects
3.44.1. Hierarchy of objects
Model
3.44.2. Parent class
3.44.3. Properties
None
Child objects
Name
3.44.4. Methods
None
Description
Invokes a prototype.
Invokes an external prototype.
String
String
Type Access
Read /Write
Read /Write
3.45. encoding
The encoding object corresponds to the PDFL subFilters element. The valid values for Adobe are adbe.x509.rsa_sha1, adbe.pkcs7.detached, and adbe.pkcs7.sha1, but other security handlers can define their own values.
3.45.1. Hierarchy of objects
Model Child objects
None
60
Scripting Objects
3.45.2. Parent class
3.45.3. Properties
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.45.4. Methods
None
String
String
Type Access
Read /Write
Read /Write
3.46. encodings
The encodings object contains a list of acceptable encoding object values.
3.46.1. Hierarchy of objects
3.46.2. Parent class
Model
Child objects
3
61
Scripting Objects
3.46.3. Properties
Name
3.46.4. Methods
None
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
String
Type
String
String
Access
Read/ Write
Read /Write
Read /Write
3.47. encrypt
The
encrypt object encrypts the form data when it is submitted. It contains a certificate object that
holds a public key for the encryption scheme. The encryption method used depends on the value of
3.47.1. Hierarchy of objects
3.47.2. Parent class
3.47.3. Properties
Model
Name
Invokes a prototype.
Description
Child objects
String
Type Access
Read /Write
62
Scripting Objects
Name
Description
Invokes an external prototype.
3.47.4. Methods
None
String
Type Access
Read /Write
3
3.48. event
The event object causes a script to execute or data to be submit whenever a particular event occurs.
3.48.1. Hierarchy of objects
3.48.2. Parent class
3.48.3. Properties
Model
Child objects
Name
Description
Specifies the name of the event.
Controls whether the event object listens to events occurring in the referenced node only, or to events occurring in the referenced node and descendents.
Specifies a reference syntax expression defining the node in the data model to which the enclosing container will bind.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
63
Name
Description
Invokes a prototype.
Invokes an external prototype.
Scripting Objects
Type
String
String
Access
Read
/Write
Read
/Write
3.48.4. Methods
None
3.49. eventPseudoModel
The eventPseudoModel object is the root object of the event model.
3.49.1. Hierarchy of objects
3.49.2. Parent class
3.49.3. Properties
Model
None
Child objects
Name
Description Type
Specifies whether to cancel a forthcoming action. This property applies only to the following scripting events: prePrint, preSubmit, preExecute, preOpen, and preSign.
Specifies the value that a user types or pastes into a field immediately after they perform the action.
Boolean
String
Access
Read
/Write
Read
/Write
64
Scripting Objects
Name
Description Type
Describes how the current value of a form field was set by the user.
Integer
Represents the full (untruncated) value that a user pastes into a form field.
Determines whether a user is pressing an arrow key to make a selection. This property is available only for list boxes and drop-down lists.
Determines whether the modifier key (for example, Ctrl on
Microsoft® Windows®) is held down when a particular event executes.
Specifies the content type of the newText property.
String
Boolean
String
Specifies the content type of the value specified for the prevText
property.
Specifies the content of the field before it changes in response to the actions of a user.
String
String
Specifies the content of the field after it changes in response to user actions.
String
Specifies whether the enter event is occurring for the first time. The enter event occurs each time a user clicks in a field.
Boolean
Specifies the index position of the last character of the text selection
stored in the prevTextproperty during a change event.
Integer
Integer Specifies the index position of the first character of the text
selection stored in the prevText property during a change event.
Specifies whether the Shift key is held down during a particular event.
Boolean
Specifies any fault code that occurs when a user attempts to execute a web service connection.
String
String Specifies the descriptive message that corresponds to a particular web service connection fault code.
Specifies the object upon which the action will occur.
String
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
Boolean Read
/Write
3
65
Scripting Objects
3.49.4. Methods
Name
Description
Notifies the form event manager that an event has occurred.
Resets all of the properties within the XML form event model.
Returns
Empty
Empty
3.50. exclGroup
The exclGroup object describes a mutual exclusion relationship between a set of containers.
An exclusion group is used to cause a set of radio buttons boxes to be mutually exclusive. When a user activates one member of the set, the other members are automatically deactivated. For example, if the set consists of radio buttons, clicking one button causes the other buttons to be deactivated.
Each member of the exclusion group is associated with an on value and an off value. When a member is activated, it assumes the on value. When it is deactivated, it assumes the off value. The on value for each member of a particular exclusion group must be unique.
Selecting one member of the exclusion group in the form causes each member’s value to be set to its on or off value, as appropriate. Similarly, assigning the on value to a member of the exclusion group causes the other members to be deactivated.
Alternatively, a value may be assigned to the exclusion group itself. In this case, each member is activated only if the value matches the on value for that member.
3.50.1. Hierarchy of objects
Model
Child objects
66
Scripting Objects
3.50.2. Parent class
3.50.3. Properties
Name
Description
Represents the actual value stored by an object.
Controls user access to the contents of a container object, such as a subform.
String
Specifies an accelerator key that is used by an interactive application to move the input focus to a particular field element.
String
Specifies the location of the container’s anchor point when it is placed by using a positioned layout strategy.
String
Specifies the border color value for this field.
String
Specifies the border width for this field.
Specifies the number of columns spanned by this object when used inside a subform with a layout type of row.
Returns the validation message for the first failed validation test, or an empty string if this field has passed all validation tests.
The background color value for this field.
Type
String
Access
Read
/Write
Read
/Write
Read
/Write
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
A measurement of the height for the layout.
Specifies the horizontal text alignment.
Specifies the layout strategy to be used by this object.
Specifies the nullTest value for the field.
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
67
Scripting Objects
Name
Description
Specifies the mandatory message string for this field.
Specifies the maximum height for layout purposes.
Specifies the maximum width for layout purposes.
Specifies the minimum height for layout purposes.
Specifies the minimum width for layout purposes.
Specifies an object’s visibility.
Specifies the unformatted value of the current object.
Controls whether a form object is included when the form is printed.
Specifies whether the processing application must save the value of the exclusion group as part of a form submission or save operation.
Invokes a prototype.
String
String
String
Invokes an external prototype.
Specifies the validate message string for this field.
Specifies the vertical text alignment.
A measurement specifying the width for the layout.
String
String
String
String
Specifies the X coordinate of the container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
String
Specifies the Y coordinate of a container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
String
Type
String
String
String
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
68
Scripting Objects
3.50.4. Methods
Name
Description Returns
Executes any scripts on the calculate event of the specified object, and any child objects.
Empty
Executes the event script of the object.
Empty
Executes any scripts on the initialize event of the specified object, and any child objects.
Empty
Empty Executes any scripts on the validate event of the specified object, and any child objects.
Returns the selected member of an exclusion group.
Object
3
3.51. exData
The exData object describes a foreign data type.
3.51.1. Hierarchy of objects
3.51.2. Parent class
3.51.3. Properties
Model
None
Name
Description
Represents the actual value stored by an object.
69
Child objects
Type
String
Access
Read
/Write
Scripting Objects
Name
Description Type
Specifies the type of content in the referenced document, expressed as a MIME type.
String
Specifies a reference to an external file or resource.
String
Specifies the maximum (inclusive) allowable length of the content or -1 to indicate that no maximum length is imposed.
Specifies the encoding of binary content in the referenced document.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
String
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.51.4. Methods
None
3.52. execute
The execute object controls where an event is handled.
3.52.1. Hierarchy of objects
3.52.2. Parent class
Model
None
Child objects
70
Scripting Objects
3.52.3. Properties
Name
Description
Specifies the name of the associated connection control in the connection set.
Type
String
Specifies whether to import new data into the existing form or merge new data with the original form design to create a new form.
String
Specifies what application can execute the script.
Invokes a prototype.
Invokes an external prototype.
String
String
String
Access
Read /Write
Read /Write
Read /Write
Read /Write
Read /Write
3.52.4. Methods
None
3.53. exObject
The exObject object describes a single program or implementation-dependent foreign object.
3.53.1. Hierarchy of objects
3.53.2. Parent class
Model
Child objects
3
71
Scripting Objects
3.53.3. Properties
Name
Description
Specifies the URI location of an archive file that may contain program code related to the exObject object.
Specifies a URI name or location for the program code represented by the object.
Type
String
String
Specifies a URI location that can be used to assist the resolution of a
String
Specifies an identifier corresponding to a MIME type that identifies the program code represented by the object.
String
Invokes a prototype.
String
Invokes an external prototype.
String
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
3.53.4. Methods
None
3.54. extras
The extras object acts as an enclosure around one or more sets of custom properties. The content of this object may be used by custom applications.
3.54.1. Hierarchy of objects
Model Child objects
none
72
Scripting Objects
3.54.2. Parent class
3.54.3. Properties
3
Name
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
3.54.4. Methods
None
Type
String
String
String
Access
Read /Write
Read /Write
Read /Write
3.55. field
The field object describes a single interactive container capable of capturing and presenting data content.
In terms of objects available in the Object Library of Designer, the field object is the base XML definition for the following objects:
• Barcodes
• Button
• Date/Time Field
• Decimal Field
• Signature Field
• Email Submit Button
• HTTP Submit Button
• Image Field
• Numeric Field
• Paper Forms Barcode
73
Scripting Objects
• Password Field
• Print Button
• Reset Button
• Text Field
You can define custom validation messages. A single field can contain up to three messages, one each for script test, picture test, and null test. When these are specified, they can be accessed with the following syntax:
You can also access these validation messages with their shortcut properties:
When these values are not populated, the processor constructs a default message.
A field can have a maximum of one validation test in a failure state at any given time. Validation tests are evaluated in the following order, and evaluation stops at the first test that fails:
1)
2)
3)
3.55.1. Hierarchy of objects
Model
Child objects
74
Scripting Objects
3.55.2. Parent class
3.55.3. Properties
Name
Description
Represents the actual value stored by an object.
Controls user access to the contents of a container object, such as a subform.
String
Specifies an accelerator key that is used by an interactive application to move the input focus to a particular field element.
String
Specifies the location of the container’s anchor point when it is placed by using a positioned layout strategy.
String
Specifies the border color value for this field.
String
Specifies the border width for this field.
Specifies the number of columns spanned by this object when used inside a subform with a layout type of row.
Specifies the edit value for the field.
Returns the validation message for the first failed validation test, or an empty string if this field has passed all validation tests.
The background color value for this field.
Type
Varies
Access
Read
/Write
Read
/Write
Read
/Write
String
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
Specifies the foreground color value for the field. It is the equivalent of the font.fill.color.valueexpression.
Specifies the format validation message string for this field.
Specifies the formatted value for the field.
String
String
String
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
75
Scripting Objects
Name
Invokes a prototype.
Description
A measurement of the height for the layout.
Specifies the horizontal text alignment.
Specifies the number of objects in the list.
Specifies the language, currency, and time/date formatting to use for the content of the object.
Specifies the nullTest value for the field.
Specifies the mandatory message string for this field.
Specifies the maximum height for layout purposes.
Specifies the maximum width for layout purposes.
Specifies the minimum height for layout purposes.
Specifies the minimum width for layout purposes.
Specifies the parent subform (page) of this field.
Specifies an object’s visibility.
Specifies the unformatted value of the current object.
Controls whether a form object is included when the form is printed.
Rotates the object around its anchor point by the specified angle.
The index of the first selected item.
Type
String
String
Integer
String
String
String
String
String
String
String
Object
String
Varies
String
String
Integer
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
Read
/Write
Read
/Write
76
Scripting Objects
Name
Description
Invokes an external prototype.
Specifies the validate message string for this field.
Specifies the vertical text alignment.
A measurement specifying the width for the layout.
Specifies the X coordinate of the container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
String
Specifies the Y coordinate of a container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
String
Type
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
3.55.4. Methods
Name
Description Returns
Adds new items to the current form field. For example, this method adds new items to a drop-down list.
Empty
Gets the bound value of a specific display item of a drop-down list or list box.
String
Removes all the items from the field. For example, it removes all the items contained within a drop-down list or a list box.
Empty
Deletes the specified item.
Executes any scripts on the calculate event of the specified object, and any child objects.
Executes the event script of the object.
Boolean
Empty
Empty
Empty Executes any scripts on the initialize event of the specified object, and any child objects.
Executes any scripts on the validate event of the specified object, and any child objects.
Empty
Retrieves the item display text for the specified item index.
String
77
Name
Scripting Objects
Description Returns
Returns the selection state of the specified item.
Retrieves the data value for the specified item index.
Boolean
String
Sets the selection state of the specified item.
Empty
Adds new items and values to the current form field. For example, this method adds new items and values as arguments to a drop-down list.
Empty
3.56. fill
The fill object applies a color and optional rendered designs to the region enclosed by an object.
3.56.1. Hierarchy of objects
Child objects Model
3.56.2. Parent class
3.56.3. Properties
Name
Specifies an object’s visibility.
Description
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
78
Scripting Objects
3.56.4. Methods
None
3
3.57. filter
The filter object describes the criteria for filtering signed certificates. The signed certificates are used to generate data signatures that follow the W3C XML-Signature standards.
3.57.1. Hierarchy of objects
Model Child objects
The mdp, reasons, and timestamp child objects are valid only if the parent object is signature. If the parent object is signData, Designer ignores these child objects and does not generate them.
3.57.2. Parent class
3.57.3. Properties
Name Description
Specifies whether the certificate status is checked when a digital signature is signed. The certificate status can be checked against a certificate revocation list (CRL) or an Online Certificate Status
Protocol (OCSP) response.
Type
String
Access
Read
/Write
79
Name
3.57.4. Methods
None
Description
Invokes a prototype.
Invokes an external prototype.
Indicates the version number of the current application.
3.58. float
The float object describes a floating point value.
3.58.1. Hierarchy of objects
3.58.2. Parent class
3.58.3. Properties
Model
None
Name
Description
Represents the actual value stored by an object.
Invokes a prototype.
Child objects
Scripting Objects
Type
String
String
Access
Read
/Write
Read
/Write
Type
Double
String
Access
Read
/Write
Read
/Write
80
Scripting Objects
Name
Invokes an external prototype.
Description
Specifies the value of the current object.
Type
String
Double
Access
Read
/Write
Read
/Write
3
3.58.4. Methods
None
3.59. font
The font object describes a font used on a form.
3.59.1. Hierarchy of objects
Model Child objects
3.59.2. Parent class
3.59.3. Properties
Name Description Type
Specifies a positive measurement that shifts a font up from the baseline or a negative measurement that shifts a font down from the baseline.
String
Horizontally scales font glyphs.
String
Access
Read
/Write
Read
/Write
81
Scripting Objects
Name
Description
Vertically scales font glyphs.
Applies kerning between characters.
Specifies the spacing limit.
Specifies the activation of a single or double line extending through the text (also known as strikethrough).
Controls the appearance of the line extending through the text
(also known as strikethrough).
Specifies the posture of the font.
String
String
String
A measurement specifying the size of the check box or radio button outline representing either the height and width for a check box, or the diameter for a radio button.
Specifies the name of the typeface.
Specifies the activation and type of underlining.
Controls the appearance of underlining.
Invokes a prototype.
Invokes an external prototype.
Controls the weight of the font typeface.
Type
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
String
String
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.59.4. Methods
None
82
Scripting Objects
3.60. form
The form object is the root object for the form model.
3.60.1. Hierarchy of objects
Model Child objects
3.60.2. Parent class
3.60.3. Properties
Name
Description
Specifies an algorithm for the checksum to insert into the barcode.
Type
String
Access
Read
/Write
3.60.4. Methods
Name Description
Executes any scripts on the calculate event of the specified object, and any child objects.
Executes any scripts on the initialize event of the specified object, and any child objects.
Executes any scripts on the validate event of the specified object, and any child objects.
Returns a list of all form model objects that are bound to a specified data object.
Returns
Empty
Empty
Empty
Object
3
83
Scripting Objects
Name
Description Returns
Collects a comprehensive Extensible Metadata Platform (XMP) metadata packet for the document.
String
Forces a specific set of scripts located on calculate events to execute. The specific events can be either pending calculate events or all calculate events.
Empty
Forces the remerging of the data model and template model to re-create the form model. After the remerge is complete, any layout model processing must be redone if necessary for the completed form.
Empty
3.61. format
The format object encloses input formatting and output formatting information, such as the picture clause.
3.61.1. Hierarchy of objects
Model Child objects
3.61.2. Parent class
3.61.3. Properties
Name
Description
Invokes a prototype.
Invokes an external prototype.
Type
String
String
Access
Read /Write
Read /Write
84
Scripting Objects
3.61.4. Methods
None
3.62. handler
The handler object controls which signature handler is used for a data-signing operation, according to the W3C XML-Signature standards.
3.62.1. Hierarchy of objects
3
Child objects
3.62.2. Parent class
3.62.3. Properties
Model
Name
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
3.62.4. Methods
None
None
Type
String
String
String
Access
Read /Write
Read /Write
Read /Write
85
Scripting Objects
3.63. hostPseudoModel
The hostPseudoModel object is the root object of the host model. Use the host properties and methods at run time.
Examples of hosts include Acrobat and XFAPresentationAgent (server). Some hosts may not support all properties and methods. For example, XFAPresentationAgent does not support
The properties or methods return different values depending on the rendering agent. When executed on a server the scripts return values of the server environment and when executed on a client, like Adobe Acrobat or web browser, the scripts return values of the client. For example, xfa.host.version returns XMLFM version when executed on a server and returns the Adobe Acrobat version when executed in Adobe Acrobat.
For desired results, develop according to these API differences.
3.63.1. Hierarchy of objects
3.63.2. Parent class
3.63.3. Properties
Model
None
Child objects
Name
Description
Specifies the name of the client application in which a form currently exists.
Specifies whether calculate scripts will execute.
Sets the currently active page of a document at run time.
Returns the language of the running host application.
Type
String
Access
Read
Boolean
Integer
String
Read
/Write
Read
/Write
Read
86
Scripting Objects
Name Description Type
Returns the number of pages in the current document.
Returns the platform of the machine running the script.
Integer
String
Sets and gets the title of the document. It is available only for client applications.
String
Specifies whether the validation scripts will execute.
Boolean
String
Access
Read
Read
Read
/Write
Read
/Write
Read
Indicates the packaging of the application that is running the script.
Indicates the version number of the current application.
String Read
3
3.63.4. Methods
Name Description Returns
Causes the system to play a sound. It is available only for client applications.
(currentDateTime)Returns current date and time in ISO 8601 format
(YYYYMMDDTHHMMSS).
Empty
String
Determines the number of documents in the current batch.
Determines the ordinal number of the current document within the batch.
Integer
Integer
Exports the data from the current form in either XDP or XML format to a file.
Empty
Finds and returns the form object that currently has the input focus.
Retrieves the specified URL. It is available only for client applications.
Imports data to the current form from a specified file.
Displays a dialog box on the screen. It is available only for client applications.
Object
Empty
Empty
Integer
Opens the drop-down list specified by the reference syntax expression.
Empty
Moves to the next page of a form. Use the pageDown method at run time.
Empty
Moves to the previous page of a form. Use the pageUp method at run time.
Empty
87
Name
Scripting Objects
Description Returns
Prints a specific number of pages from a document. It is available only for client applications.
Empty
Resets the fields to their default values within a document.
Empty
Displays a dialog box containing a question and an entry field for the user to reply to the question. The return value is a string containing the user's response. If the user presses the cancel button on the dialog box, the response is null.
String
Sets the keyboard focus to the form object specified by the reference syntax expression.
Empty
3.64. hyphenation
The hyphenation object specifies the default hyphenation properties to be applied to the content of an enclosing container.
3.64.1. Hierarchy of objects
3.64.2. Parent class
3.64.3. Properties
Model
None
Child objects
Name
Description
Specifies whether or not to hyphenate words consisting entirely of capital letters.
Type
String
Access
Read/Writ e
88
Scripting Objects
Specifies the minimum number of grapheme clusters, exclusive of any hyphen glyphs added to the start of the next line, allowed in a suffix for the hyphenation point to be considered. If the suffix is too short, the candidate is rejected.
Name
Description
Specifies whether or not to hyphenate words that begin with a capital letter.
Controls whether hyphenation is allowed.
Type
String
String
Specifies the maximum number of consecutive hyphenated lines that may be generated.
String
Specifies the minimum number of grapheme clusters, exclusive of any hyphen glyphs added to the end of the line, allowed in a prefix for the hyphenation point to be considered. If the prefix is too short, the candidate is rejected.
Invokes a prototype.
Invokes an external prototype.
Specifies the minimum number of grapheme clusters that must be present in a word in order for it to be eligible for hyphenation.
Words with fewer clusters will not be hyphenated.
String
String
String
String
String
Access
Read/Writ e
Read/Writ e
Read/Writ e
Read/Writ e
Read/Writ e
Read
/Write
Read
/Write
Read/Writ e
3
3.64.4. Methods
None
3.65. image
The image object describes a single image on a form.
89
Scripting Objects
3.65.1. Hierarchy of objects
3.65.2. Parent class
3.65.3. Properties
Model
None
Child objects
Name
Description Type
Represents the actual value stored by an object.
String
Specifies how the image is to map to the nominal content region of the image’s container.
String
String Specifies the type of content in the referenced document, expressed as a MIME type.
Specifies a reference to an external file or resource.
String
Specifies the encoding of binary content in the referenced
document.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
Read
Read
/Write
Read
/Write
Read
/Write
3.65.4. Methods
None
90
Scripting Objects
3.66. imageEdit
The imageEdit object encloses controls intended to aid in the manipulation of image content.
3
3.66.1. Hierarchy of objects
Model Child objects
3.66.2. Parent class
3.66.3. Properties
Name
Description
Indicates whether the image provided to the widget should be represented as a reference or should be embedded.
Invokes a prototype.
Type
String
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
3.66.4. Methods
None
3.67. insert
The insert object specifies the insert current record operation from the data source.
91
Scripting Objects
3.67.1. Hierarchy of objects
3.67.2. Parent class
3.67.3. Properties
Model
None
Child objects
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.67.4. Methods
None
Type
String
String
Access
Read /Write
Read /Write
3.68. instanceManager
The instanceManager object manages the instance creation, removal, and movement of form model objects.
3.68.1. Hierarchy of objects
Model Child objects
92
Scripting Objects
3.68.2. Parent class
3.68.3. Properties
Name
Description
Specifies the current number of subform instances on a form.
Specifies the maximum number of occurrences for the enclosing container, or -1 to set no upper boundary for occurrences.
Specifies the minimum number of occurrences for the enclosing container.
3.68.4. Methods
Type
String
String
Access
Read
/Write
Read
String Read
Name
Description
Adds a new instance of a subform or subform set to the form model.
Inserts a new instance of a subform or subform set into a form.
Moves a subform object within a set of subform instances.
Removes a specified subform or subform set from the form model.
Adds or removes specified subforms or subform sets from the form model.
Returns
Object
Object
Empty
Empty
Empty
3
3.69. integer
The integer object describes an integer value.
93
Scripting Objects
3.69.1. Hierarchy of objects
3.69.2. Parent class
3.69.3. Properties
Model
None
Child objects
Name
Description
Represents the actual value stored by an object.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
Type
Integer
String
String
Integer
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.69.4. Methods
None
3.70. issuers
The issuers object describes a collection of issuer certificates that are acceptable for data signing according to the W3C XML-Signature standards.
94
Scripting Objects
3.70.1. Hierarchy of objects
3.70.2. Parent class
3.70.3. Properties
Model
none
Child objects
Name
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
3.70.4. Methods
None
3.71. items
The items object supplies a column of choices for a list box or a check box.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
3
95
Scripting Objects
3.71.1. Hierarchy of objects
3.71.2. Parent class
3.71.3. Properties
Model
None
Child objects
Name
Specifies an object’s visibility.
Invokes an external prototype.
Description
Specifies a reference syntax expression defining the node in the data model to which the enclosing container will bind.
String
String Determines whether the values in a particular column represent both display and bound values, or if the data in the column represents bound values only.
Invokes a prototype.
String
Type
String
Access
Read
/Write
Read
/Write
Read
/Write
String
Read
/Write
Read
/Write
3.71.4. Methods
None
3.72. keep
The keep object describes the constraints involved in keeping subforms together within a page or content area.
96
Scripting Objects
3.72.1. Hierarchy of objects
3.72.2. Parent class
3.72.3. Properties
Model
Child objects
3
Name
Description Type
Specifies the constraints on keeping the parent object intact within a content area or page.
String
Specifies the constraints on keeping a form object together with the next container within a content area or page.
String
Specifies the constraints on keeping a form object together with the previous container within a content area or page.
String
Invokes a prototype.
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.72.4. Methods
None
3.73. keyUsage
The keyUsage object describes the key usage settings that are required for the signing certificate. It is constructed with a character that is used to represent each key usage type. The first through ninth characters, from left to right, represent the required value for these properties: digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment,
97
Scripting Objects
keyAgreement, keyCertSign, crlSign, encipherOnly, decipherOnly. Any additional characters are ignored.
3.73.1. Hierarchy of objects
Child objects
3.73.2. Parent class
3.73.3. Properties
Model
None
Name Description Type
Specifies an acceptable key usage extension that must be present in the signing certificate.
String
Specifies an acceptable key usage extension that must be present in the signing certificate.
String
Specifies an acceptable key usage extension that must be present in the signing certificate.
String
Specifies an acceptable key usage extension that must be present in the signing certificate.
String
Specifies an acceptable key usage extension that must be present in the signing certificate.
String
Specifies an acceptable key usage extension that must be present in the signing certificate.
String
Specifies an acceptable key usage extension that must be present in the signing certificate.
String
Specifies an acceptable key usage extension that must be present in the signing certificate.
String
Specifies an acceptable key usage extension that must be present in the signing certificate.
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
98
Scripting Objects
Name
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
3
3.73.4. Methods
None
3.74. layoutPseudoModel
The layoutPseudoModel object is used to query parameters that are only known after the form is laid out such as which page a form design object lies on, the total number of pages, how many pages an object spans, or the orientation of the form design object.
3.74.1. Hierarchy of objects
3.74.2. Parent class
3.74.3. Properties
Model
None
Child objects
Name
Description
Specifies whether the form layout process is complete and scripting tasks can begin.
Type
Boolean
Access
Read
99
Scripting Objects
3.74.4. Methods
Name
Description
Determines the page of the form that a given form design object first appears on.
Determines the page count of the current form.
Determines the page count of the current batch.
Returns
Integer
Integer
Integer
Determines which page within the batch contains the form object.
Determines the number of pages that a specified form object spans.
Integer
Integer
Determines the height of a given form design object.
Double
Determines the page number that contains a given form design object. If the object spans multiple pages, this method returns the first page the object occurs on.
Integer
Retrieves types of form design objects from a specified page of a form.
Determines the number of pages of the current form.
Determines the number of logical pages a given form design object spans.
Reapplies the layout options to the current form.
Replaces the layout of the pageArea object content with a new layout.
Determines the sheet number that contains the form object.
Determines the number of sheets in the current form.
Determines the sheet count of the current batch.
Determines which sheet within the batch contains the form object.
Determines the width of a given form design object.
Integer
Double
Determines the x coordinate of a given form design object relative to its parent object.
Double
Determines the y coordinate of a given form design object relative to its parent object.
Double
Object
Integer
Integer
Empty
Empty
Integer
Integer
Integer
100
Scripting Objects
3.75. line
The line object describes a single rendered line on a form.
3.75.1. Hierarchy of objects
3.75.2. Parent class
3.75.3. Properties
Model
Name
Description
Describes the justification of a line or edge.
Specifies the orientation of the line.
Invokes a prototype.
Invokes an external prototype.
Child objects
Type
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
3.75.4. Methods
None
3.76. linear
The linear object describes a linear gradient fill on a form.
101
Scripting Objects
3.76.1. Hierarchy of objects
Model
Child objects
3.76.2. Parent class
3.76.3. Properties
Name
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
3.76.4. Methods
None
3.77. manifest
The manifest object contains a list of references to all the nodes that are included in a document signature.
When the manifest objects is a child of the signature object, the document signature can protect a collection of nodes instead of the entire form.
102
Scripting Objects
3.77.1. Hierarchy of objects
3.77.2. Parent class
3.77.3. Properties
Model
Child objects
Name
Description
Represents the actual value stored by an object.
Identifies the form nodes that are protected by a document signature.
Invokes a prototype.
Invokes an external prototype.
Type
Boolean
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.77.4. Methods
Name
Description Returns
Gets the list of objects referred to in the manifest.
Object
Executes any scripts on the calculate event of the specified object, and any child objects.
Empty
Executes any scripts on the initialize event of the specified object, and any child objects.
Empty
Executes any scripts on the validate event of the specified object, and any child objects.
Empty
103
3
Scripting Objects
3.78. map
The map object specifies data mappings from the column names of a data source.
3.78.1. Hierarchy of objects
Child objects
3.78.2. Parent class
3.78.3. Properties
Model
None
Name
Description
Specifies the name of a unique binding ID where columns from the data
source specified by the from property are bound.
Specifies the original column name in the data source.
Type
String
String
Invokes a prototype.
Invokes an external prototype.
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.78.4. Methods
None
3.79. margin
The margin object specifies margin values for a form design object.
104
Scripting Objects
3.79.1. Hierarchy of objects
3.79.2. Parent class
3.79.3. Properties
Model
Name
Description
Specifies the size of the bottom inset.
Specifies a the size of the left inset.
Specifies the size of the right inset.
A measurement specifying the size of the top inset.
Invokes a prototype.
Invokes an external prototype.
Child objects
Type
String
String
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
3.79.4. Methods
None
105
Scripting Objects
3.80. mdp
The mdp object provides support for Modify Detection Prevention Plus (MDP+) digital signatures.
Acrobat 8.0 and later supports MDP+ digital signature for XFA-based forms.
In Designer, MDP+ signatures are implemented with a Signature Field. Signature fields enable you to specify a collection of form objects that are protected by the document signature. Using document signatures prevents the form or a portion of the form from being modified.
3.80.1. Hierarchy of objects
3.80.2. Parent class
3.80.3. Properties
Model
None
Child objects
Name
Description
Specifies the access permissions granted for a form that includes an author signature.
Specifies how a form with a document signature is saved as certified
PDF document.
Invokes a prototype.
Type
String
String
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.80.4. Methods
None
106
Scripting Objects
3.81. medium
The medium object describes a physical medium upon which to render.
3.81.1. Hierarchy of objects
3.81.2. Parent class
3.81.3. Properties
Model
None
Child objects
Name
Description Type
Specifies a region within the medium that is available for rendering with four comma separated measurements representing the measurements for x, y, width, and height.
String
String Specifies the length of the long edge of the medium. The length specified by the long property must be greater than the length
specified by the short property.
Specifies the orientation of the medium.
String
Specifies the length of the short edge of the medium object.
Specifies the name of a standard paper size.
Invokes a prototype.
Invokes an external prototype.
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
107
Scripting Objects
3.81.4. Methods
None
3.82. message
The message object holds one or more sub-objects containing validation failure messages.
3.82.1. Hierarchy of objects
3.82.2. Parent class
3.82.3. Properties
Model
Child objects
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.82.4. Methods
None
String
String
Type Access
Read /Write
Read /Write
3.83. numericEdit
The numericEdit object describes a control intended to aid in the manipulation of numeric content.
108
Scripting Objects
3.83.1. Hierarchy of objects
Model
Child objects
3
3.83.2. Parent class
3.83.3. Properties
Name
3.83.4. Methods
None
Description
Specifies whether a field can scroll horizontally.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
Access
Read /Write
Read /Write
Read /Write
3.84. occur
The occur object describes the constraints over the number of allowable instances for its enclosing container.
Modify the occur object on the template:ready event. However, the template:ready event is not accessible in the user interface. You cannot modify the occur object at the form:ready event, because this event occurs too late in the form processing.
109
Scripting Objects
3.84.1. Hierarchy of objects
Model Child objects
occur.scriptis reserved for future use)
3.84.2. Parent class
3.84.3. Properties
Name
Description Type
Specifies the initial number of occurrences for a subform or a subform set. This property should be used only for printed and static forms.
String
String Specifies the maximum number of occurrences for the enclosing container, or -1 to set no upper boundary for occurrences.
Specifies the minimum number of occurrences for the enclosing container.
String
Invokes a prototype.
Invokes an external prototype.
String
String
Access
Read
Read /Write
Read /Write
Read /Write
Read /Write
3.84.4. Methods
None
3.85. oid
The oid object describes an Object Identifier (OID) of the certificate policies that must be present in the signing certificate.
110
Scripting Objects
3.85.1. Hierarchy of objects
3.85.2. Parent class
3.85.3. Properties
Model
none
Child objects
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.85.4. Methods
None
Type
String
String
Access
Read /Write
Read /Write
3.86. oids
The oids object describes a collection of Object Identifiers (OIDs) that apply to signing data according to the W3C XML-Signature standards.
This object is only applicable if it has a sibling issuers object that is not empty.
3.86.1. Hierarchy of objects
Model Child objects
none
3
111
Scripting Objects
3.86.2. Parent class
3.86.3. Properties
Name
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
3.86.4. Methods
None
3.87. operation
The operation object represents a specific operation provided by a particular WSDL address.
Each operation is a single data connection.
3.87.1. Hierarchy of objects
Model
3.87.2. Parent class
None
Child objects
112
Scripting Objects
3.87.3. Properties
none
3
Name
Description
Specifies an input message associated with a particular WSDL connection operation.
Specifies the output message associated with a particular WSDL connection operation.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
String
Access
Read /Write
Read /Write
Read /Write
Read /Write
3.87.4. Methods
None
3.88. overflow
The
overflow object stores properties that are used when a parent subform overflows the current
3.88.1. Hierarchy of objects
3.88.2. Parent class
Model Child objects
113
Scripting Objects
3.88.3. Properties
Name
Description
Specifies the subform or subformSet object to place at the top of a content or page area.
Specifies the object upon which the action will occur.
Specifies the subform or subformSet object to place at the bottom of a content or page area.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3.88.4. Methods
None
3.89. packet
The packet object stores unrecognized objects; that is, those that do not conform to any of the other XML Form Object Models. This object provides a way to copy, move, or retrieve the information in these unrecognized objects.
3.89.1. Hierarchy of objects
3.89.2. Parent class
Model
None
Child objects
114
Scripting Objects
3.89.3. Properties
Name
3.89.4. Methods
Description
Specifies the content of the object.
Type
String
Access
Read /Write
Name
Description Returns
String Gets a specified property value.
Removes an XML attribute from a custom third-party XML packet that is added to the XML source of a form design.
Empty
Sets the value of a specified property.
Empty
3
3.90. pageArea
The pageArea object describes a rendering surface.
3.90.1. Hierarchy of objects
Model
3.90.2. Parent class
Child objects
115
Scripting Objects
3.90.3. Properties
Name
Description
Specifies whether the page area is intended to be blank and therefore may result in special treatment by the output device.
Supplies the initial page number to the first page in a group of consecutive pages that use the same pageSet.
Specifies whether the page area is considered a numbered page area.
Type
String
String
String
Specifies whether a page is odd or even for pagination within a set of pages.
String
Specifies a page’s position within a set of pages.
String
Controls whether a form object is included when the form is printed.
Invokes a prototype.
Invokes an external prototype.
String
String
String
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
3.90.4. Methods
None
3.91. pageSet
The pageSet object describes a set of related page area objects.
116
Scripting Objects
3.91.1. Hierarchy of objects
Model
Child objects
3.91.2. Parent class
3.91.3. Properties
Name Description
Controls the orientation of the page image when printing on both sides of the paper.
Specifies the relationship among the members of the set.
Type
String
String
Controls whether a form object is included when the form is printed.
Invokes a prototype.
Invokes an external prototype.
String
String
String
Access
Read/Writ e
Read/Writ e
Read/Writ e
Read/Writ e
Read/Writ e
3.91.4. Methods
None
3.92. para
The para object specifies the default paragraph and alignment properties to be applied to the content of an enclosing container.
117
3
Scripting Objects
3.92.1. Hierarchy of objects
3.92.2. Parent class
3.92.3. Properties
Model
Child objects
Name
Description
Specifies the horizontal text alignment.
Specifies the line height to apply to the paragraph content.
Specifies the size of the left indentation of the paragraph.
Specifies the size of the right indentation of the paragraph.
Specifies widow/orphan-style constraints on the overflow behavior of the content within the enclosing container.
Specifies an offset value for the anchor of the paragraph.
Specifies the amount of vertical spacing and the maximum font leading for the first line of the paragraph.
Specifies the amount of vertical spacing and the maximum font leading for the first line of the paragraph.
Specifies the distance between default tab stops.
Specifies a space-separated list of tab stop locations and leader properties.
Type
String
String
String
String
String
String
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
118
Scripting Objects
Name
Specifies the horizontal positioning of the first line relative to the remaining lines in a paragraph.
Invokes a prototype.
Description
Invokes an external prototype.
Specifies the vertical text alignment.
Specifies the maximum inter-word percentage space when text is justified, hyphenation is enabled, or both.
Specifies the minimum inter-word percentage space when text is justified, hyphenation is enabled, or both.
Specifies the optimal percentage width of an inter-word space when text is justified, hyphenation is enabled, or both.
String
String
String
Type
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
3.92.4. Methods
None
3.93. password
The password object specifies the password for the data source (if required for connection).
3.93.1. Hierarchy of objects
3.93.2. Parent class
Model
119
None
Child objects
Scripting Objects
3.93.3. Properties
Name
Invokes a prototype.
Invokes an external prototype.
Description
3.93.4. Methods
None
Type
String
String
Access
Read /Write
Read /Write
3.94. passwordEdit
The passwordEdit object describes a control intended to aid in the manipulation of password content. Typically, the user interface will obscure any visual representation of the content.
3.94.1. Hierarchy of objects
Child objects Model
3.94.2. Parent class
3.94.3. Properties
Name
Description
Specifies whether a field can scroll horizontally.
Type
String
Access
Read
/Write
120
Scripting Objects
Name Description Type
Specifies the character the form displays for each password character a user enters.
String
Invokes a prototype.
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
3
3.94.4. Methods
None
3.95. pattern
The pattern object describes a fill pattern for a form design object.
3.95.1. Hierarchy of objects
Model Child objects
3.95.2. Parent class
3.95.3. Properties
Name
Description
Specifies the pattern used by an object.
Invokes a prototype.
121
Type
String
String
Access
Read /Write
Read /Write
Name
Description
Invokes an external prototype.
3.95.4. Methods
None
3.96. picture
The picture object describes input mask and output formatting information.
3.96.1. Hierarchy of objects
Scripting Objects
Type
String
Access
Read /Write
Child objects
3.96.2. Parent class
3.96.3. Properties
Model
None
Name
Description
Represents the actual value stored by an object.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
Type
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
122
Scripting Objects
3.96.4. Methods
None
3.97. proto (deprecated)
The proto object describes a set of reusable object definitions.
3.97.1. Hierarchy of objects
3.97.2. Parent class
None
3.97.3. Properties
None
3.97.4. Methods
None
Model
None
Child objects
3.98. query
The query object represents a specific query of a particular data source.
3
123
Scripting Objects
3.98.1. Hierarchy of objects
Model
3.98.2. Parent class
3.98.3. Properties
Name
Description
Specifies the type of command used by a data query.
Invokes a prototype.
Invokes an external prototype.
Child objects
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
3.98.4. Methods
None
3.99. radial
The radial object describes a radial gradient fill.
124
Scripting Objects
3.99.1. Hierarchy of objects
Model
Child objects
3.99.2. Parent class
3.99.3. Properties
Name
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
3.99.4. Methods
None
3.100. reason
The reason object contains an acceptable reason for signing data per the W3C XML-Signature standards.
3
125
Scripting Objects
3.100.1. Hierarchy of objects
3.100.2. Parent class
3.100.3. Properties
Model
none
Child objects
Name
Description
Invokes a prototype.
Invokes an external prototype.
Type
String
String
Access
Read
/Write
Read
/Write
3.100.4. Methods
None
3.101. reasons
The reasons object contains acceptable reasons for signing data per the W3C XML-Signature standards.
3.101.1. Hierarchy of objects
Model Child objects
none
126
Scripting Objects
3.101.2. Parent class
3.101.3. Properties
None
3
Name
3.101.4. Methods
None
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
Access
Read /Write
Read /Write
Read /Write
3.102. recordSet
The recordSet object contains a number of records based on a specific query of the data source.
These records can be viewed, reorganized, added, and removed.
3.102.1. Hierarchy of objects
3.102.2. Parent class
Model Child objects
127
Scripting Objects
3.102.3. Properties
Name
Description
Specifies the action to perform if the current record is the first record in the record set.
Type
String
Indicates the location of the cursor library to use with the record set.
String
Specifies the type of cursor to use when opening the record set.
String
Specifies the action to perform if the current record is the last record in the record set.
Specifies the type of locking functionality to use with the data source.
Specifies the maximum number of occurrences for the enclosing container, or -1 to set no upper boundary for occurrences.
Invokes a prototype.
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
Invokes an external prototype.
String
Read
/Write
Read
/Write
3.102.4. Methods
None
3.103. rectangle
The rectangle object describes a single rendered rectangle.
128
Scripting Objects
3.103.1. Hierarchy of objects
Model
Child objects
3.103.2. Parent class
3.103.3. Properties
Name
Description
Describes the justification of a line or edge.
Invokes a prototype.
Invokes an external prototype.
3.103.4. Methods
None
String
String
String
Type Access
Read /Write
Read /Write
Read /Write
3.104. ref
The ref object contains a reference syntax expression that identifies a node to be included in an
XML digital signature.
3
129
Scripting Objects
3.104.1. Hierarchy of objects
3.104.2. Parent class
3.104.3. Properties
Model
none
Child objects
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.104.4. Methods
None
Type
String
String
Access
Read /Write
Read /Write
3.105. rootElement
The rootElement object specifies the XML element within an XML Schema data connection to use as the root of any data file used within the form.
3.105.1. Hierarchy of objects
Model
None
Child Objects
130
Scripting Objects
3.105.2. Parent class
3.105.3. Properties
Name
3.105.4. Methods
None
Description
Invokes a prototype.
Invokes an external prototype.
3.106. script
The script object contains a script written in FormCalc or JavaScript.
3.106.1. Hierarchy of objects
Type
String
String
Access
Read /Write
Read /Write
3.106.2. Parent class
Model
None
Child objects
3
131
Scripting Objects
3.106.3. Properties
Name
Description
Represents the actual value stored by an object.
Identifies the type of application to which the script is directed.
Specifies the type of content in the referenced document, expressed as a MIME type.
Specifies what application can execute the script.
Determines whether a script’s variables persist from one invocation to the next.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
Type
String
String
String
String
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
3.106.4. Methods
None
3.107. select
The select object contains the select statement query information to use with the current data source.
132
Scripting Objects
3.107.1. Hierarchy of objects
3.107.2. Parent class
3.107.3. Properties
Model
None
Child objects
3
Name
3.107.4. Methods
None
Description
Invokes a prototype.
Invokes an external prototype.
Type
String
String
Access
Read /Write
Read /Write
3.108. setProperty
The setProperty object modifies a property of its parent object. A parent object can contain any number of setProperty objects.
The target property is a reference syntax expression that describes a single property of the parent
object. This property identifies the node for which the value is to be set to the value identified by the
ref object and connection property. For example, the target specified to set the
toolTip for a field would be access.toolTip.
Within the parent container, there are no restrictions on which properties the setProperty object can target. However, the setProperty object cannot target the properties of nested containers.
The application of the setProperty object is a template operation. The reference is resolved and the data value is applied to the target property when generating the form as a result of a merge.
133
Scripting Objects
There is no permanent link between the data node and the property. Subsequent changes to the data are not propagated to the target property unless another merge occurs.
NOTE
:
Using the setProperty object to target bind related properties, such as the bind object or
#name, is unlikely to be useful, because the setProperty application occurs after the merge process has occurred.
3.108.1. Hierarchy of objects
Child objects
3.108.2. Parent class
3.108.3. Properties
Model
Name
Description
Specifies the name of the associated connection control in the connection set.
Specifies the object upon which the action will occur.
Type
String
String
Access
Read
/Write
Read
/Write
3.108.4. Methods
None
3.109. signature
The signature object determines which other objects are signed by a signature.
134
Scripting Objects
3.109.1. Hierarchy of objects
Model
Child objects
3.109.2. Parent class
3.109.3. Properties
Name
signature.typeis reserved for future use)
Invokes a prototype.
Description
Specifies the pattern used by an object.
Invokes an external prototype.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
3.109.4. Methods
None
3.110. signatureProperties (deprecated)
The signatureProperties object holds the properties of an XML-signature data signature.
Objects inserted within this object are inserted into the XML-Signature as XMP data.
3
135
Scripting Objects
3.110.1. Hierarchy of objects
3.110.2. Parent class
3.110.3. Properties
Model
none
Child objects
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.110.4. Methods
None
Type
String
String
Access
Read /Write
Read /Write
3.111. signaturePseudoModel
The signaturePseudoModel object is the root object of the signature model.
3.111.1. Hierarchy of objects
Model Child objects
None
136
Scripting Objects
3.111.2. Parent class
3.111.3. Methods
Name
Description
Removes a given signature.
Enumerates all the XML signatures found in the document.
Signs a given node list and places the signature in the target location.
Checks the validity of a signature.
Returns
Boolean
Object
Boolean
Integer
3
3.112. signData
The signData object controls the creation of a data signature as specified by the W3C XML-Signature standard.
3.112.1. Hierarchy of objects
Model Child objects
3.112.2. Parent class
137
Scripting Objects
3.112.3. Properties
Name
Description
Indicates the digital signature operation to perform when used in conjunction with the signData object, or the object to link to when
used in conjunction with the traverse object.
Specifies the object upon which the action will occur.
Invokes a prototype.
Invokes an external prototype.
Type
String
Access
Read
/Write
String
String
String
Read
/Write
Read
/Write
Read
/Write
3.112.4. Methods
None
3.113. signing
The signing object describes a collection of signing certificates that are acceptable for data signing according to the W3C XML-Signature standards.
3.113.1. Hierarchy of objects
3.113.2. Parent class
Model
none
Child objects
138
Scripting Objects
3.113.3. Properties
Name
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
3.113.4. Methods
None
3.114. soapAction
The soapAction object contains a fully qualified SOAP action.
3.114.1. Hierarchy of objects
Type
String
String
String
Access
Read /Write
Read /Write
Read /Write
Child objects
Model
3.114.2. Parent class
3.114.3. Properties
Name
Invokes a prototype.
Description
None
Type
String
Access
Read
/Write
3
139
Name
Description
Invokes an external prototype.
Scripting Objects
Type
String
Access
Read
/Write
3.114.4. Methods
None
3.115. soapAddress
The soapAddress object stores the fully qualified location of the SOAP end point. This location must be specified in RFC 2396 standard format.
3.115.1. Hierarchy of objects
Child objects
Model
3.115.2. Parent class
3.115.3. Properties
Name
3.115.4. Methods
None
Description
Invokes a prototype.
Invokes an external prototype.
None
Type
String
String
Access
Read /Write
Read /Write
140
Scripting Objects
3.116. solid
The solid object describes a solid fill style of a form design object.
3.116.1. Hierarchy of objects
3.116.2. Parent class
3.116.3. Properties
Model
Name
Description
Invokes a prototype.
Invokes an external prototype.
Child objects
Type
String
String
Access
Read
/Write
Read
/Write
3
3.116.4. Methods
None
3.117. source
The source object represents an external data source.
141
Scripting Objects
3.117.1. Hierarchy of objects
3.117.2. Parent class
3.117.3. Properties
Model
Child objects
Name
Description
Specifies the technology used to communicate with a database.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
3.117.4. Methods
Name
Description
Appends a new record to the record set.
Cancels any changes made to the current or new row of a record set object,
or the field collection of a record object, prior to calling the update method.
Cancels a pending batch update.
Closes a connection to a data source.
Deletes the current record from the record set.
Returns
Empty
Empty
Empty
Empty
Empty
Deletes the current record from the record set.
Empty
142
Scripting Objects
Name
Description Returns
Moves to the first record in the record set, and populates the data model with the record data.
Determines whether the current record data has changed.
Determines if the current location is at the beginning of the record set. The
bofAction property must be set to stayBOF.
Determines if the current location is at the end of the record set. The
eofAction property must be set tostayEOF.
Empty
Boolean
Boolean
Boolean
Moves to the last record in the record set, and populates the data model with the record data.
Empty
Moves to the next record in the record set, and populates the data model with the record data.
Empty
Connects to the data source and populates the data model with the results of the current record.
Empty
Moves to the previous record in the record set, and populates the data model with the record data.
Empty
Updates the current data binding by re-executing the query on which the
object data is based. Calling this method is equivalent to calling the close
and open methods in succession.
Empty
Refreshes the current record set or data connection.
Updates the current record in the record set.
Writes all pending batch updates to the data source.
Empty
Empty
Empty
3
3.118. sourceSet
The sourceSet object is the root object of the sourceSet model.
3.118.1. Hierarchy of objects
Model Child objects
143
Scripting Objects
3.118.2. Parent class
3.118.3. Properties
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.118.4. Methods
None
Type
String
String
Access
Read /Write
Read /Write
3.119. speak
The speak property plays an audible prompt describing the contents of a container object, such as a field or subform. This object is ignored by non-interactive form applications.
3.119.1. Hierarchy of objects
3.119.2. Parent class
Model
None
Child objects
144
Scripting Objects
3.119.3. Properties
Name
Description
Inhibits the audible prompt.
Alters the search path for text to speak. Whichever object is named in this property moves to the front of the search path. The other objects retain their relative order.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
String
Access
Read /Write
Read /Write
Read /Write
Read /Write
3.119.4. Methods
None
3.120. stipple
The stipple object describes a stippling effect for a form object.
3.120.1. Hierarchy of objects
Model Child objects
3
3.120.2. Parent class
145
Scripting Objects
3.120.3. Properties
Name
Description
Specifies the percentage of stipple color that is stippled over a solid background color.
Invokes a prototype.
Type
String
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
3.120.4. Methods
None
3.121. subform
The subform object describes a single subform capable of enclosing other containers.
In terms of objects available in the Object Library of Designer, the field object is the base XML definition for the following objects:
• Subform
• Table (including body rows, header rows, and footer rows)
146
Scripting Objects
3.121.1. Hierarchy of objects
Model
3.121.2. Parent class
3.121.3. Properties
Child objects
Name
Description Type
Controls user access to the contents of a container object, such as a subform.
String
Specifies whether to permit the processing application to optimize output by generating a printer macro for all of the subform’s draw content.
String
Specifies the location of the container’s anchor point when it is placed by using a positioned layout strategy.
Specifies the border color value for this field.
String
String
Specifies the border width for this field.
Specifies the number of columns spanned by this object when used inside a subform with a layout type of row.
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
147
Scripting Objects
Name
Description
Specifies the widths for columns of a table.
The background color value for this field.
A measurement of the height for the layout.
Specifies the horizontal text alignment.
Calculates the index of a subform or subform set based on where it is located relative to other instances of the same form object.
Specifies the layout strategy to be used by this object.
Specifies the language, currency, and time/date formatting to use for the content of the object.
Specifies the maximum height for layout purposes.
Specifies the maximum width for layout purposes.
Controls which data merge algorithm is used for a given subform.
Specifies the minimum height for layout purposes.
Specifies the minimum width for layout purposes.
Specifies an object’s visibility.
Controls whether a form object is included when the form is printed.
Controls participation of the subform in data binding and reference syntax expressions. It is valid only on the root subform.
Type
String
String
String
String
Integer
String
String
String
String
String
String
String
String
String
Restores the form nodes of a form to their original state, including resetting the visual properties of fields such as changes to border colors.
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
148
Scripting Objects
Name
Invokes a prototype.
Description
Invokes an external prototype.
Specifies the validate message string for this field.
Specifies the vertical text alignment.
A measurement specifying the width for the layout.
Specifies the X coordinate of the container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
String
Specifies the Y coordinate of a container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
String
Type
String
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
3.121.4. Methods
Name Description Returns
Executes any scripts on the calculate event of the specified object, and any child objects.
Empty
Executes the event script of the object.
Empty
Executes any scripts on the initialize event of the specified object, and any child objects.
Empty
Empty
Executes any scripts on the validate event of the specified object, and any child objects.
Returns a list of nodes contained within this subform (inclusive) that have a failed validation test.
Empty
149
Scripting Objects
3.122. subformSet
The subformSet object describes a set of related subform objects.
3.122.1. Hierarchy of objects
Model
Child objects
3.122.2. Parent class
3.122.3. Properties
Name
Description Type
Calculates the index of a subform or subform set based on where it is located relative to other instances of the same form object.
Integer
Specifies the relationship among the members of the set.
Controls whether a form object is included when the form is printed.
Invokes a prototype.
String
String
String
Invokes an external prototype.
String
Access
Read
/Write
Read
Read
/Write
Read
/Write
Read
/Write
150
Scripting Objects
3.122.4. Methods
None
3
3.123. subjectDN
The subnectDN object describes the attributes for a subject Distinguished Name (DN) that must be present within the signing certificate for it to be acceptable for signing. It is an array of dictionaries, where each dictionary contains key value pairs that specify the subject DN. The certificate must contain all the attributes specified in the dictionary, but it can contain additional attributes.
The key can be any legal attribute identifier.
For more information about the various Subject Distinguished attributes and their types, refer to
RFC 3280.
3.123.1. Hierarchy of objects
Child objects
3.123.2. Parent class
3.123.3. Properties
Model
None
Name
Description
Separates the attributes in the Subject DN string.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
Access
Read /Write
Read /Write
Read /Write
151
Scripting Objects
3.123.4. Methods
None
3.124. subjectDNs
The subjectDNs object describes the collection of key value pairs that is used to specify the subject
DN.
3.124.1. Hierarchy of objects
3.124.2. Parent class
3.124.3. Properties
Model
Name
3.124.4. Methods
None
Description
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
Child objects
Type
String
String
String
Access
Read/ Write
Read /Write
Read /Write
152
Scripting Objects
3.125. submit
The submit object describes how to submit data to a host.
3.125.1. Hierarchy of objects
3.125.2. Parent class
3.125.3. Properties
Model
Child objects
Name
Description
Determines whether PDF file will be included as part of the data.
Type
String
Determines the format in which to submit the data.
Specifies the object upon which the action will occur.
Specifies the encoding of text content in the document.
Invokes a prototype.
Invokes an external prototype.
Controls what subset of the data is submitted. This property is used
only when the format property is xdp.
String
String
String
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
Read
/Write
3
153
Scripting Objects
3.125.4. Methods
None
3.126. template
The template object describes a template. One such object exists for each template and all other objects that are descendants of the template object.
3.126.1. Hierarchy of objects
3.126.2. Parent class
3.126.3. Properties
None.
3.126.4. Methods
Model
Child objects
Name
Description
Creates a new node based on a valid class name.
Executes any scripts on the calculate event of the specified object, and any child objects.
Executes any scripts on the initialize event of the specified object, and any child objects.
Executes any scripts on the validate event of the specified object, and any child objects.
Returns
Object
Empty
Empty
Empty
154
Scripting Objects
Name
Description Returns
Returns a list of all form model objects that are bound to a specified data object.
Collects a comprehensive Extensible Metadata Platform (XMP) metadata packet for the document.
Object
String
Forces a specific set of scripts located on calculate events to execute. The specific events can be either pending calculate events or all calculate events.
Empty
Forces the remerging of the data model and template model to re-create the form model. After the remerge is complete, any layout model processing must be redone if necessary for the completed form.
Empty
3
3.127. text
The text object describes a single unit of data content representing a plain text value.
3.127.1. Hierarchy of objects
3.127.2. Parent class
3.127.3. Properties
Model
None
Child objects
Name
Description
Represents the actual value stored by an object.
Specifies the maximum number of characters that this text value can enclose.
Type
String
String
Access
Read
/Write
Read
/Write
155
Name
Description
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
Scripting Objects
Type
String
String
String
Access
Read
/Write
Read
/Write
Read
/Write
3.127.4. Methods
None
3.128. textEdit
The textEdit object encloses controls intended to aid in the manipulation of text content.
3.128.1. Hierarchy of objects
Model Child objects
textEdit.combis reserved for future use)
3.128.2. Parent class
156
Scripting Objects
3.128.3. Properties
Name
Description Type
Specifies whether the text can include styling (also known as rich text).
String
Specifies whether a field can scroll horizontally.
Specifies whether the text may span multiple lines.
String
String
Invokes a prototype.
Invokes an external prototype.
Specifies whether a field can scroll vertically.
String
String
String
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
3.128.4. Methods
None
3.129. time
The time object describes a single unit of data representing a time value.
3.129.1. Hierarchy of objects
3.129.2. Parent class
157
Model
None
Child objects
3
Scripting Objects
3.129.3. Properties
Name
Description
Represents the actual value stored by an object.
Invokes a prototype.
Invokes an external prototype.
Specifies the value of the current object.
3.129.4. Methods
None
Type
String
String
String
String
Access
Read /Write
Read /Write
Read /Write
Read /Write
3.130. timeStamp
The timeStamp object appends a time stamp to a document signature. A time stamp specifies the date and time when a document was signed and removes any doubt about when the document was signed.
3.130.1. Hierarchy of objects
3.130.2. Parent class
Model
None
Child objects
158
Scripting Objects
3.130.3. Properties
None
3
Name
Description
Specifies the URL for a time stamp server.
Specifies the pattern used by an object.
Invokes a prototype.
Invokes an external prototype.
3.130.4. Methods
None
Type
String
String
String
String
Access
Read /Write
Read/ Write
Read /Write
Read /Write
3.131. toolTip
The toolTip object supplies text for a tool tip on a form. This object is ignored by non-interactive form applications.
3.131.1. Hierarchy of objects
3.131.2. Parent class
Model Child objects
159
Scripting Objects
3.131.3. Properties
Name
3.131.4. Methods
None
Description
Invokes a prototype.
Invokes an external prototype.
3.132. traversal
The traversal object links its container to other objects in sequence.
3.132.1. Hierarchy of objects
Type
String
String
Access
Read /Write
Read /Write
Child objects
3.132.2. Parent class
3.132.3. Properties
Model
Name
Description
Invokes a prototype.
Invokes an external prototype.
Type
String
String
Access
Read /Write
Read /Write
160
Scripting Objects
3.132.4. Methods
None
3
3.133. traverse
The traverse object declares a single link from its container to another object in a unidirectional chain of links.
3.133.1. Hierarchy of objects
Model Child objects
3.133.2. Parent class
3.133.3. Properties
Name
Description
Indicates the digital signature operation to perform when used in
conjunction with the signData object, or the object to link to when
used in conjunction with the traverse object.
Specifies a reference syntax expression defining the node in the data model to which the enclosing container will bind.
Invokes a prototype.
Type
String
String
String
Invokes an external prototype.
String
Access
Read
/Write
Read
/Write
Read
/Write
Read
/Write
161
3.133.4. Methods
None
3.134. ui
The ui object encloses the user interface description of a form object.
3.134.1. Hierarchy of objects
Model Child objects
Scripting Objects
3.134.2. Parent class
3.134.3. Properties
Name
3.134.4. Methods
None
Description
Invokes a prototype.
Invokes an external prototype.
String
String
Type Access
Read /Write
Read /Write
3.135. update
The update object specifies the update current record operation from the data source.
162
Scripting Objects
3.135.1. Hierarchy of objects
3.135.2. Parent class
3.135.3. Properties
Model
None
Child objects
Name
3.135.4. Methods
None
Description
Invokes a prototype.
Invokes an external prototype.
Type
String
String
Access
Read /Write
Read /Write
3.136. uri
The
uri object stores a fully qualified URI for a specific xmlConnection or xsdConnection object.
3.136.1. Hierarchy of objects
Model
None
Child objects
3
163
Scripting Objects
3.136.2. Parent class
3.136.3. Properties
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.136.4. Methods
None
Type
String
String
Access
Read /Write
Read /Write
3.137. user
The user object specifies the user id for the data source (if required for connection).
3.137.1. Hierarchy of objects
3.137.2. Parent class
Model
None
Child objects
164
Scripting Objects
3.137.3. Properties
Name
Description
Invokes a prototype.
Invokes an external prototype.
3.137.4. Methods
None
Type
String
String
Access
Read /Write
Read /Write
3.138. validate
The validate object controls validation of user-supplied data on a form.
The validate object can be activated multiple times during the life of a form.
3.138.1. Hierarchy of objects
Model Child objects
3
3.138.2. Parent class
165
Scripting Objects
3.138.3. Properties
Name
Description
Enables or disables validation warnings.
Controls validation against the display picture clause.
Controls whether a field is mandatory on a form or if it can be left empty.
Controls validation by the enclosed script.
Invokes a prototype.
Invokes an external prototype.
Type
String
String
String
String
String
String
Read
/Write
Read
/Write
Read
/Write
Access
Read
/Write
Read
/Write
Read
/Write
3.138.4. Methods
None
3.139. value
The value object encloses a single unit of data content.
3.139.1. Hierarchy of objects
3.139.2. Parent class
Model
none
Child objects
166
Scripting Objects
3.139.3. Properties
Name
Description
Controls whether a form object is included when the form is printed.
Type
When used with the calculate object, the override property
indicates whether the field allows overrides to occur and disables or enables calculations. When used with the value object, the override property indicates whether a calculation override has occurred.
Boolean
String
Invokes a prototype.
Invokes an external prototype.
String
String
Access
Read /Write
Read /Write
Read /Write
Read /Write
3.139.4. Methods
None
3.140. variables
The variables object is used to hold document variables.
3.140.1. Hierarchy of objects
3.140.2. Parent class
Model
none
Child objects
3
167
Scripting Objects
3.140.3. Properties
Name
Description
Invokes a prototype.
Invokes an external prototype.
Type
String
String
Access
Read
/Write
Read
/Write
3.140.4. Methods
None
3.141. wsdlAddress
The
wsdlAddress object contains the original URL of the WSDL referenced in the wsdlConnection object.
3.141.1. Hierarchy of objects
Child objects
Model
3.141.2. Parent class
3.141.3. Properties
Name
Invokes a prototype.
Description
None
Type
String
Access
Read /Write
168
Scripting Objects
Name
Description
Invokes an external prototype.
3.141.4. Methods
None
Type
String
Access
Read /Write
3
3.142. wsdlConnection
The wsdlConnection object identifies a unique WSDL web services connection.
3.142.1. Hierarchy of objects
Model
effectiveInputPolicy effectiveOutputPolicy
Child objects
3.142.2. Parent class
3.142.3. Properties
Name Description
Specifies the name of a data connection description to use with a particular type of web services connection.
Type
String
Access
Read
/Write
169
Scripting Objects
3.142.4. Methods
Name
Executes a connection.
Description Returns
Boolean
3.143. xfa
The xfa object is the root node for the xfa model.
3.143.1. Hierarchy of objects
3.143.2. Parent class
3.143.3. Properties
Model
Child objects
Name
None
Description
Retrieves the current node, which is the starting node when using
the resolveNode and resolveNodes methods.
Type
Object
Specifies the date/time stamp for this node.
String
Specifies the Universally Unique Identifier (UUID) for this object.
String
Access
Read
Read /Write
Read /Write
170
Scripting Objects
3.143.4. Methods
None
3.144. xmlConnection
The xmlConnection object is used to store a sample XML data connection.
3.144.1. Hierarchy of objects
Model
3.144.2. Parent class
3.144.3. Properties
Child objects
Name
Description Type
Specifies the name of a data connection description to use with a particular type of web services connection.
String
Access
Read
/Write
3.144.4. Methods
None
3.145. xsdConnection
The xsdConnection object stores an XML Schema data connection entry.
3
171
Scripting Objects
3.145.1. Hierarchy of objects
Model Child objects
3.145.2. Parent class
3.145.3. Properties
Name Description
Specifies the name of a data connection description to use with a particular type of web services connection.
Type
String
Access
Read
/Write
3.145.4. Methods
None
172
Scripting Properties
4.
Scripting Properties
4
All properties supported in this scripting environment have read/write access unless otherwise specified.
NOTE
:
Because the form DOM is sparse, nodes only get generated when they are accessed or needed.
Accessing the nodes property is not an accurate way to determine the children or properties of an object.
4.1.
#text
A string of text.
4.1.1.
Syntax
Reference_Syntax.#text.value = "text"
4.1.2.
Values
Type Values
String Any valid string.
4.1.3.
Version
XFA 2.1
4.1.4.
Examples
4.1.5.
JavaScript
TextField1.caption.value.resolveNode("#text").value = "This is a caption.";
4.1.6.
FormCalc
TextField1.caption.value.#text.value = "This is a caption."
173
4.2.
{default}
Represents the actual value stored by an object.
The type and possible values differ depending on the object.
4.2.1.
Syntax
Reference_Syntax = "value"
4.2.2.
Values
Varies
Type
4.2.3.
Applies to
Values differ from object to object.
Values
Model
Also applies to objects derived from the textNodeclass class.
Object
Scripting Properties
174
Scripting Properties
4.2.4.
Version
XFA 2.1
4.3.
access
Controls user access to the contents of a container object, such as a subform.
4.3.1.
Syntax
Reference_Syntax.access = "open | protected | readOnly | nonInteractive"
4.3.2.
Values
4
Type
String
Values
open(default)
Allows updating of a container’s contents and navigation into and out of the container without restriction.
In interactive forms, you can modify the container’s content and tab or otherwise navigate into it. The container produces events.
protected
The processing application prevents the user from making any direct changes to the container’s content.
Indirect changes such as calculations can occur. The container does not participate in the tabbing sequence, though an application may allow the selection of text for clipboard copying. Protected containers do not generate any events.
readOnly
The application does not allow a user to make direct changes to the container's content, but indirect changes such as calculations can occur. The container participates in the tabbing sequence and allows users to view the content. The user can select the container's content for clipboard copying. The container generates a subset of events (those not associated with the user making direct changes to the content).
nonInteractive
The application allows the container’s contents to be loaded from the document, but not updated interactively. Calculations are performed at load time but the container’s contents are not subsequently recalculated. The container’s contents cannot be modified by scripts or web service invocations.
175
Scripting Properties
4.3.3.
Applies to
Model Object
4.3.4.
Version
XFA 2.1
4.3.5.
Examples
4.3.6.
JavaScript
TextField1.access = "readOnly";
4.3.7.
FormCalc
TextField1.access = "readOnly"
R
ELATED LINKS
:
4.4.
accessKey
Specifies an accelerator key that is used by an interactive application to move the input focus to a particular field element.
4.4.1.
Syntax
Reference_Syntax.accessKey = "character"
176
Scripting Properties
4.4.2.
Values
Type
String
Values
The value of this attribute is a single character. When the user synchronously presses the platform-specific modifier key and the single character, the form’s focus shifts to this field. On
Windows systems, the modifier key is the ALT key and on Mac OS systems, it is the OPTION key.
For example, if the form author sets the accessKey of a field to f and a Windows user presses Alt+f, the focus shifts to that field.
When designing forms that include accelerator keys, form designers should instruct the users about the availability of the accelerator keys.
4.4.3.
Applies to
4
Model
4.4.4.
Version
XFA 2.2
4.4.5.
Examples
4.4.6.
JavaScript
TextField1.accessKey = "f";
4.4.7.
FormCalc
TextField1.accessKey = "f"
4.5.
action
Identifies the form nodes that are protected by a document signature.
177
Object
Scripting Properties
4.5.1.
Syntax
Reference_Syntax.action = "include | exclude | all"
4.5.2.
Values
Type
String
Values
include(default)
The document signature protects all the fillable form nodes in the specified collection. This option
the nodes that are protected by the document signature.
exclude
The document signature protects all the fillable form nodes that are not in the specified collection.
identifying the nodes that are protected by the document signature.
all
The document signature protects all the fillable form nodes.
4.5.3.
Applies to
Model Object
4.5.4.
Version
XFA 2.4
4.6.
activity
Specifies the name of the event.
The accompanying ref property must specify an object that can generate the named event.
178
Scripting Properties 4
4.6.1.
Syntax
Reference_Syntax.activity = "change | click | docClose | docReady | enter | exit
| full | initialize | mouseDown | mouseEnter | mouseExit | mouseUp | postExecute
| postPrint | postSave | preExecute | prePrint | preSave | preSubmit | ready | validationState"
4.6.2.
Values
Type
String
Value
change
Occurs when the user performs an action such as pasting text. Here are more examples of actions that trigger the change event:
• With each key-stroke
• When text is pasted
• When a new choice is selected
• When a check box is selected
• When an item is selected click(default)
Occurs when the user clicks in the field. Most systems define click as pressing and releasing the mouse button while not moving the pointer beyond a very small threshold.
docClose
Executes at the very end of processing a form, if, and only if, all form validations complete with no errors. This event comes too late to modify a saved document. The purpose is to provide the ability to generate an exit status or completion message.
docReady
Executes prior to the rendering of the document, but after data binding of the data takes place.
enter
For a field, occurs when the field gains keyboard focus. For a subform or exclusion group, occurs when some field within the subform or exclusion group gains keyboard focus, that is, keyboard focus moves from outside the object to inside it.
enter
For a field, occurs when the field gains keyboard focus. For a subform or exclusion group, occurs when some field within the subform or exclusion group gains keyboard focus, that is, keyboard focus moves from outside the object to inside it.
179
Scripting Properties
Type Value
exit
For a field, occurs when the field loses keyboard focus. For a subform or exclusion group, occurs when all fields within the subform or exclusion group lose keyboard focus, that is, focus moves from inside the object to outside it.
full
Initiates when the form filler attempts to enter more than the maximum allowed amount of content into a field.
initialize
Executes after data binding is complete. A separate event is generated for each instance of the subform in the form model.
mouseDown
Occurs when the user presses the mouse button in the field, but before the button is released.
mouseEnter
Occurs when the user drags the pointer over the field without necessarily pressing the button.
mouseExit
Occurs when the user drags the pointer out of the field without necessarily pressing the button.
mouseUp
Occurs when the user releases the mouse button in the field.
postExecute
Occurs when data is sent to a web service via WSDL, just after the reply to the request has been received and the received data is marshalled in a connectionData object underneath $datasets. A script triggered by this event has the chance to examine and process the received data. After execution of this event, the received data is deleted.
postPrint
Occurs just after the rendered form has been sent to the printer, spooler, or output destination.
postSave
Occurs just after the form has been written out in PDF or XDP format. Does not occur when the data model or some other subset of the form is exported to XDP.
preExecute
Occurs when a request is sent to a web service via WSDL. A script triggered by this event has the chance to examine and alter the data before the request is sent. If the script is marked to be run only at the server, the data is sent to the server with an indication that it should run the associated script before performing the rest of the processing.
preSave
Occurs just before the form data is written out in PDF or XDP format. Does not occur when the data model or some other subset of the form is exported to XDP. XSLT postprocessing, if enabled, occurs after this event.
180
Scripting Properties
Type Value
preSubmit
Occurs when data is submitted to the host via the HTTP protocol. A script triggered by this event can examine and alter the data before it is submitted. If the script is marked to run at the server, the data is sent to the server, with an indication that it should run the associated script before performing the rest of the processing.
ready
Occurs when the model has finished loading.
validationState
Fires when the validation state of a field, subform, or exclusion group changes. The validation state is considered to change when it transitions between a valid and invalid state, or when the test that caused the invalid state changes.
The intended use of the event is to change the appearance of fields when they become valid or invalid.
The
event.target property is populated with the container object whose validation state has
changed.
The event.name property is populated with the activity name (validationState).
When a field, exclusion group or subform is initialized, the validationState event fires immediately following the initialize event for that object.
The event should fire again only when the validation state changes. However, form logic should be robust enough to allow the event to fire even if the validation state has not actually changed.
The validationState event fires only after the validation state has been evaluated for all objects included in the validation operation.
You can determine whether the event target is valid by testing whether the
$event.target.errorText property has a value.
4.6.3.
Applies to
4
Object Model
4.6.4.
Version
XFA 2.1
4.6.5.
Examples
4.6.6.
JavaScript
TextField1.event.activity = "mouseEnter";
181
Scripting Properties
4.6.7.
FormCalc
TextField1.event.activity = "mouseEnter"
4.7.
addRevocationInfo
Specifies whether the certificate status is checked when a digital signature is signed. The certificate status can be checked against a certificate revocation list (CRL) or an Online Certificate Status
Protocol (OCSP) response.
The signing party must have access to the Internet to retrieve the CRL or OCSP response from the appropriate server.
The addRevocationInfo property does not have a default value so that Acrobat can override it if the value is not specified.
4.7.1.
Syntax
Reference_Syntax.addRevocationInfo = "required | optional | none"
4.7.2.
Values
Type
String
Values
Required
Checking the certificate status is required.
Optional
Checking the certificate status is optional.
None
A CRL or OCSP response is not included in the digital signature.
4.7.3.
Applies to
Model
Object
182
Scripting Properties
4.7.4.
Version
XFA 2.5
4
4.8.
after (deprecated)
Specifies the constraints on moving to a new page or content area after rendering the subform.
As of XFA version 2.8, this property is now deprecated. See breakAfter.
4.8.1.
Syntax
Reference_Syntax.after = "auto | contentArea | pageArea | pageEven | pageFront | pageOdd"
183
Scripting Properties
4.8.2.
Values
Type
String
Values
The behaviors described below can be further refined by optionally specifying a destination page or
content area via the afterTarget(deprecated) property.
auto(default)
The determination of a transition to a new page or content area will be delegated to the processing application. No transition to a new page or content area will be forced.
contentArea
Rendering will transition to the next available content area.
pageArea
Rendering will transition to a new page.
pageBack
When duplexing, rendering will transition to the next available back surface, potentially causing an intervening page surface to be printed. If duplexing is not in effect, rendering will transition to a new page.
pageEven
Rendering will transition to the next available even-numbered page, potentially causing intervening numbered or unnumbered pages to be printed. This behavior does not require duplexing.
pageFront
When duplexing, rendering will transition to the next available front surface, potentially causing an intervening page surface to be printed. If duplexing is not in effect, rendering will transition to a new page.
pageOdd
Rendering will transition to the next available odd numbered page, potentially causing intervening numbered or unnumbered pages to be printed. This behavior does not require duplexing.
4.8.3.
Applies to
Model
Object
4.8.4.
Version
XFA 2.1
184
Scripting Properties
4.8.5.
Examples
4.8.6.
JavaScript
Subform1.break.after = "pageOdd";
4.8.7.
FormCalc
Subform1.break.after = "pageOdd"
4.9.
afterTarget (deprecated)
Specifies the explicit destination page or content area for the
As of XFA version 2.8, this property is now deprecated. See breakAfter.target.
4.9.1.
Syntax
Reference_Syntax.afterTarget = "auto | contentArea | pageArea | pageEven | pageFront | pageOdd"
4.9.2.
Values
4
Type
String
Values
page area and the afterTargetproperty to reference a content area, or vice versa.
4.9.3.
Applies to
Model
Object
185
Scripting Properties
4.9.4.
Version
XFA 2.1
4.9.5.
Examples
4.9.6.
JavaScript
Subform1.break.afterTarget = "pageEven";
4.9.7.
FormCalc
Subform1.break.afterTarget = "pageEven"
4.10. aliasNode
Specifies the object that is represented by the alias for this model.
4.10.1. Syntax
Reference_Syntax.aliasNode = "object"
4.10.2. Values
Type
Object
Values
The object within the model referenced by the reference syntax for that model. In the case of the form
model, the alias node would be the form object.
For more information about reference syntax expressions, see ReferencingObjects in Calculations and
Scripts.
4.10.3. Applies to
186
Scripting Properties
4.10.4. Version
XFA 2.1
4.10.5. Examples
4.10.6. JavaScript
xfa.aliasNode = "form";
4.10.7. FormCalc
xfa.aliasNode = "form"
4.11. all
Returns a collection of like-named, in-scope nodes.
If the node has no name, a like-class named collection is returned.
4.11.1. Syntax
Reference_Syntax.all = "object(s)"
4.11.2. Values
Object
Type
4.11.3. Applies to
An object or a collection of objects.
Values
187
4
Scripting Properties
4.11.4. Version
XFA 2.1
4.11.5. Examples
4.11.6. JavaScript
Subform1.all;
4.11.7. FormCalc
Subform1.all
4.12. allowMacro
Specifies whether to permit the processing application to optimize output by generating a printer macro for all of the subform’s draw content.
4.12.1. Syntax
Reference_Syntax.allowMacro = "1 | 0"
4.12.2. Values
Type
String
Values
1(default)
The processing application is permitted to utilize a printer macro for this subform.
0
The processing application cannot utilize a printer macro for this subform.
188
Scripting Properties
4.12.3. Applies to
4
Model
4.12.4. Version
XFA 2.1
4.12.5. Examples
4.12.6. JavaScript
Subform1.allowMacro = "0";
4.12.7. FormCalc
Subform1.allowMacro = "0"
Object
4.13. allowNeutral
Specifies whether the check box or radio button can support an additional third state that represents a neutral value.
4.13.1. Syntax
Reference_Syntax.allowNeutral = "0 | 1"
189
Scripting Properties
4.13.2. Values
Type
String
Values
0(default)
The check box or radio button supports two states representing true or false.
1
The check box or radio button supports three states. These are true, false, or neutral.
4.13.3. Applies to
Model Object
4.13.4. Version
XFA 2.1
4.13.5. Examples
4.13.6. JavaScript
CheckBox1.resolveNode("ui.#checkButton").allowNeutral = "1";
4.13.7. FormCalc
CheckBox1.ui.#checkButton.allowNeutral = "1"
4.14. allowRichText
Specifies whether the text can include styling (also known as rich text).
190
Scripting Properties 4
NOTE
:
The allowRichText property only relays styling information to the application interface.
The setting of this property in no way restricts a user from inputting plain text markup that includes styling information. For example, regardless of the setting of this property, a user could type:
<b>hello</b>
4.14.1. Syntax
Reference_Syntax.allowRichText = "0 | 1"
4.14.2. Values
Type
String
Values
0(default)
Text styling is invalid. This is the default when the textEdit object does not contain an exData object.
1
Text styling is valid. This is the default when the textEdit object does contain an exData object.
4.14.3. Version
XFA 2.1
Model Object
4.14.4. Examples
4.14.5. JavaScript
TextField1.resolveNode("ui.#textEdit").allowRichText = "1";
4.14.6. FormCalc
TextField1.ui.#textEdit.allowRichText = "1"
191
Scripting Properties
4.15. anchorType
Specifies the location of the container’s anchor point when it is placed by using a positioned layout strategy.
4.15.1. Syntax
Reference_Syntax.anchorType = "topLeft | topCenter | topRight | middleLeft | middleCenter | middleRight | bottomLeft | bottomCenter | bottomRight"
4.15.2. Values
String
Type
topLeft(default)
Top left corner of the container.
topCenter
Center of the top edge of the container.
topRight
Top right corner of the container.
middleLeft
Middle of the left edge of the container.
middleCenter
Middle of the container.
middleRight
Middle of the right edge of the container.
bottomLeft
Bottom left corner of the container.
bottomCenter
Center of the bottom edge of the container.
bottomRight
Bottom right corner of the container.
Values
192
Scripting Properties
4.15.3. Applies to
4
Model Object
4.15.4. Version
XFA 2.1
4.15.5. Examples
4.15.6. JavaScript
TextField1.anchorType = "bottomRight";
4.15.7. FormCalc
TextField1.anchorType = "bottomRight"
4.16. appType
Specifies the name of the client application in which a form currently exists.
The appType property calls the viewerType property from the Acrobat JavaScript object model and returns the corresponding value for the client application in which the form exists. For example, in the context of a PDF form viewed in Adobe Reader, this property returns
Reader.
For more information on the viewerType property, and the values it returns, see the JavaScript for Acrobat API Reference.
4.16.1. Syntax
Reference_Syntax.appType
193
Scripting Properties
4.16.2. Values
Type
String
Values
A valid string representing the name of the current hosting client application.
4.16.3. Applies to
Model Object
4.16.4. Version
XFA 2.1
4.16.5. Examples
4.16.6. JavaScript
xfa.host.appType;
4.16.7. FormCalc
xfa.host.appType
4.17. archive
Specifies the URI location of an archive file that may contain program code related to the exObject object.
194
Scripting Properties
4.17.1. Syntax
Reference_Syntax.archive = "URI"
4.17.2. Values
String
Type
4.17.3. Applies to
A fully qualified URI value.
Values
Model Object
4.17.4. Version
XFA 2.1
4.18. aspect
Specifies how the image is to map to the nominal content region of the image’s container.
4.18.1. Syntax
Reference_Syntax.aspect = "fit | none | actual | width | height"
4
195
Scripting Properties
4.18.2. Values
Type
String
Values
fit(default)
The application scales the image proportionally to the maximum size of the container’s content region.
none
The application scales the image to the size of entire container’s content region. This may result in different scale values being applied to the image's X and Y coordinates.
actual
The image is rendered using the dimensions stored in the image content. The extent of the container’s region does not affect the sizing of the image.
width
The application scales the image proportionally to the width of the container’s content region. The image might be taller or shorter than the content region.
height
The application scales the image proportionally to the height of the container’s content region. The image might be wider or narrower than the content region.
4.18.3. Applies to
Model Object
4.18.4. Version
XFA 2.1
4.18.5. Examples
4.18.6. JavaScript
ImageField1.resolveNode("value.#image").aspect = "actual";
196
Scripting Properties
4.18.7. FormCalc
ImageField1.value.#image.aspect = "actual"
4
4.19. baselineShift
Specifies a positive measurement that shifts a font up from the baseline or a negative measurement that shifts a font down from the baseline.
4.19.1. Syntax
Reference_Syntax.baselineShift = "0in | measurement"
4.19.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.19.3. Applies to
Model Object
4.19.4. Version
XFA 2.1
197
Scripting Properties
4.19.5. Examples
4.19.6. JavaScript
TextField1.font.baselineShift = "-5pt";
4.19.7. FormCalc
TextField1.font.baselineShift = "-5pt"
4.20. before (deprecated)
Specifies the constraints on moving to a new page or content area before rendering the subform.
As of XFA version 2.8, this property is now deprecated. See breakBefore.
4.20.1. Syntax
Reference_Syntax.before = "auto | contentArea | pageArea | pageBack | pageEven | pageFront | pageOdd"
198
Scripting Properties
4.20.2. Values
Type
String
Values
The behaviors described below can be further refined by optionally specifying a destination page or
content area using the beforeTarget(deprecated) property. The startNew property also modifies some
of these behaviors: auto(default)
The determination of a transition to a new page or content area is delegated to the processing application. No transition to a new page or content area is forced.
contentArea
Rendering transitions to the next available content area. See also the startNew property.
pageArea
Rendering transitions to a new page. See also the startNew property.
pageBack
When duplexing, rendering transitions to the next available back surface, potentially causing an intervening page surface to print. If duplexing is not in effect, rendering transitions to a new page. Note that pageBack, unlike pageEven, is not affected by page numbering.
pageEven
Rendering transitions to the next available even numbered page, potentially causing intervening numbered or unnumbered pages to print. This behavior does not require duplexing.
pageFront
When duplexing, rendering transitions to the next available front surface, potentially causing an intervening page surface to be printed. If duplexing is not in effect, rendering will transition to a new page. Note that pageFront, unlike pageOdd, is not affected by page numbering.
pageOdd
Rendering transitions to the next available odd numbered page, potentially causing intervening numbered or unnumbered pages to print. This behavior does not require duplexing.
4.20.3. Applies to
Object
4.20.4. Version
XFA 2.1
199
Model
4
Scripting Properties
4.20.5. Examples
4.20.6. JavaScript
Subform1.break.before = "contentArea";
4.20.7. FormCalc
Subform1.break.before = "contentArea"
4.21. beforeTarget (deprecated)
Specifies the explicit destination page or content area for the before(deprecated) property.
As of XFA version 2.8, this property is now deprecated. See breakBefore.target.
4.21.1. Syntax
Reference_Syntax.beforeTarget = "auto | contentArea | pageArea | pageEven | pageFront | pageOdd"
4.21.2. Values
Type
String
Values
The value of the beforeTarget property is expected to be compatible with the value of the
property to have a value of pageArea and the beforeTargetproperty to reference a content area, or vice versa.
4.21.3. Applies to
Model
Object
200
Scripting Properties
4.21.4. Version
XFA 2.1
4.21.5. Examples
4.21.6. JavaScript
Subform1.break.beforeTarget = "#contentArea_ID";
4.21.7. FormCalc
Subform1.break.beforeTarget = "#contentArea_ID"
4
4.22. bind
Specifies the name of a unique binding ID where columns from the data source specified by the from
property are bound.
4.22.1. Syntax
Reference_Syntax.bind = "string"
4.22.2. Values
String
Type
4.22.3. Applies to
A valid string representing a binding ID.
Values
Model
201
Object
Scripting Properties
4.22.4. Version
XFA 2.1
4.23. binding
Identifies the type of application to which the script is directed.
4.23.1. Syntax
Reference_Syntax.binding = "XFA | Application_type"
4.23.2. Values
Type
String
Values
•
XFA(default)
• Any other valid application type.
The script is to be applied by standard application.
• Any other valid application type.
Any value other than
XFAsignifies that the script may be ignored by standard applications.
4.23.3. Applies to
Model Object
4.23.4. Version
XFA 2.1
202
Scripting Properties
4.23.5. Examples
4.23.6. JavaScript
TextField1.resolveNode("#event.#script").binding = "XFA";
4.23.7. FormCalc
TextField1.#event.#script.binding = "XFA"
4
4.24. blank (deprecated)
Specifies whether the page area is intended to be blank and therefore may result in special treatment by the output device.
4.24.1. Syntax
Reference_Syntax.blank = "0 | 1"
4.24.2. Values
Type
String
Values
•
0(default)
•
1
The page area is not intended to be blank, and any content is rendered.
•
1
The page area is intended to be blank, and may be subject to special treatment by the output device.
For example, a printer may charge the user on a per-printed-page basis. The user does not wish to be charged for blank backsides of printed pages on a duplexed job. This property permits the blank backsides of the document to be marked blank with the result that the processing application must not render any content on the backside and the printer may receive special instructions to ensure that the blank backside is not counted towards the user’s charges.
203
Scripting Properties
4.24.3. Applies to
Model Object
4.24.4. Version
XFA 2.1
4.24.5. Examples
The reference syntax expression will vary, depending on the object from which it is invoked.
4.24.6. JavaScript
xfa.form.form1.pageSet.Page1.blank;
4.24.7. FormCalc
xfa.form.form1.pageSet.Page1.blank
4.25. blankOrNotBlank
Specifies whether the page area is intended to be blank and therefore may result in special treatment by the output device.
4.25.1. Syntax
Reference_Syntax.blankOrNotBlank = "any | blank | notBlank"
204
Scripting Properties
4.25.2. Values
Type
String
Values
• any(default)
• blank
• notBlank
Matches any blank or non-blank page.
• blank
• notBlank
Matches a page which is inserted by a break-to-even page while on an even page, or a break-to-odd page while on an odd page.
• notBlank
Matches any page inserted either to hold content or to meet minimum occurrence rules.
4.25.3. Applies to
4
Model Object
4.25.4. Version
XFA 2.5
4.25.5. Examples
The reference syntax expression will vary, depending on the object from which it is invoked.
4.25.6. JavaScript
xfa.form.form1.pageSet.Page1.blankOrNotBlank = "notBlank";
205
Scripting Properties
4.25.7. FormCalc
xfa.form.form1.pageSet.Page1.blankOrNotBlank = "notBlank"
4.26. bofAction
Specifies the action to perform if the current record is the first record in the record set.
4.26.1. Syntax
Reference_Syntax.bofAction = "moveLast | stayEOF"
4.26.2. Values
String
Type
4.26.3. Applies to
Values
• moveLast(default)
• stayEOF
Moves the current record position to a point after the last record.
• stayEOF
The current record will always be the last record in the record set.
Model Object
4.26.4. Version
XFA 2.1
206
Scripting Properties
4.27. bookendLeader (deprecated)
4
(bookendLeader)Specifies a subform to place into the current content area or page before any other content.
If both the
bookendLeader and bookendTrailer(deprecated) properties are supplied, the two
subforms surround the content like bookends.
As of XFA version 2.8, this property is now deprecated. See leader.
4.27.1. Syntax
Reference_Syntax.bookendLeader = "string"
4.27.2. Values
Type
String
Values
A valid string representing the name or fully qualified reference syntax expression of a subform.
4.27.3. Applies to
Model Object
4.27.4. Version
XFA 2.1
4.27.5. Examples
4.27.6. JavaScript
Subform1.break.bookendLeader = "xfa.form.form1.Subform2";
207
Scripting Properties
4.27.7. FormCalc
Subform1.break.bookendLeader = "xfa.form.form1.Subform2"
4.28. bookendTrailer (deprecated)
Identifies a subform to place into the current content area or page after any other content.
If both bookendLeader(deprecated) and
bookendTrailer properties are supplied, the two subforms surround the content like bookends.
As of XFA version 2.8, this property is now deprecated. See trailer.
4.28.1. Syntax
Reference_Syntax.bookendTrailer = "string"
4.28.2. Values
Type
String
Values
A valid string representing the name or fully qualified reference syntax expression of a subform.
4.28.3. Applies to
Model
Object
4.28.4. Version
XFA 2.1
208
Scripting Properties
4.28.5. Examples
4.28.6. JavaScript
Subform1.break.bookendTrailer = "xfa.form.form1.Subform2";
4.28.7. FormCalc
Subform1.break.bookendTrailer = "xfa.form.form1.Subform2"
4.29. borderColor
Specifies the border color value for this field.
A border must be defined before you can change the color by scripting.
4.29.1. Syntax
Reference_Syntax.borderColor = " [0-255], [0-255], [0-255]"
4.29.2. Values
Type
String
Values
For the color-space of SRGB, the component values must be r,g,b, where r is the red component value, g is the green component value, and b is the blue component value. Each component value must be in the range 0 through 255, inclusive. 255 represents maximum display intensity. For example, 255,0,0 specifies the color red.
The default is dependent upon the context of where the color is used; the default color is determined by the object enclosing the color object.
4
209
4.29.3. Applies to
Model
4.29.4. Version
XFA 2.1
4.29.5. Examples
4.29.6. JavaScript
TextField1.borderColor = "125,154,125";
4.29.7. FormCalc
TextField1.borderColor = "125,154,125"
4.30. borderWidth
Specifies the border width for this field.
4.30.1. Syntax
Reference_Syntax.borderWidth = "0in | measurement"
Object
Scripting Properties
210
Scripting Properties
4.30.2. Values
String
Type
•
0in (default)
• Any valid measurement.
Values
4.30.3. Applies to
Model
4.30.4. Version
XFA 2.1
4.30.5. Examples
4.30.6. JavaScript
TextField1.borderWidth = "0.05in";
4.30.7. FormCalc
TextField1.borderWidth = "0.05in"
4.31. bottomInset
Specifies the size of the bottom inset.
Object
211
4
Scripting Properties
4.31.1. Syntax
Reference_Syntax.bottomInset = "0in | measurement"
4.31.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.31.3. Applies to
Model
4.31.4. Version
XFA 2.1
4.31.5. Examples
4.31.6. JavaScript
Subform1.margin.bottomInset = "1in";
4.31.7. FormCalc
Subform1.margin.bottomInset ="1in"
Object
4.32. break
Describes the constraints on moving to a new page or content area after rendering an object.
212
Scripting Properties 4
4.32.1. Syntax
Reference_Syntax.break = "close | open"
NOTE
:
If you use JavaScript, and you want to set the break property for a border child object of a
this instance, the syntax is as follows:
Reference_Syntax.setAttribute = ("close | open", "break")
4.32.2. Values
Values
String
Type
• close(default)
• open
4.32.3. Applies to
Model
4.32.4. Version
XFA 2.1
4.32.5. Examples
4.32.6. JavaScript
Subform1.border.setAttribute("open", "break");
4.32.7. FormCalc
Subform1.border.break = "open"
Object
213
4.33. calculationsEnabled
Specifies whether calculate scripts will execute.
4.33.1. JavaScript Syntax
Reference_Syntax.calculationsEnabled = false | true;
- or -
Reference_Syntax.calculationsEnabled = 0 | 1;
4.33.2. FormCalc Syntax
Reference_Syntax.calculationsEnabled = 0 | 1
4.33.3. Values
Boolean
Type
4.33.4. Applies to
4.33.5. Version
XFA 2.1
Model
• true | 1(default)
• false | 0
The calculate scripts execute.
• false | 0
The calculate scripts do not execute.
Values
Object
Scripting Properties
214
Scripting Properties
4.33.6. Examples
4.33.7. JavaScript
xfa.host.calculationsEnabled = 1;
4.33.8. FormCalc
xfa.host.calculationsEnabled = 1
4.34. cancelAction
Specifies whether to cancel a forthcoming action. This property applies only to the following scripting events: prePrint, preSubmit, preExecute, preOpen, and preSign.
4.34.1. JavaScript Syntax
Reference_Syntax.cancelAction = false | true;
- or -
Reference_Syntax.cancelAction = 0 | 1;
4.34.2. FormCalc Syntax
Reference_Syntax.cancelAction = 0 | 1
4
215
Scripting Properties
4.34.3. Values
Type
Boolean
Values
• false | 0(default)
• true | 1
• preOpen- The drop-down list does not expand to display the list of values.
• preSubmit- Form submission does not occur.
• preSign- The form is not digitally signed.
• prePrint- No print dialog boxappears, and the form is not printed.
The user action, such as printing, submitting, or digitally signing, occurs as expected.
• true | 1
• preOpen- The drop-down list does not expand to display the list of values.
• preSubmit- Form submission does not occur.
• preSign- The form is not digitally signed.
• prePrint- No print dialog boxappears, and the form is not printed.
The user action, such as printing, submitting, or digitally signing, does not occur. The user experience is determined by the scripting event that contains the cancelAction reference:
• preOpen- The drop-down list does not expand to display the list of values.
• preSubmit- Form submission does not occur.
• preSign- The form is not digitally signed.
• prePrint- No print dialog boxappears, and the form is not printed.
4.34.4. Applies to
Object
Model
4.34.5. Version
XFA 2.8
216
Scripting Properties
4.34.6. Examples
4.34.7. JavaScript
xfa.event.cancelAction = 1;
4.34.8. FormCalc
xfa.event.cancelAction = 1
4.35. cap
Specifies the rendered termination of the stroke.
Strokes that form an enclosed area do not have a rendered termination. In particular, all rectangle and border edges, as well as all 360-degree arc edges, are not considered to have any termination.
Arcs with sweep angles less than 360 degrees and lines do have terminations at both endpoints.
4.35.1. Syntax
Reference_Syntax.cap = "square | butt | round"
4
217
Scripting Properties
4.35.2. Values
Type
String
Values
• square(default)
• butt
• round
The stroke terminates by rendering the end of the edge squarely beyond the edge’s endpoint a distance equal to one-half the edge’s thickness.
• butt
• round
The stroke terminates by rendering the end of the edge squarely across the endpoint.
• round
The stroke terminates by rendering the end of the edge with a semi-circle at the edge’s endpoint, having a radius equal to one-half the edge’s thickness.
4.35.3. Applies to
Model
4.35.4. Version
XFA 2.1
4.35.5. Examples
4.35.6. JavaScript
Line1.resolveNode("value.#line.edge").cap = "round";
4.35.7. FormCalc
Line1.value.#line.edge.cap = "round"
Object
218
Scripting Properties
4.36. change
4
Specifies the value that a user types or pastes into a field immediately after they perform the action.
4.36.1. Syntax
Reference_Syntax.change
4.36.2. Values
Type
String
Values
Any valid string value appropriate for a particular form field.
4.36.3. Applies to
Object
Model
4.36.4. Version
XFA 2.1
4.36.5. Examples
4.36.6. JavaScript
xfa.event.change;
4.36.7. FormCalc
xfa.event.change
219
Scripting Properties
4.37. charEncoding
Specifies the character encoding of the value that is encoded into a barcode.
The value of the barcode field is serialized into a sequence of bytes according to the specified char-
acter encoding. Then it is compressed if the dataPrep property requires it and encrypted if
the encryptobject is present. Finally, it is encoded according to the symbology.
NOTE
:
The value of this property is case-insensitive and must match one of the following values.
4.37.1. Syntax
Reference_Syntax.charEncoding = "UTF-8 | none | ISO-8859-1 | ISO-8859-2 |
SO-8859-7 | SHift-JIS | KSC-5601 | Big-Five | GB-2312 | UTF-16 | UCS-2 | fontSpecific"
220
Scripting Properties
4.37.2. Values
Type
String
Values
•
UTF-8 (default)
The characters are encoded using Unicode code points as defined by Unicode, and UTF-8 serialization as defined by ISO/IEC 10646.
• none
No special encoding is specified. The characters are encoded using the ambient encoding for the operating system.
•
ISO-8859-1
The characters are encoded using ISO-8859-1, also known as Latin-1.
•
ISO-8859-2
The characters are encoded using ISO-8859-2. I
•
SO-8859-7
The characters are encoded using ISO-8859-7.
•
Shift-JIS
The characters are encoded using JIS X 0208, more commonly known as Shift-JIS.
•
KSC-5601
The characters are encoded using the Code for Information Interchange (Hangul and Hanja).
•
Big-Five
The characters are encoded using Traditional Chinese (Big-Five). There is no official standard for
Big-Five and several variants are in use. The Adobe form object model uses the variant implemented by Microsoft
®
as code.
•
GB-2312
The characters are encoded using Simplified Chinese.
•
UTF-16
The characters are encoded using Unicode code points as defined by Unicode, and UCS-16 serialization as defined by ISO/IEC 10646.
•
UCS-2
The characters are encoded using Unicode code points as defined by Unicode, and UTF-2 serialization as defined by ISO/IEC 10646.
• fontSpecific
4
221
Scripting Properties
4.37.3. Applies to
Model Object
4.37.4. Version
XFA 2.4
4.37.5. Examples
4.37.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").charEncoding = "UCS-2";
4.37.7. FormCalc
Code11BarCode1.ui.#barcode.charEncoding = "UCS-2"
4.38. checksum
Specifies an algorithm for the checksum to insert into the barcode.
The calculation of the checksums is based on the barcode data.
The template model allows any one of the choices listed below. However, some barcode formats either require a particular checksum or never allow a checksum. For such barcodes, the checksum property is ignored. Some of the remaining barcode formats support only a limited subset of these choices. For such barcodes, the template model does not specify an unsupported choice.
4.38.1. Syntax
Reference_Syntax.checksum = "none | auto | 1mod10 | 2mod10 | 1mod10_1mod11"
222
Scripting Properties
4.38.2. Values
Type
String
Values
• none(default)
• auto
•
1mod10
•
2mod10
•
1mod10_1mod11
Do not insert a checksum.
• auto
•
1mod10
•
2mod10
•
1mod10_1mod11
Insert the default checksum for the barcode format.
•
1mod10
•
2mod10
•
1mod10_1mod11
Insert a 1 modulo 10 checksum.
•
2mod10
•
1mod10_1mod11
Insert a 2 modulo 10 checksum.
•
1mod10_1mod11
Insert a 1 modulo 10 checksum followed by a 1 modulo 11 checksum.
1 modulo 10, 2 modulo 10, and 1 modulo 11 are barcode standards. Refer to documentation on those standards for more information on those barcodes.
4.38.3. Applies to
Model Object
4
223
Scripting Properties
4.38.4. Version
XFA 2.1
4.38.5. Examples
4.38.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").checksum = "2mod10";
4.38.7. FormCalc
Code11BarCode1.ui.#barcode.checksum = "2mod10"
4.39. circular
Enables you to convert an arc into a circle.
4.39.1. JavaScript Syntax
Reference_Syntax.circular = false | true;
- or -
Reference_Syntax.circular = 0 | 1;
4.39.2. FormCalc Syntax
Reference_Syntax.circular = 0 | 1
224
Scripting Properties
4.39.3. Values
Type
Boolean
Values
• false | 0(default)
• true | 1
Do not adjust the arc to a circular path.
• true | 1
Adjust the arc to a circular path.
You can convert an arc into a circle even if the content area where the arc is located is not square. If necessary, the size of the circle is adjusted to match the size of the content area.
4.39.4. Applies to
Object Model
4.39.5. Version
XFA 2.1
4.39.6. Examples
4.39.7. JavaScript
Circle1.resolveNode("value.#arc").circular = 1;
4.39.8. FormCalc
Circle1.value.#arc.circular = 1
4
225
Scripting Properties
4.40. classAll
Returns a collection of like-class, in-scope nodes.
NOTE
:
This property is read only.
4.40.1. Syntax
Reference_Syntax.classAll = "objects"
4.40.2. Values
Type
Object
Values
A set of objects derived from the same class as the current object and also within the same scope.
4.40.3. Applies to
4.40.4. Version
XFA 2.1
4.40.5. Examples
4.40.6. JavaScript
Subform1.classAll;
4.40.7. FormCalc
Subform1.classAll
226
Scripting Properties
4.41. classId
Specifies a URI name or location for the program code represented by the object.
4.41.1. Syntax
Reference_Syntax.classId = "URI"
4.41.2. Values
Values
String
Type
4.41.3. Applies to
Any fully qualified URI value.
Model Object
4.41.4. Version
XFA 2.1
4.42. classIndex
Returns the position of this object in its collection of like-class, in-scope objects.
NOTE
:
This property is read only.
4.42.1. Syntax
Reference_Syntax.classIndex = "integer"
227
4
Scripting Properties
4.42.2. Values
Type
Integer
Values
An integer representing the 0 based index position of the current object in relation to the set of objects in the same scope that derive from the same class.
4.42.3. Applies to
4.42.4. Version
XFA 2.1
4.42.5. Examples
4.42.6. JavaScript
Subform1.classIndex;
4.42.7. FormCalc
Subform1.classIndex
4.43. className
Determines the name of the class of this object.
NOTE
:
This property is read only.
4.43.1. Syntax
Reference_Syntax.className = "string"
228
Scripting Properties
4.43.2. Values
Type
String
Values
A valid string representing the name of the class of the particular object.
4.43.3. Applies to
4.43.4. Version
XFA 2.1
4.43.5. Examples
4.43.6. JavaScript
Subform1.className;
4.43.7. FormCalc
Subform1.className
4.44. codeBase
Specifies a URI location that can be used to assist the resolution of a relative classId property.
4.44.1. Syntax
Reference_Syntax.codeBase = "URI"
4
229
Scripting Properties
4.44.2. Values
String
Type
4.44.3. Applies to
A fully qualified URI value.
Values
Model Object
4.44.4. Version
XFA 2.1
4.45. codeType
Specifies an identifier corresponding to a MIME type that identifies the program code represented by the object.
4.45.1. Syntax
Reference_Syntax.codeType = "MIME-type"
4.45.2. Values
Type
String
Values
A valid MIME-type identifier. For example application/java.
230
Scripting Properties
4.45.3. Applies to
Model Object
4.45.4. Version
XFA 2.1
4.46. colSpan
Specifies the number of columns spanned by this object when used inside a subform with a layout type of row.
4.46.1. Syntax
Reference_Syntax.colSpan = "1 | integer"
4.46.2. Values
String
Type
•
1(default)
• Any valid integer value.
Values
4
231
Scripting Properties
4.46.3. Applies to
Model Object
4.46.4. Version
XFA 2.1
4.46.5. Examples
4.46.6. JavaScript
StaticText1.colSpan = "1";
4.46.7. FormCalc
StaticText1.colSpan = "1"
4.47. columnWidths
Specifies the widths for columns of a table.
The
columnWidth property is ignored unless the layout property is set to table.
4.47.1. Syntax
Reference_Syntax.columnWidth = "measurement | -1 [, [, measurement | -1 ] ]"
232
Scripting Properties
4.47.2. Values
Type
String
Values
The value of this property is a set of space-separated tokens. Each token must be a valid measurement or
-1. The presence of a measurement causes the corresponding column to be set to that width. The presence of
-1causes the corresponding column to grow to the width of the widest content for that column across all rows of the table.
4.47.3. Applies to
Object
4
Model
4.47.4. Version
XFA 2.1
4.47.5. Examples
4.47.6. JavaScript
Subform1.columnWidths = ".5in 1.5in";
4.47.7. FormCalc
Subform1.columnWidths = ".5in 1.5in"
4.48. commandType
Specifies the type of command used by a data query.
233
Scripting Properties
4.48.1. Syntax
Reference_Syntax.commandType = "unknown | text | table | storedProc"
4.48.2. Values
Type
String
Values
• unknown(default)
• text
• table
• storedProc
An explicit SQL query string that is not saved under a name in the database.
• table
• storedProc
A table stored in the database.
• storedProc
A query, such as a SQL query, created to query one or more tables in the database and then saved as a named query within the database.
4.48.3. Applies to
Model
4.48.4. Version
XFA 2.1
4.48.5. Examples
In these examples,
Titles represents the data connection name.
Object
234
Scripting Properties
4.48.6. JavaScript
xfa.sourceSet.Titles.nodes.item(1).query.setAttribute("text", "commandType");
4
4.48.7. FormCalc
xfa.sourceSet.Titles.nodes.item(1).query.setAttribute("text", "commandType")
4.49. commitKey
Describes how the current value of a form field was set by the user.
4.49.1. Syntax
Reference_Syntax.commitKey = "0 | 1 | 2 | 3"
235
Scripting Properties
4.49.2. Values
Type
Integer
Values
• 0 (default)
•
1
•
2
•
3
The value was not set (for example, if the user presses the escape key prior to the form field losing focus).
•
1
•
2
•
3
The value is set when a user left-clicks outside the field.
•
2
•
3
The value is set when a user presses the enter key.
•
3
The value is set when a user tabs to a new field.
4.49.3. Applies to
Object
4.49.4. Version
XFA 2.1
Model
236
Scripting Properties
4.49.5. Examples
4.49.6. JavaScript
xfa.event.commitKey = "2";
4.49.7. FormCalc
xfa.event.commitKey = "2"
4.50. commitOn
Specifies when a user’s selections are propagated to the data model.
4.50.1. Syntax
Reference_Syntax.commitOn = "select | exit"
4.50.2. Values
Type
String
Values
• select
• exit
The selected data is written to the data model when a user selects a choice list entry by using the keyboard or mouse.
Having a choice list commit data as soon as selections are made may be important in forms that contain non-XFA interactive features, such as Acrobat annotations or hypertext links. People filling out such forms may mistakenly believe that selecting an item from a choice list followed by clicking a non-XFA interactive feature is the same as exiting the checklist. In fact, the check list remains the field in focus.
• exit
The selected data is not written to the data model until the field loses focus. This is the recommended setting for choice lists that support multiple selections (open="multiSelect").
4
237
4.50.3. Applies to
Model Object
4.50.4. Version
XFA 2.2
4.50.5. Examples
4.50.6. JavaScript
DropDownList1.resolveNode("ui.#choiceList").commitOn = "exit";
4.50.7. FormCalc
DropDownList1.ui.#choiceList.commitOn = "exit"
4.51. connection
Specifies the name of the associated connection control in the connection set.
The connection named by this property must point to a web service.
4.51.1. Syntax
Reference_Syntax.connection = "string"
Scripting Properties
238
Scripting Properties
4.51.2. Values
Type
String
Values
A valid string representing the name of the associated connection object in the connection set. If this property is missing or empty the connection name defaults to the name of the containing subform.
4.51.3. Applies to
4
Model Object
4.51.4. Version
XFA 2.4
4.51.5. Examples
4.51.6. JavaScript
TextField1.resolveNode("#connect").connection = "DataConnection";
4.51.7. FormCalc
TextField1.#connect.connection = "DataConnection"
4.52. contains
Determines whether a data value should be included in value of the parent object or as a property of the parent.
239
4.52.1. Syntax
Reference_Syntax.contains = "data | metaData"
4.52.2. Values
String
Type Values
• data(default)
• metaData
Value is included in the value of the parent object
• metaData
Value is a property of the parent object.
4.52.3. Applies to
Model
4.52.4. Version
XFA 2.1
4.53. content
Specifies the content of the object.
4.53.1. Syntax
Reference_Syntax.content = "string"
Object
Scripting Properties
240
Scripting Properties
4.53.2. Values
Type
String
Values
A valid string representing the content of the object. For packets that contain XML content, this should return an empty string.
4.53.3. Applies to
4
Model
4.53.4. Version
XFA 2.1
4.53.5. Examples
4.53.6. JavaScript
xfa.packet.content = "";
4.53.7. FormCalc
xfa.packet.content = ""
Object
4.54. contentType
Specifies the type of content in the referenced document, expressed as a MIME type.
4.54.1. Syntax
Reference_Syntax.contentType = "text/plain | application/x-formcalc | Mime-type"
241
Scripting Properties
4.54.2. Values
Type
String
Values
The following values are allowed for documents containing text:
• text/plain(default)
• application/x-formcalc
• Any valid MIME-type.
Unadorned text. The application may accept content that does not conform strictly to the requirements of the MIME type.
• application/x-formcalc
• Any valid MIME-type.
A FormCalc script.
• Any valid MIME-type.
Support for other text types, such as text/htmlas well as scripting types such as application/x-ecmascriptis implementation-defined.
When the referenced document is an image, a suitable MIME-type must be supplied for this property to tell the application that the content is an image. However, the application is free to override the supplied value if upon examining the image data it determines that the image data is of a different type.
Which image types are supported is implementation-defined.
4.54.3. Applies to
Model Object
4.54.4. Version
XFA 2.1
242
Scripting Properties
4.54.5. Examples
4
4.54.6. JavaScript
ImageField1.resolveNode("value.#image").contentType = "application/x-formcalc";
4.54.7. FormCalc
ImageField1.value.#image.contentType = "application/x-formcalc"
4.55. context (deprecated)
Specifies the current object, which is the starting object for the resolveNode and resolveNodes
methods.
4.55.1. Syntax
Reference_Syntax.content = "object"
4.55.2. Values
Type
Object
4.55.3. Applies to
4.55.4. Version
XFA 2.1
The current object.
Values
243
Scripting Properties
4.56. count
Specifies the current number of subform instances on a form.
4.56.1. Syntax
Reference_Syntax.count = "integer"
4.56.2. Values
Type
Integer
Values
•
integer
An integer greater than or equal to 0 indicating the number of subform instances on the form.
4.56.3. Applies to
Object Model
4.56.4. Version
XFA 2.5
4.56.5. Examples
4.56.6. JavaScript
Subform1.instanceManager.count;
4.56.7. FormCalc
Subform1.instanceManager.count
244
Scripting Properties
4.57. credentialServerPolicy
Specifies whether checking the certificate status is required when a digital signature is signed. The certificate status can be checked against a certificate revocation list (CRL) or an Online Certificate
Status Protocol (OCSP) response.
4
4.57.1. Syntax
Reference_Syntax.credentialServerPolicy = "Optional | Required"
4.57.2. Values
Type
String
Values
•
Optional(default)
•
Required
Including the CRL or OCSP response is optional.
•
Required
Including the CRL or OCSP response is required.
4.57.3. Applies to
Model Object
4.57.4. Version
XFA 2.5
4.58. crlSign
Specifies an acceptable key usage extension that must be present in the signing certificate.
245
Scripting Properties
4.58.1. Syntax
Reference_Syntax.crlSign = "Yes | No | empty_string"
4.58.2. Values
Type
String
Values
•
Yes(default)
•
No
•
""
The value must be set in the certificate for it to be acceptable.
•
No
•
""
The value must not be set in the certificate for it to be acceptable.
•
""
If unspecified or specified as an empty string, the certificate's attribute is disregarded.
4.58.3. Applies to
Model Object
4.58.4. Version
XFA 2.5
4.59. cSpace
Specifies the color space.
The default color space, and currently the only space permitted, is
SRGB.
246
Scripting Properties
4.59.1. Syntax
Reference_Syntax.cSpace = "SRGB"
4.59.2. Values
String
Type
SRBG(default)
This is the only supported value.
4.59.3. Applies to
Values
Model
4.59.4. Version
XFA 2.1
4.59.5. Examples
4.59.6. JavaScript
TextField1.border.edge.color.cSpace = "SRGB";
4.59.7. FormCalc
TextField1.border.edge.color.cSpace = "SRGB"
4.60. currentPage
Sets the currently active page of a document at run time.
247
Object
4
Scripting Properties
Page values are 0-based, so the first page of a document returns a value of
0.
The currentPage property is available when layout:ready executes on a client. However, it is not available when layout:ready executes on the server because the property will not execute until the form layout executes.
4.60.1. Syntax
Reference_Syntax.currentPage = "integer"
4.60.2. Values
Type
Integer
Values
A valid integer representing a specific page of the document.
4.60.3. Applies to
Model
4.60.4. Version
XFA 2.1
4.60.5. Examples
4.60.6. JavaScript
xfa.host.currentPage = "2";
4.60.7. FormCalc
xfa.host.currentPage = "2"
R
ELATED LINKS
:
Object
248
Scripting Properties
Working with page numbers and page counts
4.61. currentRecordNumber
4.61.1. Syntax
Reference_Syntax.currentRecordNumber = "integer"
4.61.2. Values
4
Integer
Type
4.61.3. Applies to
Any valid integer value.
Values
Model Object
4.61.4. Examples
4.61.5. JavaScript
xfa.dataWindow.currentRecordNumber = "2"; // The third record
4.61.6. FormCalc
xfa.dataWindow.currentRecordNumber = "2" // The third record
249
Scripting Properties
4.62. currentValue
Returns the value of the property before the delta is restored.
4.62.1. Syntax
Reference_Syntax.currentValue = "typed object"
4.62.2. Values
Type
Depends on the type of the property
4.62.3. Applies to
Values
The correctly typed object for the property.
Model
4.62.4. Version
XFA 2.1
4.63. cursorLocation
Indicates the location of the cursor library to use with the record set.
4.63.1. Syntax
Reference_Syntax.cursorLocation = "client | server"
Object
250
Scripting Properties
4.63.2. Values
Type
String
Values
• client(default)
• server
Cursor library is located on the client computer.
• server
Cursor library is located on the server computer.
4.63.3. Applies to
Model Object
4.63.4. Version
XFA 2.1
4.64. cursorType
Specifies the type of cursor to use when opening the record set.
4.64.1. Syntax
Reference_Syntax.cursorType = "forwardOnly | keyset | dynamic | static | unspecified"
4
251
Scripting Properties
4.64.2. Values
Type
String
Values
• forwardOnly(default)
• keyset
• dynamic
• static
• unspecified
Identical to a static cursor, except that scrolling occurs only in a forward direction. This improves performance when you need to make only one pass through a record set.
• keyset
• dynamic
• static
• unspecified
Similar to a dynamic cursor, except that records that other users add are not visible. Data changes by other users are visible.
• dynamic
• static
• unspecified
Additions, changes, and deletions by other users are visible, and all types of movement through the record set are permitted, except for bookmarks, if the provider does not support them.
• static
• unspecified
A static copy of a set of records that can be used to find data or generate reports. Additions, changes, or deletions by other users are not visible.
• unspecified
The type of cursor is not specified.
252
Scripting Properties
4.64.3. Applies to
4
Model Object
4.64.4. Version
XFA 2.1
4.65. data
Indicates whether the image provided to the widget should be represented as a reference or should be embedded.
The dataproperty affects the object behavior when the form is filled.
4.65.1. Syntax
Reference_Syntax.data = "link | embed"
4.65.2. Values
Type
String
Values
• link
• embed
The image is represented as a URI reference. If the user provides the widget with a URI, the href attribute of the container’s image object is updated to reflect the new URI. If the image object was previously loaded with an embedded image, that image is removed from the object.
• embed
The image is embedded in the container’s image object. If the user provides the widget with a URI, the image referenced by the URI is embedded as the content of the image object.
253
Scripting Properties
4.65.3. Applies to
Model
4.65.4. Version
XFA 2.1
4.65.5. Examples
4.65.6. JavaScript
TextField1.resolveNode("ui.#imageEdit").data = "embed";
4.65.7. FormCalc
TextField1.ui.#textEdit.data = "embed"
Object
4.66. dataColumnCount
Specifies an optional number of data columns to encode for supported barcodes. This property applies to two-dimensional (2D) barcodes only.
The form design must supply this property in conjunction with the dataRowCount property to
specify a fixed row and column barcode, otherwise the parser must use the rowColumnRatio prop-
erty to determine the row and column count. The template must not supply the dataColumnCount
property unless the dataRowCount property is also supplied. When these properties are used the size
of the barcode is fixed. If the supplied data does not fill the barcode it is padded out with padding symbols.
4.66.1. Syntax
Reference_Syntax.dataColumnCount = "string"
254
Scripting Properties
4.66.2. Values
Type
String
Values
A valid string representing the number of data columns to encode.
4.66.3. Applies to
Model Object
4.66.4. Version
XFA 2.1
4.66.5. Examples
4.66.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").dataColumnCount = "3";
4.66.7. FormCalc
Code11BarCode1.ui.#barcode.dataColumnCount = "3"
4.67. dataDescription
Specifies the name of a data connection description to use with a particular type of web services connection.
4.67.1. Syntax
Reference_Syntax.dataDescription = "string"
255
4
Scripting Properties
4.67.2. Values
Type
String
Values
A valid string representing the name of a data description to use while exporting data.
4.67.3. Applies to
Model Object
4.67.4. Version
XFA 2.1
4.68. dataEncipherment
Specifies an acceptable key usage extension that must be present in the signing certificate.
4.68.1. Syntax
Reference_Syntax.dataEncipherment = "Yes | No | empty_string"
256
Scripting Properties
4.68.2. Values
Type
String
Values
•
Yes (default)
•
No
•
""
The value must be set in the certificate for it to be acceptable.
•
No
•
""
The value must not be set in the certificate for it to be acceptable.
•
""
If unspecified or specified as an empty string, the certificate's attribute is disregarded.
4.68.3. Applies to
4
Model Object
4.68.4. Version
XFA 2.5
4.69. dataLength
Specifies the maximum number of characters for this instance of the barcode. This property applies to one-dimensional barcodes only.
For software barcodes, when the moduleWidth property is not specified, the
dataLength property must be supplied by the form design. For hardware barcodes, this property is ignored.
The data being displayed is not validated. For software barcodes, the application allows the data to overflow the assigned region of the field. For hardware barcodes, the result of an overflow depends on the printer.
257
Scripting Properties
NOTE
:
There is no corresponding minimum length restriction. Some barcode formats have a fixed number of symbols and must be filled out with padding characters. Others allow a variable number of symbols and must terminate after the last symbol.
4.69.1. Syntax
Reference_Syntax.dataLength = "string"
4.69.2. Values
Type
String
Values
A valid string representing the maximum number of characters for this barcode instance. Each barcode type has its own default length value.
4.69.3. Applies to
Model Object
4.69.4. Version
XFA 2.1
4.69.5. Examples
4.69.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").dataLength = "10";
4.69.7. FormCalc
Code11BarCode1.ui.#barcode.dataLength = "10"
258
Scripting Properties
4.70. dataNode
Gets the data node to which a form node is bound after merge.
NOTE
:
dataNode is a ‘get’ property only, and cannot be used to 'set' a data node.
4.70.1. Syntax
Reference_Syntax.dataNode = No | "string"
4.70.2. Applies to
Model
4.70.3. Version
XFA 2.1
4.70.4. Examples
4.70.5. JavaScript
Subform.dataNode.saveXML("pretty")
4.70.6. FormCalc
Subform.dataNode.saveXML("pretty")
4.71. dataPrep
Defines preprocessing that is applied to the data written in the barcode.
Object
259
4
Scripting Properties
It does not affect the data in the object models, nor does it affect what the user sees when the field has focus in interactive contexts.
NOTE
:
Recommended for 2D barcodes only.
4.71.1. Syntax
Reference_Syntax.dataPrep = "none | flateCompress"
4.71.2. Values
Type
String
Values
• none(default)
• flateCompress
Uses the data as supplied.
• flateCompress
Writes a header consisting of a byte with decimal value 257, followed by another byte with decimal value 1. It then writes the data compressed with the Flate algorithm, as defined by the Internet
Engineering Task Force (IETF) in RFC1951. It does not use a predictor algorithm.
Do not specify this option with a type that cannot encode arbitrary binary data.
4.71.3. Applies to
Model Object
4.71.4. Version
XFA 2.1
260
Scripting Properties
4.71.5. Examples
4.71.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").dataPrep = "flateCompress";
4.71.7. FormCalc
Code11BarCode1.ui.#barcode.dataPrep = "flateCompress"
4
4.72. dataRowCount
Specifies an optional number of data rows to encode for supported barcodes. This property applies to 2D barcodes only.
The form design can supply this property in conjunction with the dataColumnCount property to
specify a fixed row and column barcode. Otherwise the rowColumnRatio property plus the actual
length of the data being inserted determine the row and column count. The dataRowCount property
cannot be present unless the dataColumnCount property is also present. When these properties are
used the size of the barcode is fixed. If the supplied data does not fill the barcode the remaining cells are padded out with padding symbols.
4.72.1. Syntax
Reference_Syntax.dataRowCount = "string"
4.72.2. Values
Type
String
Values
A valid string representing the number of data rows to encode.
261
4.72.3. Applies to
Model Object
4.72.4. Version
XFA 2.1
4.72.5. Examples
4.72.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").dataRowCount = "2";
4.72.7. FormCalc
Code11BarCode1.ui.#barcode.dataRowCount = "2"
4.73. db
Specifies the technology used to communicate with a database.
4.73.1. Syntax
Reference_Syntax.db = "string"
4.73.2. Values
Type
String ADO.
Values
Scripting Properties
262
Scripting Properties
4.73.3. Applies to
Model Object
4.73.4. Version
XFA 2.1
4.74. decipherOnly
Specifies an acceptable key usage extension that must be present in the signing certificate.
4.74.1. Syntax
Reference_Syntax.decipherOnly = "Yes | No | empty_string"
4.74.2. Values
Type
String
Values
•
Yes(default)
•
No
•
""
The value must be set in the certificate for it to be acceptable.
•
No
•
""
The value must not be set in the certificate for it to be acceptable.
•
""
If unspecified or specified as an empty string, the certificate's attribute is disregarded.
4
263
Scripting Properties
4.74.3. Applies to
Model Object
4.74.4. Version
XFA 2.5
4.75. delayedOpen
Specifies the number of seconds to delay opening the data source after a connection is made.
4.75.1. Syntax
Reference_Syntax.delayedOpen = "string"
4.75.2. Values
Type
String
Values
A valid string representing the number of seconds.
4.75.3. Applies to
Model
4.75.4. Version
XFA 2.1
Object
264
Scripting Properties
4.75.5. Examples
In these examples,
Titles represents the data connection name.
4.75.6. JavaScript
xfa.sourceSet.Titles.connect.delayedOpen = "5";
4.75.7. FormCalc
xfa.sourceSet.Titles.connect.delayedOpen = "5"
4.76. delimiter
Separates the attributes in the Subject DN string.
4.76.1. Syntax
Reference_Syntax.delimiter = ", | string"
4.76.2. Values
Type
String
Values
•
,(default)
• A valid string that separates the attributes in the Subject DN string.
4.76.3. Applies to
Model Object
4
265
Scripting Properties
4.76.4. Version
XFA 2.5
4.77. digitalSignature
Specifies an acceptable key usage extension that must be present in the signing certificate.
4.77.1. Syntax
Reference_Syntax.digitalSignature = "Yes | No | empty_string"
4.77.2. Values
Type
String
Values
•
Yes(default)
•
No
•
""
The value must be set in the certificate for it to be acceptable.
•
No
•
""
The value must not be set in the certificate for it to be acceptable.
•
""
If unspecified or specified as an empty string, the certificate's attribute is disregarded.
4.77.3. Applies to
Model Object
266
Scripting Properties
4.77.4. Version
XFA 2.5
4.78. disable
Inhibits the audible prompt.
4.78.1. Syntax
Reference_Syntax.disable = "1 | 0"
4.78.2. Values
Type
String
Values
•
1(default)
•
0
An audible prompt is produced if the field is not hidden or invisible.
•
0
There is not be an audible prompt.
4.78.3. Applies to
Model Object
4.78.4. Version
XFA 2.1
267
4
4.78.5. Examples
4.78.6. JavaScript
TextField1.assist.speak.disable = "0";
4.78.7. FormCalc
TextField1.assist.speak.disable = "0"
4.79. disableAll
Enables or disables validation warnings.
4.79.1. Syntax
Reference_Syntax.disable = "1 | 0"
4.79.2. Values
Type
String
•
1 (default)
•
0
Validation warnings are disabled.
•
0
Validation warnings are enabled.
4.79.3. Applies to
Model
Values
Object
Scripting Properties
268
Scripting Properties
4.79.4. Version
XFA 2.1
4.80. duplexImposition
Controls the orientation of the page image when printing on both sides of the paper.
The
duplexImposition property is used only if the relation property of the pageSet
object is set to duplexPaginated.
The top-level pageSet's setting controls the imposition of all duplex pages in the document.
4.80.1. Syntax
Reference_Syntax.duplexImposition = "longEdge | shortEdge"
4.80.2. Values
4
Type
String
Values
• longEdge (default)
• Sets the imposition of the form design for a portrait document bound along the left edge or a landscape document bound along the top edge.
• shortEdge
• Sets the imposition of the form design to short edge.
4.80.3. Applies to
Model Object
269
4.80.4. Version
XFA 3.1
4.81. editValue
Specifies the edit value for the field.
4.81.1. Syntax
Reference_Syntax.editValue = "string"
4.81.2. Values
Type
String
Values
A valid string representing the edit value for the field.
4.81.3. Applies to
Model
4.81.4. Version
XFA 2.1
4.82. embedPDF
Determines whether PDF file will be included as part of the data.
Object
Scripting Properties
270
Scripting Properties
4.82.1. Syntax
Reference_Syntax.embedPDF = "0 | 1"
4.82.2. Values
Type
String
Values
•
0(default)
•
1
The PDF file is sent as part of in the data.
•
1
The PDF file is not sent as part of the data. A URI is sent in its place.
4.82.3. Applies to
Model
4.82.4. Version
XFA 2.1
4.82.5. Examples
4.82.6. JavaScript
Button1.resolveNode("#event.#submit").embedPDF = "1";
4.82.7. FormCalc
Button1.#event.#submit.embedPDF = "1"
Object
271
4
Scripting Properties
4.83. encipherOnly
Specifies an acceptable key usage extension that must be present in the signing certificate.
4.83.1. Syntax
Reference_Syntax.encipherOnly = "Yes | No | empty_string"
4.83.2. Values
Type
String
Values
•
Yes(default)
•
No
•
""
The value must be set in the certificate for it to be acceptable.
•
No
•
""
The value must not be set in the certificate for it to be acceptable.
•
""
If unspecified or specified as an empty string, the certificate's attribute is disregarded.
4.83.3. Applies to
Model Object
4.83.4. Version
XFA 2.5
272
Scripting Properties
4.84. endChar
4
Specifies an optional ending control character to append to barcode data.
The endChar property is ignored by the parser if the barcode pattern does not support the specified control character.
4.84.1. Syntax
Reference_Syntax.endChar = "character"
4.84.2. Values
Type
String
4.84.3. Applies to
A valid control character.
Values
Model
4.84.4. Version
XFA 2.1
4.84.5. Examples
4.84.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").endChar = "*";
4.84.7. FormCalc
Code11BarCode1.ui.#barcode.endChar = "*"
273
Object
Scripting Properties
4.85. eofAction
Specifies the action to perform if the current record is the last record in the record set.
4.85.1. Syntax
Reference_Syntax.eofAction = "moveLast | stayEOF | addNew"
4.85.2. Values
Type
String
Values
• moveLast(default)
• stayEOF
• addNew
Moves the current record position to a point after the last record.
• stayEOF
• addNew
The current record will always be the last record in the record set.
• addNew
Adds a new record to the record set.
4.85.3. Applies to
Model
4.85.4. Version
XFA 2.1
Object
274
Scripting Properties
4.86. errorCorrectionLevel
4
Specifies an optional error correction level to apply to supported barcodes. This property applies to
2D barcodes only.
NOTE
:
For barcode types that accept this property, the parser ignores the checksum.
4.86.1. Syntax
Reference_Syntax.errorCorrectionLevel = "0 | integer"
4.86.2. Values
Type
String
Values
•
0(default)
For PDF417, the valid values are integers in the range 0 through 8, inclusive.
4.86.3. Applies to
Model Object
4.86.4. Version
XFA 2.1
4.86.5. Examples
4.86.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").errorCorrectionLevel = "5";
275
Scripting Properties
4.86.7. FormCalc
Code11BarCode1.ui.#barcode.errorCorrectionLevel = "5"
4.87. errorText
Returns the validation message for the first failed validation test, or an empty string if this field has passed all validation tests.
4.87.1. Syntax
Reference_Syntax.errorText = "string"
4.87.2. Values
Type
String
Values
If the field is in a valid state, errorText will be empty. If the field is in an invalid state, errorText will hold the validation message text for the validation that failed.
4.87.3. Applies to
Model Object
4.87.4. Version
XFA 2.9
4.88. excludeAllCaps
Specifies whether or not to hyphenate words consisting entirely of capital letters.
276
Scripting Properties
4.88.1. Syntax
Reference_Syntax.excludeAllCaps = "0 | 1"
4.88.2. Values
Type
String
Values
•
0
•
1
When the value is 0 and the value of the hyphenateproperty is1, words that consist entirely of capital letters are hyphenated.
•
1
When the value is 1 or the value of the hyphenateproperty is0, words that consist entirely of capital letters are not hyphenated.
4.88.3. Applies to
4
Model Object
4.88.4. Version
XFA 2.8
4.89. excludeInitialCap
Specifies whether or not to hyphenate words that begin with a capital letter.
4.89.1. Syntax
Reference_Syntax.excludeInitialCap = "0 | 1"
277
Scripting Properties
4.89.2. Values
Type
String
Values
•
0
•
1
When the value is
0and the value of thehyphenateproperty is1, words that begin with a capital letter are hyphenated.
•
1
When the value is
1 or the value of thehyphenateproperty is0, words that begin with a capital letter are not hyphenated.
4.89.3. Applies to
Model Object
4.89.4. Version
XFA 2.8
4.90. executeType
Specifies whether to import new data into the existing form or merge new data with the original form design to create a new form.
4.90.1. Syntax
Reference_Syntax.executeType = "import | remerge"
278
Scripting Properties
4.90.2. Values
Type
String
Values
• import(default)
• remerge
Imports data into the current form without merging that data with the form design.
• remerge
Merges the data in the connectionData dataset with the form design. The merge process creates dynamic subforms, if necessary, depending on the data returned by the web service.
4.90.3. Applies to
4
Model Object
4.90.4. Version
XFA 2.1
4.90.5. Examples
4.90.6. JavaScript
Button1.resolveNode("#event.#execute").executeType = "remerge";
4.90.7. FormCalc
Button1.#event.#execute.executeType = "remerge"
4.91. fillColor
The background color value for this field.
279
Scripting Properties
A fill color must be defined before you can change the color.
4.91.1. Syntax
Reference_Syntax.fillColor = "[0-255], [0-255], [0-255]"
4.91.2. Values
Type
String
Values
For the color-space of SRGB, the component values must be r,g,b, where r is the red component value, g is the green component value, and b is the blue component value. Each component value must be in the range 0 through 255, inclusive. 255 represents maximum display intensity. For example, 255,0,0 specifies the color red.
The default is dependent upon the context of where the color is used; the default color is determined by the object enclosing the color object.
4.91.3. Applies to
Model Object
4.91.4. Version
XFA 2.1
4.91.5. Examples
4.91.6. JavaScript
TextField1.fillColor = "150,130,33";
280
Scripting Properties
4.91.7. FormCalc
TextField1.fillColor = "150,130,33"
R
ELATED LINKS
:
4
4.92. fontColor
Specifies the foreground color value for the field. It is the equivalent of the
font.fill.color.value expression.
The fontColor property affects both the caption and the value of a field, except when the caption color is set through scripting.
For example, the script this.fontColor="0,0,255"; applies to both the caption and the value of a field.
You cannot use the fontColor property to change the font color of the field caption. To change the font color of the field caption, use
caption.font.fill.color.value.
4.92.1. Syntax
Reference_Syntax.fontColor = "[0-255], [0-255], [0-255]"
4.92.2. Values
String
Type
4.92.3. Applies to
A valid string that represents the font color.
Values
Model
Object
281
4.92.4. Version
XFA 2.1
4.92.5. Examples
4.92.6. JavaScript
TextField1.fontColor = "150,130,33";
4.92.7. FormCalc
TextField1.fontColor = "150,130,33"
4.93. fontHorizontalScale
Horizontally scales font glyphs.
4.93.1. Syntax
Reference_Syntax.fontHorizontalScale = "[0-100]%"
4.93.2. Values
String
Type
4.93.3. Applies to
A valid percentage between 0 and 100.
Values
Model
Object
Scripting Properties
282
Scripting Properties
4.93.4. Version
XFA 2.8
4.93.5. Examples
4.93.6. JavaScript
TextField1.font.fontHorizontalScale = 50%;
4.93.7. FormCalc
TextField1.font.fontHorizontalScale = 50%
4.94. fontVerticalScale
Vertically scales font glyphs.
4.94.1. Syntax
Reference_Syntax.fontVerticalScale = "[0-100]%"
4.94.2. Values
String
Type
4.94.3. Applies to
A valid percentage between 0 and 100.
Values
Model
Object
283
4
Scripting Properties
4.94.4. Version
XFA 2.8
4.94.5. Examples
4.94.6. JavaScript
TextField1.font.fontVerticalScale = 50%;
4.94.7. FormCalc
TextField1.font.fontVerticalScale = 50%
4.95. format
Determines the format in which to submit the data.
4.95.1. Syntax
Reference_Syntax.format = "pdfEnvelope | xmlEnvelope"
4.95.2. Values
Type
String
Values
For the encryptobject:
• pdfEnvelope
• xmlEnvelope
Adds the contents being submitted to a PDF document as an encrypted attachment.
• xmlEnvelope
Encrypts the contents being submitted using W3C XML encryption and contains them within an
XML envelope.
284
Scripting Properties
Type
String
Values
For the submitobject:
• xdp(default)
• formdata
The data is packaged in XDP format.
• formdata
The data is packaged in URL-encoded format as described in Uniform Resource Locators (URL).
The data is packaged in PDF as described in the Adobe PDF Specifications.
4
4.95.3. Applies to
Model
4.95.4. Version
XFA 2.1
4.95.5. Examples
4.95.6. JavaScript
Button1.resolveNode("#event.#submit").format = "pdf"
4.95.7. FormCalc
Button1.#event.#submit.format = "pdf"
Object
285
Scripting Properties
4.96. formatMessage
Specifies the format validation message string for this field.
4.96.1. Syntax
Reference_Syntax.formatMessage = "string"
4.96.2. Values
Type
String
Values
A valid string representing the format validation message.
4.96.3. Applies to
Model Object
4.96.4. Version
XFA 2.1
4.96.5. Examples
4.96.6. JavaScript
TextField1.formatMessage = "Please use the format: LASTNAME, FIRSTNAME";
4.96.7. FormCalc
TextField1.formatMessage = "Please use the format: LASTNAME, FIRSTNAME"
286
Scripting Properties
4.97. formattedValue
Specifies the formatted value for the field.
4.97.1. Syntax
Reference_Syntax.formattedValue = "string"
4.97.2. Values
Type
String
Values
A valid string representing the value of the field with formatting, including picture formats and symbols.
4.97.3. Applies to
Object Model
4.97.4. Version
XFA 2.1
4.97.5. Examples
4.97.6. JavaScript
TextField2.rawValue = TextField1.formattedValue;
4.97.7. FormCalc
TextField2 = TextField1.formattedValue
R
ELATED LINKS
:
287
4
Scripting Properties
Getting or setting object values
4.98. formatTest
Controls validation against the display picture clause.
The formatTestproperty can be used for validations. The formatTest property is not evaluated on null fields. The formatTest property can be an evaluated context during the lifetime of a form, such as when focus leaves a field.
To differentiate between
nullTest and scriptTest, use formatTest to check the value of
the field in question. If it is null or empty, the validation failed as a result of a
4.98.1. Syntax
Reference_Syntax.formatTest = "warning | disabled | error"
288
Scripting Properties
4.98.2. Values
Type
String
Values
• disabled
• error
• warning(default)
• dismiss:The user understands the message and wants to return to the form to satisfy this constraint.
• override:The user understands the message, but chooses to contravene this constraint.
Do not perform any test. The form object is permitted to have a value that does not conform to the picture clause. The field can be left with a non-conforming value and it will not invalidate the form.
• error
• warning(default)
• dismiss:The user understands the message and wants to return to the form to satisfy this constraint.
• override:The user understands the message, but chooses to contravene this constraint.
Emit a message and refuse to accept data that does not fit the picture clause. The form object must conform to a picture clause.
• warning(default)
• dismiss:The user understands the message and wants to return to the form to satisfy this constraint.
• override:The user understands the message, but chooses to contravene this constraint.
Emit a message if the data does not fit the picture clause, but allow the user to proceed to the next field.
The message must inform the user that the form object should have a value that conforms to the picture clause. It must provide two choices:
• dismiss:The user understands the message and wants to return to the form to satisfy this constraint.
• override:The user understands the message, but chooses to contravene this constraint.
4
289
Scripting Properties
4.98.3. Applies to
Model
4.98.4. Version
XFA 2.1
4.98.5. Examples
Set the validation pattern if has not already been defined.
4.98.6. JavaScript
TextField1.validate.picture.value = "A9A 9A9";
TextField1.validate.formatTest = "error";
4.98.7. FormCalc
TextField1.validate.picture = "A9A 9A9"
TextField1.validate.formatTest = "error"
Object
4.99. fracDigits
Specifies the maximum number of digits (inclusively) following the decimal point to capture and store.
4.99.1. Syntax
Reference_Syntax.fracDigits = "2 | integer"
290
Scripting Properties
4.99.2. Values
String
Type Values
•
2(default)
• A string representing any valid integer value.
4.99.3. Applies to
Model Object
4.99.4. Version
XFA 2.1
4.99.5. Examples
The numeric field data type should be set to decimal.
4.99.6. JavaScript
NumericField1.resolveNode("value.#decimal").fracDigits = "3";
4.99.7. FormCalc
NumericField1.value.#decimal.fracDigits = "3"
4.100. from
Specifies the original column name in the data source.
291
4
Scripting Properties
4.100.1. Syntax
Reference_Syntax.from = "string"
4.100.2. Values
Type
String
Values
A valid string representing the name of the column in the data source where data will be mapped from.
4.100.3. Applies to
Model Object
4.100.4. Version
XFA 2.1
4.101. fullText
Represents the full (untruncated) value that a user pastes into a form field.
Fields may truncate pasted text if it exceeds the allowable content region. The fullText property stores the untruncated value in memory for use with scripting operations.
The value of the newContentType determines the content type of this property.
4.101.1. Syntax
Reference_Syntax.fullText = "string"
292
Scripting Properties
4.101.2. Values
String
Type
4.101.3. Applies to
Any valid string value.
Values
4
Model
4.101.4. Version
XFA 2.1
4.101.5. Examples
4.101.6. JavaScript
xfa.event.fullText;
4.101.7. FormCalc
xfa.event.fullText
Object
4.102. h
A measurement of the height for the layout.
When height is specified as a measurement, that value overrides any growth range allowed by the
293
4.102.1. Syntax
Reference_Syntax.h = "0in | measurement"
4.102.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.102.3. Applies to
Model
4.102.4. Version
XFA 2.1
4.102.5. Examples
4.102.6. JavaScript
TextField1.h = "2in";
4.102.7. FormCalc
TextField1.h = "2in"
Object
Scripting Properties
294
Scripting Properties
4.103. hAlign
Specifies the horizontal text alignment.
4
4.103.1. Syntax
Reference_Syntax.hAlign = "left | center | right | justifyAll | justify | radix"
4.103.2. Values
Type
String
Values
• left(default)
• center
• right
• justifyAll
• justify
Align with the left edge of the available region.
• center
• right
• justifyAll
• justify
Center horizontally within the available region.
• right
• justifyAll
• justify
Align with the right edge of the available region.
• justifyAll
• justify
Spread-justify all lines to fill the available region.
• justify
Left-align the last line and spread-justify the rest.
295
Scripting Properties
4.103.3. Applies to
Model Object
4.103.4. Version
XFA 2.1
4.103.5. Examples
4.103.6. JavaScript
TextField1.para.hAlign = "right";
4.103.7. FormCalc
TextField1.para.hAlign = "right"
4.104. hand
Describes the justification of a line or edge.
NOTE
:
If you want to display field data as a comb, you must set the value of the hand property for the border object of the field to right. For example:
TextField1.border.hand = "right"; // JavaScript
TextField1.border.hand = "right" // FormCalc
4.104.1. Syntax
Reference_Syntax.hand = "even | left | right"
296
Scripting Properties
4.104.2. Values
Type
String
Values
• even(default)
• left
• right
Center the displayed line on the underlying vector or arc.
• left
• right
Position the displayed line immediately to the left of the underlying vector or arc, when following that line from its start point to its end point.
• right
Position the displayed line immediately to the right of the underlying vector or arc, when following that line from its start point to its end point. This value must be set to display field data using a comb.
4.104.3. Applies to
Object Model
4.104.4. Version
XFA 2.1
4.104.5. Examples
4.104.6. JavaScript
Line1.resolveNode("value.#line").hand = "left";
4
297
Scripting Properties
4.104.7. FormCalc
Line1.value.#line.hand = "left"
4.105. highlight
Specifies the visual appearance of a button when activated by a user. All values support two states
(up and down) except pushwhich supports three states (up, down, and rollover).
4.105.1. Syntax
Reference_Syntax.highlight="none | inverted | push | outline"
4.105.2. Values
Type
String
Values
• push(default)
• none
• inverted
• outline
Buttons that are set to highlight mode "push" can assign different captions to the alternate button states (down and rollover).
4.105.3. Applies to
Model Object
4.105.4. Version
XFA 2.5
298
Scripting Properties
4.105.5. Examples
4.105.6. JavaScript
Button1.resolveNode("ui.#button").highlight = "push";
4.105.7. FormCalc
Button1.ui.#button.highlight = "push"
4.106. href
Specifies a reference to an external file or resource.
The transferEncoding property does not apply to external images.
4.106.1. Syntax
Reference_Syntax.href = "URL"
4.106.2. Values
String
Type
4.106.3. Applies to
Values
A valid HTML reference. For example:
• http://www.adobe.com/data
• ftp://255.255.0.0/dataFiles
Model
Object
299
4
Scripting Properties
4.106.4. Version
XFA 2.1
4.106.5. Examples
4.106.6. JavaScript
ImageField1.resolveNode("value.#image").href = "/E/dev/Logos/adobe.jpg";
4.106.7. FormCalc
ImageField1.value.#image.href = "/E/dev/Logos/adobe.jpg"
4.107. hScrollPolicy
Specifies whether a field can scroll horizontally.
NOTE
:
This property does not apply to Text Fields that can expand to accommodate data or text.
4.107.1. Syntax
Reference_Syntax.hScrollPolicy = "auto | on | off"
300
Scripting Properties
4.107.2. Values
Type
String
Values
• auto(default)
• on
• off
Single-line fields scroll horizontally and multi-line fields scroll vertically (displaying a vertical scroll bar when necessary).
• on
• off
Horizontal scroll bars appear regardless of whether the text or data overflows the boundaries of the field.
• off
Restricts the user from entering characters in the field beyond what can physically fit within the field width. Note that this restriction does not apply to data with the field.
4.107.3. Applies to
4
Model Object
4.107.4. Version
XFA 2.5
4.107.5. Examples
4.107.6. JavaScript
TextField1.resolveNode("ui.#textEdit").hScrollPolicy = "off";
301
4.107.7. FormCalc
TextField1.ui.#textEdit.hScrollPolicy = "off"
4.108. hyphenate
Controls whether hyphenation is allowed.
4.108.1. Syntax
Reference_Syntax.hyphenate = "0 | 1"
4.108.2. Values
Type
String
•
0
•
1
Hyphenation is not allowed.
•
1
Hyphenation is allowed.
Values
4.108.3. Applies to
Model
4.108.4. Version
XFA 2.8
Object
Scripting Properties
302
Scripting Properties
4.109. id
Specifies a generic user-defined XML ID type.
4.109.1. Syntax
Reference_Syntax.id = "string"
4.109.2. Values
Type
String
Values
A valid string representing a user-defined XML identification.
4.109.3. Applies to
4.109.4. Version
XFA 2.1
4.110. imagingBBox
Specifies a region within the medium that is available for rendering with four comma separated measurements representing the measurements for x, y, width, and height.
4.110.1. Syntax
Reference_Syntax.bind = "none | x, y, width, height"
4
303
Scripting Properties
4.110.2. Values
Type
String
Values
• none(default)
• x, y, width, height
The entire area of the paper is available for rendering.
• x, y, width, height
The content of the subform is not available for manipulation by the user. A user-agent should treat the subform as a pass-through container in sequencing operations, and you must not be permitted to modify the content of the subform. The content of the subform is still modifiable via indirect means such as scripting operations and calculations.
4.110.3. Applies to
Model
4.110.4. Version
XFA 2.1
4.110.5. Examples
4.110.6. JavaScript
xfa.form.form1.pageSet.Page1.medium = "100, 100, 50, 50";
4.110.7. FormCalc
xfa.form.form1.pageSet.Page1.medium = "100, 100, 50, 50"
Object
304
Scripting Properties
4.111. index
Returns the position of this node in its collection of like-named, in-scope nodes.
If the node has no name, the position in its like-class named collection is returned.
4.111.1. Syntax
Reference_Syntax.index = "integer"
4.111.2. Values
Type
Integer
Values
An integer representing the 0 based index position of the current object relative to objects of the same name within the same scope.
4.111.3. Applies to
4.111.4. Version
XFA 2.1
4.111.5. Examples
4.111.6. JavaScript
Subform1.parent.index;
4.111.7. FormCalc
Subform1.parent.index
R
ELATED LINKS
:
Manipulating instances of a subform
305
4
Scripting Properties
4.112. initial
Specifies the initial number of occurrences for a subform or a subform set. This property should be used only for printed and static forms.
4.112.1. Syntax
Reference_Syntax.initial = "1 | string"
4.112.2. Values
String
Type
4.112.3. Applies to
Values
•
1(default)
• A valid string representing any valid integer.
Model Object
4.112.4. Version
XFA 2.1
4.112.5. Examples
Modifying the occur object on the form:ready event is too late in the form life cycle. It needs to be modified on the template:ready event. However, the template:ready event is not accessible in the user interface.
306
Scripting Properties
4.112.6. JavaScript
Subform1.occur.initial = "3";
4.112.7. FormCalc
Subform1.occur.initial = "3"
4
4.113. initialNumber
Supplies the initial page number to the first page in a group of consecutive pages that use the same
When you use separate numbering runs within a single document, use initialNumber to control the initial number of each run. For example you can use i - iv for the table of contents, followed by 1 - 27 for the body of the document.
4.113.1. Syntax
Reference_Syntax.initialNumber = "1 | string"
4.113.2. Values
String
Type
4.113.3. Applies to
Values
•
1(default)
• A valid string representing any integer.
Model
Object
307
Scripting Properties
4.113.4. Version
XFA 2.1
4.113.5. Examples
4.113.6. JavaScript
xfa.form.form1.pageSet.Page1.initialNumber = "4";
4.113.7. FormCalc
xfa.form.form1.pageSet.Page1.initialNumber = "4"
4.114. input
Specifies an input message associated with a particular WSDL connection operation.
4.114.1. Syntax
Reference_Syntax.input = "string"
4.114.2. Values
String
Type
4.114.3. Applies to
A valid string representing an input message.
Values
Model
Object
308
Scripting Properties
4.114.4. Version
XFA 2.1
4.115. instanceIndex
Calculates the index of a subform or subform set based on where it is located relative to other instances of the same form object.
4.115.1. Syntax
Reference_Syntax.instanceIndex = "integer"
4.115.2. Version
2.5
4.115.3. Values
4
Type
Integer
Values
A valid integer representing the zero-based index of the specified subform or subform set.
4.115.4. Applies to
Model Object
4.115.5. Version
XFA 2.5
309
Scripting Properties
4.116. intact
Specifies the constraints on keeping the parent object intact within a content area or page.
Splitting across a content area or page is only relevant for text based field and draw objects; specifically, those using the textEdit object.
4.116.1. Syntax
Reference_Syntax.intact = "none | contentArea"
4.116.2. Values
Type
String
Values
• none(default for subforms and field objects)
• contentArea(default for draw objects)
The determination of whether an object will be rendered intact within a content area or page is delegated to the processing application. It is possible that a subform could be split across a content area or page. This value is the default when the parent container’s layout is tb,lr-tb, ortable. The field and draw objects will not split if the parent container does not allow splitting, itself.
• contentArea(default for draw objects)
The object is requested to be rendered intact within a content area. This value is the default when the parent container’s layout is position or row.
4.116.3. Applies to
Model Object
4.116.4. Version
XFA 2.1
310
Scripting Properties
4.116.5. Examples
4.116.6. JavaScript
Subform1.keep.intact = "contentArea";
4.116.7. FormCalc
Subform1.keep.intact = "contentArea"
4.117. inverted
Specifies whether the corner appears convex (it joins the edges tangentially) or is inverted and appears concave (it joins the edges at right angles).
4.117.1. Syntax
Reference_Syntax.inverted = "0 | 1"
4.117.2. Values
4
String
Type Values
•
0(default)
•
1
The corner appears convex.
•
1
The corner appears concave.
4.117.3. Applies to
Model Object
311
4.117.4. Version
XFA 2.1
4.117.5. Examples
4.117.6. JavaScript
TextField1.border.corner.inverted = "1";
4.117.7. FormCalc
TextField1.border.corner.inverted = "1"
4.118. isContainer
Specifies whether this object is a container object.
NOTE
:
This property is read only.
4.118.1. JavaScript Syntax
Reference_Syntax.isContainer = false | true;
- or -
Reference_Syntax.isContainer = 0 | 1;
4.118.2. FormCalc Syntax
Reference_Syntax.isContainer = 0 | 1
Scripting Properties
312
Scripting Properties
4.118.3. Values
4
Type
Boolean
• true | 1(default)
• false | 0
The object is a type of container object.
• false | 0
The object is not a type of container object.
Values
4.118.4. Applies to
4.118.5. Version
XFA 2.1
4.118.6. Examples
4.118.7. JavaScript
TextField1.isContainer;
4.118.8. FormCalc
TextField1.isContainer
4.119. isDefined
Indicates whether a valid data window is currently defined.
A data window is considered valid if the current record index points to a record within the data. A data window is not defined if there are no records, or if the current record index is beyond the end of the range of records.
313
NOTE
:
This property is read only.
4.119.1. JavaScript Syntax
Reference_Syntax.isDefined = false | true;
- or -
Reference_Syntax.isDefined = 0 | 1;
4.119.2. FormCalc Syntax
Reference_Syntax.isDefined = 0 | 1
4.119.3. Values
Boolean
Type
4.119.4. Applies to
• true | 1(default)
• false | 0
The current data window is defined.
• false | 0
The current data window is not defined.
Values
Model
4.119.5. Version
XFA 2.1
Object
Scripting Properties
314
Scripting Properties
4.119.6. Examples
4.119.7. JavaScript
xfa.dataWindow.isDefined;
4.119.8. FormCalc
$dataWindow.isDefined
4.120. isNull
Indicates whether the current data value is the null value.
4.120.1. JavaScript Syntax
Reference_Syntax.isNull = false | true;
- or -
Reference_Syntax.isNull = 0 | 1;
4.120.2. FormCalc Syntax
Reference_Syntax.isNull = 0 | 1
4.120.3. Values
Type
Boolean
Values
• true | 1(default)
• false | 0
The current data value is the null value.
• false | 0
The current data window is not the null value.
315
4
4.120.4. Applies to
Model
4.120.5. Version
XFA 2.1
4.120.6. Examples
4.120.7. JavaScript
TextField1.isNull = 0;
4.120.8. FormCalc
TextField1.isNull = 0
4.121. join
Specifies the shape of the corner.
4.121.1. Syntax
Reference_Syntax.join = "square | round"
Object
Scripting Properties
316
Scripting Properties
4.121.2. Values
Type
String
Values
• square(default)
• round
The corner has the shape of a right-angle between the adjoining edges.
• round
The corner has the shape of a round curve between the adjoining edges.
4.121.3. Applies to
Object Model
4.121.4. Version
XFA 2.1
4.121.5. Examples
4.121.6. JavaScript
TextField1.border.corner.join = "round";
4.121.7. FormCalc
TextField1.border.corner.join = "round"
4.122. kerningMode
Applies kerning between characters.
317
4
Scripting Properties
4.122.1. Syntax
Reference_Syntax.kerningMode = "none | pair"
4.122.2. Values
Type
String
Values
• none
• pair
Kerning is disabled.
• pair
Kerning is enabled. When kerning is enabled and letter spacing is not
0, kerning is applied first.
4.122.3. Applies to
Object Model
4.122.4. Version
XFA 2.8
4.122.5. Examples
4.122.6. JavaScript
TextField1.font.kerningMode = "pair";
4.122.7. FormCalc
TextField1.font.kerningMode = "pair"
318
Scripting Properties
4.123. keyAgreement
Specifies an acceptable key usage extension that must be present in the signing certificate.
4.123.1. Syntax
Reference_Syntax.keyAgreement = "Yes | No | empty_string"
4.123.2. Values
4
Type
String
Values
•
Yes(default)
•
No
•
""
The value must be set in the certificate for it to be acceptable.
•
No
•
""
The value must not be set in the certificate for it to be acceptable.
•
""
If unspecified or specified as an empty string, the certificate's attribute is disregarded.
4.123.3. Applies to
Model Object
4.123.4. Version
XFA 2.5
319
Scripting Properties
4.124. keyCertSign
Specifies an acceptable key usage extension that must be present in the signing certificate.
4.124.1. Syntax
Reference_Syntax.keyCertSign = "Yes | No | empty_string"
4.124.2. Values
Type
String
Values
•
Yes(default)
•
No
•
""
The value must be set in the certificate for it to be acceptable.
•
No
•
""
The value must not be set in the certificate for it to be acceptable.
•
""
If unspecified or specified as an empty string, the certificate's attribute is disregarded.
4.124.3. Applies to
Model Object
4.124.4. Version
XFA 2.5
320
Scripting Properties
4.125. keyDown
Determines whether a user is pressing an arrow key to make a selection. This property is available only for list boxes and drop-down lists.
4
4.125.1. Syntax
Reference_Syntax.keyDown = "True | False"
4.125.2. Values
String
Type
4.125.3. Applies to
Values
•
True(default)
• Arrow key was used to make the selection.
•
False
• Arrow key was not used to make the selection.
Object Model
4.125.4. Version
XFA 2.1
4.125.5. Examples
4.125.6. JavaScript
xfa.event.keyDown;
321
Scripting Properties
4.125.7. FormCalc
xfa.event.keyDown
4.126. keyEncipherment
Specifies an acceptable key usage extension that must be present in the signing certificate.
4.126.1. Syntax
Reference_Syntax.keyEnciphement = "Yes | No | empty_string"
4.126.2. Values
Type
String
Values
•
Yes(default)
•
No
•
""
The value must be set in the certificate for it to be acceptable.
•
No
•
""
The value must not be set in the certificate for it to be acceptable.
•
""
If unspecified or specified as an empty string, the certificate's attribute is disregarded.
4.126.3. Applies to
Model Object
322
Scripting Properties
4.126.4. Version
XFA 2.5
4
4.127. labelRef
Resolves a data value for each data node in the set identified by the ref object.
The data values are then used to populate the label items, such as
<items save='0'>.
The labelRef property is a relative reference syntax expression.
The labelRef property is optional. You might want to define a list using only a set of values with no labels. In that case, the rendered object uses labels that default to the actual values.
4.127.1. Syntax
Reference_Syntax.labelRef = "string"
4.127.2. Values
Type
String
Values
A string representing a data value for each data node in the set.
4.127.3. Applies to
Model
4.127.4. Version
XFA 2.4
Object
323
Scripting Properties
4.128. ladderCount
Specifies the maximum number of consecutive hyphenated lines that may be generated.
4.128.1. Syntax
Reference_Syntax.ladderCount = [0..n]
4.128.2. Values
Type
Integer
Values
A valid integer representing the number of consecutive hyphenated lines. The default value is
2.
4.128.3. Applies to
Object Model
4.128.4. Version
XFA 2.8
4.129. language
Returns the language of the running host application.
4.129.1. Syntax
Reference_Syntax.language
324
Scripting Properties
4.129.2. Values
Type
String
Values
A valid string representing the locale language of the host computer.
4.129.3. Applies to
Model
4.129.4. Version
XFA 2.1
4.129.5. Examples
4.129.6. JavaScript
xfa.host.language;
4.129.7. FormCalc
xfa.host.language
Object
4.130. layout
Specifies the layout strategy to be used by this object.
4.130.1. Syntax
Reference_Syntax.layout = "position | lr-tb | rl-tb | row | table | tb"
4
325
4.130.2. Values
Scripting Properties
326
Scripting Properties 4
327
Scripting Properties
Type
String
Values
• position(default)
• lr-tb
• rl-tb
• row
• table
• tb
The content of the control is positioned according to the to the location information expressed on the content objects.
• lr-tb
• rl-tb
• row
• table
• tb
The content of the object flows from left to right and top to bottom.
• rl-tb
• row
• table
• tb
Reserved for future use. The content of the object flows from right to left and top to bottom.
• row
• table
• tb
This is an inner object of a table, representing one or more rows. The objects contained in this object are cells of the table and their height and width properties, if any, are ignored. The cells are laid out from right to left and each one is adjusted to the height of the row and the width of one or more contiguous columns.
• table
• tb
This is the outer object of a table. Each of its child subforms or exclusion groups must have its layout property set to row. The rows of the table are laid out from top to bottom.
• tb
The content of the object flows from top to bottom.
328
Scripting Properties
4.130.3. Applies to
Model Object
4.130.4. Version
XFA 2.1
4.130.5. Examples
4.130.6. JavaScript
Subform1.layout = "tb";
4.130.7. FormCalc
Subform1.layout = "tb"
R
ELATED LINKS
:
Working with page numbers and page counts
4.131. leadDigits
Specifies the maximum number of digits (inclusively) preceding the decimal point to capture and store.
4.131.1. Syntax
Reference_Syntax.leadDigits = "0 | integer"
4
329
4.131.2. Values
String
Type Values
•
0(default)
• A valid string representing any integer value.
4.131.3. Applies to
Scripting Properties
Model Object
4.131.4. Version
XFA 2.1
4.131.5. Examples
For these examples, the numeric field data type should be set to decimal.
4.131.6. JavaScript
NumericField1.resolveNode("value.#decimal").leadDigits = "2";
4.131.7. FormCalc
NumericField1.value.#decimal.leadDigits = "2"
4.132. leader
Specifies the subformor subformSetobject to place at the top of a content or page area.
The leader property replaces the deprecated overflowLeader(deprecated) and bookend-
Leader(deprecated) properties.
330
Scripting Properties
4.132.1. Syntax
Reference_Syntax.leader = "string"
4.132.2. Values
Type
String
Values
A valid string representing the ID or fully qualified reference syntax expression of a subform or subform set. The default is an empty string.
4.132.3. Applies to
Object Model
4.132.4. Version
XFA 2.4
4.132.5. Examples
4.132.6. JavaScript
Subform1.leader = "xfa.form.form1.Subform2";
4.132.7. FormCalc
Subform1.leader = "xfa.form.form1.Subform2"
4
331
4.133. leftInset
Specifies a the size of the left inset.
4.133.1. Syntax
Reference_Syntax.leftInset = "0in | measurement"
4.133.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.133.3. Applies to
Model
4.133.4. Version
XFA 2.1
4.133.5. Examples
4.133.6. JavaScript
Subform1.margin.leftInset = "0.25in";
4.133.7. FormCalc
Subform1.margin.leftInset = "0.25in"
Object
Scripting Properties
332
Scripting Properties
4.134. length
Specifies the number of objects in the list.
NOTE
:
This property is read only.
4.134.1. Syntax
Reference_Syntax.length
4.134.2. Values
4
Type
Integer
Values
A valid integer representing the number of objects.
4.134.3. Applies to
4.134.4. Version
XFA 2.5
4.134.5. Examples
4.134.6. JavaScript
// Display the number of child nodes under root node. xfa.host.messageBox("Number of nodes under rootNode after appending clone: " + xfa.record.nodes.length);
4.134.7. FormCalc
// Display the number of child nodes under root node. xfa.host.messageBox("Number of nodes under rootNode after appending clone: " + xfa.record.nodes.length)
R
ELATED LINKS
:
333
Scripting Properties
Creating a node in the data model
4.135. letterSpacing
Specifies the spacing limit.
4.135.1. Syntax
Reference_Syntax.letterSpacing = "[0..100]% | measurement"
4.135.2. Values
Type
String
Values
The spacing limit may be one of the following:
• An absolute measurement, specified in numeric values and units. A value of zero doesn't require any units.
• A measurement relative to the current font's em width.
• A percentage value, relative to the width of the font's glyph for the space character (U+0020). If the font does not have a space character, the percentage is applied to the font's em width.
4.135.3. Applies to
Model Object
334
Scripting Properties
4.135.4. Version
XFA 2.8
4.135.5. Examples
4.135.6. JavaScript
TextField1.font.letterSpacing = "10%";
4.135.7. FormCalc
TextField1.font.letterSpacing = "10%"
4
4.136. lineHeight
Specifies the line height to apply to the paragraph content.
Omitting a value or specifying an empty value indicates that the font size determines the line height.
4.136.1. Syntax
Reference_Syntax.lineHeight = "0pt | measurement"
4.136.2. Values
String
Type
•
0pt(default)
• Any valid measurement.
Values
335
Scripting Properties
4.136.3. Applies to
Model
4.136.4. Version
XFA 2.1
4.136.5. Examples
4.136.6. JavaScript
TextField1.para.lineHeight = "20pt";
4.136.7. FormCalc
TextField1.para.lineHeight = "20pt"
Object
4.137. lineThrough
Specifies the activation of a single or double line extending through the text (also known as strikethrough).
4.137.1. Syntax
Reference_Syntax.lineThrough = "0 | 1 | 2"
336
Scripting Properties
4.137.2. Values
String
Type Values
•
0(default)
•
1
•
2
The font renders without a line through the text.
•
1
•
2
The font renders with a single line through the text.
•
2
The font renders with a double line through the text.
4.137.3. Applies to
Model
4.137.4. Version
XFA 2.1
4.137.5. Examples
4.137.6. JavaScript
TextField1.font.lineThrough = "2";
4.137.7. FormCalc
TextField1.font.lineThrough = "2"
Object
337
4
Scripting Properties
4.138. lineThroughPeriod
Controls the appearance of the line extending through the text (also known as strikethrough).
4.138.1. Syntax
Reference_Syntax.lineThroughPeriod = "all | word"
4.138.2. Values
String
Type Values
• all(default)
• word
The rendered line shall extend across word breaks.
• word
The rendered line shall be interrupted at word breaks.
4.138.3. Applies to
Model
4.138.4. Version
XFA 2.1
4.138.5. Examples
4.138.6. JavaScript
TextField1.font.lineThroughPeriod = "word";
Object
338
Scripting Properties
4.138.7. FormCalc
TextField1.font.lineThroughPeriod = "word"
4.139. listen
Controls whether the event object listens to events occurring in the referenced node only, or to events occurring in the referenced node and descendents.
4.139.1. Syntax
Reference_Syntax.listen = "refOnly | refAndDescendents"
4.139.2. Values
4
Type
String
Values
• refOnly(default): Listens to the event only on the container specified by the
•
refAndDescendents: Listens to the event as it fires on the ref node and
any of its descendents.
4.139.3. Applies to
Model Object
4.139.4. Version
XFA 3.0
339
Scripting Properties
4.140. locale
Specifies the language, currency, and time/date formatting to use for the content of the object.
The locale affects the representation of data formatted, validated, or normalized by picture clauses.
When this property is absent or empty, the default behavior is to inherit the parent object’s locale. If the outermost subform does not specify a locale, the default behavior derives from the ambient locale of the operating system. If the operating system does not supply a locale, en_US is used.
4.140.1. Syntax
Reference_Syntax.locale = "ambient | locale"
4.140.2. Values
Type
String
Values
• ambient(default)
• A valid locale name, for example en_US. For a complete list of valid locale values, refer to the IETF RFC 1766 and ISO 639/ISO 3166 specifications.
The application uses its own ambient locale.
• A valid locale name, for example en_US. For a complete list of valid locale values, refer to the IETF RFC 1766 and ISO 639/ISO 3166 specifications.
4.140.3. Applies to
Model Object
4.140.4. Version
XFA 2.1
340
Scripting Properties
4.140.5. Examples
4.140.6. JavaScript
TextField1.locale = "en_US";
4.140.7. FormCalc
TextField1.locale = "en_US"
4
4.141. lockType
Specifies the type of locking functionality to use with the data source.
4.141.1. Syntax
Reference_Syntax.lockType = "unspecified | readOnly | pessimistic | optimistic | batchOptimistic"
341
Scripting Properties
4.141.2. Values
String
Type
4.141.3. Applies to
Values
• unspecified(default)
• readOnly
• pessimistic
• optimistic
• batchOptimistic
Does not specify a type of lock.
• readOnly
• pessimistic
• optimistic
• batchOptimistic
Indicates read-only records. Data cannot be altered.
• pessimistic
• optimistic
• batchOptimistic
Records are locked at the data source immediately after editing.
• optimistic
• batchOptimistic
Records are locked only when a user-instigated update of the data occurs.
• batchOptimistic
Indicates optimistic batch updates. This is required for batch update mode.
Model Object
342
Scripting Properties
4.141.4. Version
XFA 2.1
4.141.5. Examples
In these examples,
Titles represents the data connection name.
4.141.6. JavaScript
xfa.sourceSet.Titles.nodes.item(1).query.recordSet.lockType = "optimistic";
4.141.7. FormCalc
xfa.sourceSet.Titles.nodes.item(1).query.recordSet.lockType = "optimistic"
4
4.142. long
Specifies the length of the long edge of the medium. The length specified by the long property must
be greater than the length specified by the short property.
4.142.1. Syntax
Reference_Syntax.long = "0in | measurement"
4.142.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
343
4.142.3. Applies to
Model
4.142.4. Version
XFA 2.1
4.142.5. Examples
4.142.6. JavaScript
xfa.form.form1.pageSet.Page1.medium.long = "4in";
4.142.7. FormCalc
xfa.form.form1.pageSet.Page1.medium.long = "4in"
4.143. mandatory
Specifies the nullTest value for the field.
4.143.1. Syntax
Reference_Syntax.mandatory = "string"
4.143.2. Values
String
Type
A string that represents the null test value.
Values
Object
Scripting Properties
344
Scripting Properties
4.143.3. Applies to
Model
4.143.4. Version
XFA 2.1
4.143.5. Examples
4.143.6. JavaScript
Textfield1.mandatory = "error";
4.143.7. FormCalc
TextField1.mandatory = "error"
4.144. mandatoryMessage
Specifies the mandatory message string for this field.
4.144.1. Syntax
Reference_Syntax.mandatoryMessage = "string"
4.144.2. Values
String
Type Values
A string that represents the mandatory message.
Object
345
4
4.144.3. Applies to
Model
4.144.4. Version
XFA 2.1
4.144.5. Examples
4.144.6. JavaScript
Textfield1.mandatoryMessage = "This field is required.";
4.144.7. FormCalc
TextField1.mandatoryMessage = "This field is required."
Object
4.145. marginLeft
Specifies the size of the left indentation of the paragraph.
4.145.1. Syntax
Reference_Syntax.marginLeft = "0in | measurement"
Scripting Properties
346
Scripting Properties
4.145.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.145.3. Applies to
Model
4.145.4. Version
XFA 2.1
4.145.5. Examples
4.145.6. JavaScript
TextField1.para.marginLeft = "0.5in";
4.145.7. FormCalc
TextField1.para.marginLeft = "0.5in"
4.146. marginRight
Specifies the size of the right indentation of the paragraph.
4.146.1. Syntax
Reference_Syntax.marginRight = "0in | measurement"
347
Object
4
4.146.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.146.3. Applies to
Model
4.146.4. Version
XFA 2.1
4.146.5. Examples
4.146.6. JavaScript
TextField1.para.marginRight = "0.5in";
4.146.7. FormCalc
TextField1.para.marginRight = "0.5in"
4.147. mark
Indicates the shape to use when filling a Check Box object.
Object
Scripting Properties
348
Scripting Properties 4
4.147.1. Syntax
Reference_Syntax.mark = "default | check | circle | cross | diamond | square | star"
4.147.2. Values
Type
String
Values
• default(default)
• check
• circle
• cross
• diamond
• square
• star
The default marks vary depending on the shape of the Checkbox object. A corner to corner for square and a filled circle for round. The new marks are font-based symbols.
• check
• circle
• cross
• diamond
• square
• star
4.147.3. Applies to
Model Object
349
Scripting Properties
4.147.4. Version
XFA 2.5
4.147.5. Examples
4.147.6. JavaScript
CheckBox1.resolveNode("ui.#checkButton").mark = "diamond";
4.147.7. FormCalc
CheckBox1.ui.#checkButton.mark = "diamond"
4.148. match
Controls the role played by enclosing an object in a data-binding (merge) operation.
4.148.1. Syntax
Reference_Syntax.mark = "once | none | global | dataref"
350
Scripting Properties
4.148.2. Values
Type
String
Values
• once(default)
• none
• global
• dataRef
The node representing the enclosing object binds to a node in the Data model in accordance with the standard matching rules.
• none
• global
• dataRef
The node representing the enclosing object is transient. It will not be bound to any node in the Data model.
• global
• dataRef
The containing field is global. If the normal matching rules fail to provide a match for it, the data-binding process looks outside the current record for data to bind to the field.
• dataRef
The containing field binds to the node in the Data model specified by the accompanying ref property.
4.148.3. Applies to
Model Object
4
4.148.4. Version
XFA 2.1
351
Scripting Properties
4.148.5. Examples
You should set the field global property before the merge.
4.148.6. JavaScript
TextField1.bind.match = "global";
4.148.7. FormCalc
TextField1.bind.match = "global"
4.149. max
Specifies the maximum number of occurrences for the enclosing container, or
-1 to set no upper boundary for occurrences.
The
maxproperty defaults to the value of the min property. In the absence of a min property, the
default is
1.
4.149.1. Syntax
Reference_Syntax.max = "1 | -1 | integer"
4.149.2. Values
String
Type Values
•
1(default)
•
-1
• Any valid integer.
No upper boundary limit.
• Any valid integer.
352
Scripting Properties
4.149.3. Applies to
Model
4.149.4. Version
XFA 2.1
4.149.5. Examples
4.149.6. JavaScript
Subform1.occur.max = "3";
4.149.7. FormCalc
Subform1.occur.max = "3"
Object
4.150. maxChars
Specifies the maximum number of characters that this text value can enclose.
4.150.1. Syntax
Reference_Syntax.maxChars = "0 | integer"
4
353
Scripting Properties
4.150.2. Values
Type
String
Values
•
0(default)
• Any valid integer value.
If you do not specify a value for this property, or if the value is an empty string, there is no maximum.
4.150.3. JavaScript
TextField1.value.text.maxChars = "5";
4.150.4. FormCalc
TextField1.value.text.maxChars = "5"
4.151. maxH
Specifies the maximum height for layout purposes.
The maxH property is relevant only if the enclosing container object is growable and has an h prop-
erty whose value is null. If you do not specify a value for this property, there is no upper limit. If you specify a value for the
h property, the container cannot grow vertically and this property is ignored.
4.151.1. Syntax
Reference_Syntax.maxH = "0in | measurement"
4.151.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
354
Scripting Properties
4.151.3. Applies to
4
Model Object
4.151.4. Version
XFA 2.1
4.151.5. Examples
4.151.6. JavaScript
TextField1.maxH = "3in";
4.151.7. FormCalc
TextField1.maxH = "3in"
4.152. maxLength
Specifies the maximum (inclusive) allowable length of the content or
-1 to indicate that no maximum length is imposed.
The interpretation of this property is affected by the content type. In this case this property specifies the maximum (inclusive) allowable length of the content in characters. For instance, where the content type is text/plain this property represents the maximum (inclusive) number of characters of plain text content. Similarly, where the content type is text/html this property represents the maximum (inclusive) number of characters of content excluding markup, and insignificant whitespace.
4.152.1. Syntax
Reference_Syntax.maxLength = "-1 | integer"
355
Scripting Properties
4.152.2. Values
String
Type
•
-1(default)
• Any valid integer value.
Values
4.152.3. Applies to
Model Object
4.152.4. Version
XFA 2.1
4.153. maxW
Specifies the maximum width for layout purposes.
If you do not specify a value for this property, there is no maximum. This property is relevant only
4.153.1. Syntax
Reference_Syntax.maxW = "0in | measurement"
356
Scripting Properties
4.153.2. Values
String
Type
4
•
0in(default)
• Any valid measurement.
Values
4.153.3. Applies to
Model Object
4.153.4. Version
XFA 2.1
4.153.5. Examples
4.153.6. JavaScript
TextField1.maxW = "3in";
4.153.7. FormCalc
TextField1.maxW = "3in"
4.154. mergeMode
Controls which data merge algorithm is used for a given subform.
Fragments inherit the mergeMode setting that is specified by the root subform of the hosting document.
357
Scripting Properties
Designer sets the mergeMode property of the root subform to consumeData unless a model or schema that contains associations is used as the data connection for the form. In those cases, the mergeMode property is set to matchTemplate.
4.154.1. Syntax
Reference_Syntax.mergeMode = "consumeData | matchTemplate"
4.154.2. Values
Type
String
Values
• consumeData (default)
• Uses a data merge algorithm where a single data element can cause the creation of only a single subform.
• matchTemplate
• Uses a data merge algorithm that supports relational data models and allows a single data element to generate a single instance of multiple subforms. Disables
addInstance, removeInstance, and moveInstance functions of
the
4.154.3. Applies to
4.154.4. Version
XFA 3.1
Model
Object
4.155. min
Specifies the minimum number of occurrences for the enclosing container.
358
Scripting Properties
4.155.1. Syntax
Reference_Syntax.min = "1 | integer"
4.155.2. Values
String
Type
•
1(default)
• Any valid integer.
4.155.3. Applies to
Values
Model Object
4.155.4. Version
XFA 2.1
4.155.5. Examples
4.155.6. JavaScript
Subform1.occur.min = "0";
4.155.7. FormCalc
Subform1.occur.min = "0"
R
ELATED LINKS
:
Manipulating instances of a subform
359
4
Scripting Properties
4.156. minH
Specifies the minimum height for layout purposes.
The
minH property is relevant only if the enclosing container object is growable and has an h prop-
erty whose value is null. If you supply a value for the
h property, the container cannot grow vertically,
and this property is ignored.
4.156.1. Syntax
Reference_Syntax.minH = "0in | measurement"
4.156.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.156.3. Applies to
Model Object
4.156.4. Version
XFA 2.1
4.156.5. Examples
4.156.6. JavaScript
TextField1.minH = "0.5in";
360
Scripting Properties
4.156.7. FormCalc
TextField1.minH = "0.5in"
4
4.157. minW
Specifies the minimum width for layout purposes.
The
and this property is ignored.
4.157.1. Syntax
Reference_Syntax.minW = "0in | measurement"
4.157.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.157.3. Applies to
Model Object
4.157.4. Version
XFA 2.1
361
Scripting Properties
4.157.5. Examples
4.157.6. JavaScript
TextField1.minW = "0.5in";
4.157.7. FormCalc
TextField1.minW = "0.5in"
4.158. model
Specifies the model for the current object.
NOTE
:
This property is read only.
4.158.1. Syntax
Reference_Syntax.model
4.158.2. Values
Type
Object
Values
The root object for the particular XML Form Object Model, such as connectionSet or dataModel.
4.158.3. Applies to
4.158.4. Version
XFA 2.1
362
Scripting Properties
4.158.5. Examples
4.158.6. JavaScript
xfa.model.name;
4.158.7. FormCalc
xfa.model.name
4
4.159. modifier
Determines whether the modifier key (for example, Ctrl on Microsoft Windows
®
) is held down when a particular event executes.
4.159.1. JavaScript Syntax
Reference_Syntax.modifier = false | true;
- or -
Reference_Syntax.modifier = 0 | 1;
4.159.2. FormCalc Syntax
Reference_Syntax.modifier = 0 | 1
4.159.3. Values
Type
Boolean
Values
• true | 1(default)
• false | 0
Modifier key is held down during event execution.
• false | 0
Modifier key is not held down during event execution.
363
Scripting Properties
4.159.4. Applies to
Model
4.159.5. Version
XFA 2.1
4.159.6. Examples
4.159.7. JavaScript
xfa.event.modifier;
4.159.8. FormCalc
xfa.event.modifier
Object
4.160. moduleHeight
Determines the height of a set of bars used to encode one character of supplied text.
The allowable range of heights varies from one barcode pattern to another. The form design must not specify a height outside the allowable range.
4.160.1. Syntax
Reference_Syntax.moduleHeight = "5mm | measurement"
364
Scripting Properties
4.160.2. Values
Type
String
Values
•
5mm(default for 2D barcodes)
• Any valid measurement.
When this property is not supplied, the default behavior depends on the type of barcode.
One-dimensional barcodes grow to the height of the enclosing field, limited by the allowable height range. 2D barcodes default to a module height of
5mm.
4.160.3. Applies to
4
Model Object
4.160.4. Version
XFA 2.1
4.160.5. Examples
4.160.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").moduleHeight = "5mm";
4.160.7. FormCalc
Code11BarCode1.ui.#barcode.moduleHeight = "5mm"
4.161. moduleWidth
Specifies different aspects of a barcode depending on the class of barcodes being used.
365
Scripting Properties
For one-dimensional software barcodes the parser sets the width of the narrow bars to the value of this property. The width of the wide bars is derived from that of the narrow bars. The allowable range of widths varies from one barcode format to another. The form design must not specify a value outside the allowable range. If
moduleWidth is supplied, then the dataLength property is ignored.
Conversely moduleWidth has no default, so when the dataLength property is not supplied, then
moduleWidth must be supplied.
For 2D hardware barcodes, moduleWidth either has no effect or has the same effect as for a software barcode, depending upon the printer and barcode. The allowable range for the value varies between printers and between barcodes.
For 2D barcodes the value of this property determines the module width. A module is a set of bars encoding one symbol. Usually a symbol corresponds to a character of supplied data. The allowable range of widths varies from one barcode format to another. The form design must not specify a value outside the allowable range.
4.161.1. Syntax
Reference_Syntax.moduleWidth = "0.25mm | measurement"
4.161.2. Values
String
Type
•
0.25mm(default)
• Any valid measurement.
Values
4.161.3. Applies to
Model Object
4.161.4. Version
XFA 2.1
366
Scripting Properties
4.161.5. Examples
4.161.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").moduleWidth = "25mm";
4.161.7. FormCalc
Code11BarCode1.ui.#barcode.moduleHeight = "25mm"
4.162. multiLine
Specifies whether the text may span multiple lines.
The multiLineproperty is useful for clients such as HTML browsers that have two types of text editing interfaces.
4.162.1. Syntax
Reference_Syntax.multiLine = "1 | 0"
4.162.2. Values
4
String
Type Values
•
1(default)
•
0
The text may span multiple lines.
•
0
The text is limited to a single line.
367
Scripting Properties
4.162.3. Applies to
Model
4.162.4. Version
XFA 2.1
4.162.5. Examples
4.162.6. JavaScript
TextField1.resolveNode("ui.#textEdit").multiLine = "0";
4.162.7. FormCalc
TextField1.ui.#textEdit.multiLine = "0"
R
ELATED LINKS
:
Object
4.163. name
Specifies an identifier that may be used to specify this object or event in script expressions.
For example, this property specifies the name of the host application, and on an interactive PDF form, it returns Acrobat.
4.163.1. Syntax
Reference_Syntax.name
368
Scripting Properties
4.163.2. Values
String
Type
A string up to 255 characters.
4.163.3. Applies to
4.163.4. Version
XFA 2.1
4.163.5. Examples
4.163.6. JavaScript
xfa.host.name;
4.163.7. FormCalc
xfa.host.name
R
ELATED LINKS
:
Values
4.164. newContentType
Specifies the content type of the newText property.
For example, if newContentType='text/html', newText will contain an XHTML fragment.
4.164.1. Syntax
Reference_Syntax.newContentType = "allowRichText | plainTextOnly"
369
4
Scripting Properties
4.164.2. Values
Type
String
Values
• allowRichText(default)
• plainTextOnly
The field supports rich text.
• plainTextOnly
The field does not support rich text. Even if markup is present in the data, it should be passed through rather than interpreted. However, it is not guaranteed whether downstream processing will respond to the markup.
4.164.3. Applies to
Model
4.164.4. Version
XFA 2.1
4.164.5. Examples
4.164.6. JavaScript
xfa.event.newContentType = "plainTextOnly";
4.164.7. FormCalc
xfa.event.newContentType = "plainTextOnly"
Object
370
Scripting Properties
4.165. newText
Specifies the content of the field after it changes in response to user actions.
4.165.1. Syntax
Reference_Syntax.newtext = "string"
4.165.2. Values
String
Type
4.165.3. Applies to
A string up to 255 characters.
Model
4.165.4. Version
XFA 2.1
4.165.5. Examples
4.165.6. JavaScript
TextField2.rawValue = xfa.event.newText;
4.165.7. FormCalc
TextField2 = xfa.event.newText
R
ELATED LINKS
:
371
Values
Object
4
Scripting Properties
4.166. next
Specifies the constraints on keeping a form object together with the next container within a content area or page.
4.166.1. Syntax
Reference_Syntax.next = "none | contentArea | pageArea"
4.166.2. Values
Type
String
Values
• none(default)
• contentArea
• pageArea
The determination of whether a form object is rendered in the same content area or page together with the next container, respectively, is delegated to the processing application. No special keep constraints will be forced.
• contentArea
• pageArea
The form object is requested to be rendered in the same content area with the next container.
• pageArea
The form object is requested to be rendered in the same page with the next container.
4.166.3. Applies to
Model Object
372
Scripting Properties
4.166.4. Version
XFA 2.1
4.166.5. Examples
4.166.6. JavaScript
Subform1.keep.next = "contentArea";
4.166.7. FormCalc
Subform1.keep.next = "contentArea"
4
4.167. nodes
Returns a list of all child objects of the current object.
NOTE
:
Because the form DOM is sparse, nodes only get generated when they are accessed or needed.
Accessing the nodes property is not an accurate way to determine the children or properties of an object.
NOTE
:
This property is read only.
4.167.1. Syntax
Reference_Syntax.nodes
4.167.2. Values
Object
Type
4.167.3. Applies to
A list of XML Form Object Model objects.
Values
373
Scripting Properties
4.167.4. Version
XFA 2.1
4.167.5. Examples
4.167.6. JavaScript
Subform1.nodes; // Single line example
// This example displays the names of the children of Subform1 var oNodes = this.nodes; var nodesLength = oNodes.length; for (var i = 0; i < nodesLength; i++) { xfa.host.messageBox(oNodes.item(i).name)
}
4.167.7. FormCalc
Subform1.nodes // Single line example
// This example displays the names of the children of Subform1 var oNodes = Subform1.nodes var nodesLength = oNodes.length; for (var i = 0; i < nodesLength; i++) { xfa.host.messageBox(oNodes.item(i).name)
}
R
ELATED LINKS
:
Creating a node in the data model
4.168. nonRepudiation
Specifies an acceptable key usage extension that must be present in the signing certificate.
4.168.1. Syntax
Reference_Syntax.nonRepudiation = "Yes | No | empty_string"
374
Scripting Properties
4.168.2. Values
Type
String
Values
•
Yes(default)
•
No
•
""
The value must be set in the certificate for it to be acceptable.
•
No
•
""
The value must not be set in the certificate for it to be acceptable.
•
""
If unspecified or specified as an empty string, the certificate's attribute is disregarded.
4.168.3. Applies to
4
Model Object
4.168.4. Version
XFA 2.5
4.169. ns
Returns the namespace for the object.
If the particular object is the root of a model, then this property returns the namespace for the model.
NOTE
:
This property is read only.
375
Scripting Properties
4.169.1. Syntax
Reference_Syntax.ns
4.169.2. Values
Type
Object
Values
A valid string representing the namespace of the current object, or the namespace of the current model if the root object is the currently selected object.
4.169.3. Applies to
4.169.4. Version
XFA 2.1
4.170. nullTest
Controls whether a field is mandatory on a form or if it can be left empty.
The nullTestproperty can be used for validations. A nullTest validation is evaluated only as a result of pre-event validation , such as preSubmit, prePrint, preSave, or preExecute, depending on the value of
$config.present.validate, or an explicit scripting call to execValidate.
A container becomes invalid as the result of evaluating the first validation test that fails. A container becomes valid if no validation tests fail. A container is valid when no validation tests are evaluated for that container. In that validation context, nullTest is not evaluated and there is no other validation test.
For example, a field that is currently invalid because of a nullTest validation could become valid as a result of a value being entered. Returning to the field and entering an empty value does not cause the nullTest validation to be executed automatically, so the field could become valid again. A subsequent attempt to submit the form would cause the field to become invalid again because of the nullTest.
If the
rawValue for a field is null or empty, the nullTestvalidation failed .
376
Scripting Properties
4.170.1. Syntax
Reference_Syntax.nullTest = "disabled | error | warning"
4
377
Scripting Properties
4.170.2. Values
Type
String
Values
• disabled(default)
• error
• warning
• dismiss: The user understands the form’s recommendation and wishes to return to the form and satisfy this constraint.
• override: The user understands the form’s recommendation, but has chosen to contravene this constraint.
Do not perform this test (default). The form object is permitted to have a value of null. The field can be left without a value and it will not negatively impact the validity of the form. This value disables the validation test.
• error
• warning
• dismiss: The user understands the form’s recommendation and wishes to return to the form and satisfy this constraint.
• override: The user understands the form’s recommendation, but has chosen to contravene this constraint.
Emit an error message and refuse to accept an empty field. The form object is required to have a non-null value.
• warning
• dismiss: The user understands the form’s recommendation and wishes to return to the form and satisfy this constraint.
• override: The user understands the form’s recommendation, but has chosen to contravene this constraint.
Emit a warning message if the field is empty, but allow the user to proceed to the next field. The message must inform the user that the form object is recommended to have a value, and provide two choices:
• dismiss: The user understands the form’s recommendation and wishes to return to the form and satisfy this constraint.
• override: The user understands the form’s recommendation, but has chosen to contravene this constraint.
378
Scripting Properties
4.170.3. Applies to
Model
4.170.4. Version
XFA 2.1
4.170.5. Examples
4.170.6. JavaScript
TextField1.validate.nullTest = "error";
4.170.7. FormCalc
TextField1.validate.nullTest = "error"
Object
4.171. numbered
Specifies whether the page area is considered a numbered page area.
Numbered page areas contribute to the normal incrementing of page numbers, whereas unnumbered pages occur without incrementing page numbering.
4.171.1. Syntax
Reference_Syntax.numbered = "auto | none"
4
379
Scripting Properties
4.171.2. Values
Type
String
Values
• auto(default)
• none
The page area represents a numbered page area. Therefore the instantiation of the page area contributes to the incrementing of the current page area number.
• none
The page area does not contribute to the incrementing of the current page area numbering.
4.171.3. Applies to
Object Model
4.171.4. Version
XFA 2.1
4.171.5. Examples
4.171.6. JavaScript
xfa.form.form1.pageSet.Page1.numbered = "none";
4.171.7. FormCalc
xfa.form.form1.pageSet.Page1.numbered = "none"
380
Scripting Properties
4.172. numberOfCells
4
Indicates the number of cells drawn for a comb field. This is not affected by the number of characters in the field’s value.
4.172.1. Syntax
Reference_Syntax.numberOfCells = "0 | integer"
4.172.2. Values
Type
Integer
Values
•
0(default)
•
integer
A single cell is drawn for the comb field, or if the maxChars property is set, the number of cells corresponds to the value of maxChars.
•
integer
A valid integer representing the total number of cells drawn for the comb field.
4.172.3. Applies to
Model Object
4.172.4. Version
XFA 2.5
4.172.5. Examples
4.172.6. JavaScript
TextField1.resolveNode("ui.#textEdit.comb").numberOfCells = "6";
381
4.172.7. FormCalc
TextField1.ui.#textEdit.comb.numberOfCells = "6"
4.173. numPages
Returns the number of pages in the current document.
4.173.1. Syntax
Reference_Syntax.numPages
4.173.2. Values
Type
Integer
Values
A valid integer representing the total number of pages.
4.173.3. Applies to
Model
4.173.4. Version
XFA 2.1
4.173.5. Examples
4.173.6. JavaScript
xfa.host.numPages;
Object
Scripting Properties
382
Scripting Properties
4.173.7. FormCalc
xfa.host.numPages
R
ELATED LINKS
:
Working with page numbers and page counts
4.174. oddOrEven
Specifies whether a page is odd or even for pagination within a set of pages.
4.174.1. Syntax
Reference_Syntax.oddOrEven = "any | odd | even"
4.174.2. Values
Type
String
Values
• any(default)
• odd
• even
Matches any page within a document.
• odd
• even
Matches the first page within a document and every other page after that, irrespective of page numbering.
• even
Matches the second page within a document and every other page after that, irrespective of page numbering.
4
383
Scripting Properties
4.174.3. Applies to
Model Object
4.174.4. Version
XFA 2.5
4.174.5. Examples
The reference syntax expression will vary, depending on the object from which it is invoked.
4.174.6. JavaScript
xfa.form.form1.pageSet.Page1.oddOrEven = "even";
4.174.7. FormCalc
xfa.form.form1.pageSet.Page1.oddOrEven = "even"
4.175. oneOfChild
Retrieves or sets that child object in the case where a parent object can only have one of a particular child object.
4.175.1. Syntax
Reference_Syntax.oneOfChild = "object"
384
Scripting Properties
4.175.2. Values
Object
Type
The one of child object.
4.175.3. Applies to
4.175.4. Version
XFA 2.1
4.175.5. Examples
4.175.6. JavaScript
TextField1.value.oneOfChild;
4.175.7. FormCalc
TextField1.value.oneOfChild
R
ELATED LINKS
:
Values
4.176. open
Determines when the choice list is presented by interactive applications.
4.176.1. Syntax
Reference_Syntax.open = "userControl | onEntry | always | multiSelect"
4
385
Scripting Properties
4.176.2. Values
Type
String
Values
• userControl(default)
• onEntry
• always
• multiSelect
The list drops down when the user clicks on a button or makes some other appropriate gesture. The list disappears when the cursor moves outside the list or some other appropriate user-interface event occurs.
• onEntry
• always
• multiSelect
The list drops down on entry into the field. It disappears upon exit from the field.
• always
• multiSelect
The list is displayed when the field is visible.
• multiSelect
The user can select multiple entries from the list by pressing the Shift key while making selections.
The list of choices is displayed when the field is visible.
4.176.3. Applies to
Model Object
4.176.4. Version
XFA 2.1
386
Scripting Properties
4.176.5. Examples
4.176.6. JavaScript
DropDownList1.resolveNode("ui.#choiceList").open = "always";
4.176.7. FormCalc
DropDownList1.ui.#choiceList.open = "always"
4
4.177. operation
Indicates the digital signature operation to perform when used in conjunction with the signData
object, or the object to link to when used in conjunction with the traverse object.
4.177.1. Syntax
Reference_Syntax.signData.operation = "sign | verify | clear"
- or -
Reference_Syntax.traverse.operation = "next | up | down | left | right | back | first"
387
Scripting Properties
4.177.2. Values
Type
String
Values
For digital signatures (using the signDataobject):
• sign
• verify
• clear
Add an XML signature to the XML data being submitted. This operation does not modify the application’s active document.
• verify
• clear
Verifies an XML signature. If the verification fails, the submission processes are canceled and the application issues a message indicating why the submission failed. This operation is performed before any signature is created or cleared.
• clear
Removes an XML signature, if it exists, from the XML data being submitted. This operation does not modify the application’s active document and is performed before any signature is created.
For object-linking (using the traverseobject):
• next(default)
Used when the user presses the Tab key or enters the final character in a fixed-width field. However, the same chain of next links is also traversed by the screen reader when reading the form. Defaults to left-to-right top-to-bottom order.
The chain of next links can include boilerplate objects, but these objects cannot accept input focus.
Therefore, when advancing focus to the next form object, tabbing continues until an object that accepts input focus is reached. You must ensure that the form design does not present a non-terminating loop.
This property is used only when the container is a subform or subform set. The link points to the object that gains focus when the container is entered. In effect the container delegates focus via this link.
Defaults to the first container that is a child of this container, in top-to-bottom left-to-right order.
4.177.3. Applies to
Model
Object
388
Scripting Properties
4.177.4. Version
XFA 2.4
4.178. orientation
Specifies the orientation of the medium.
4.178.1. Syntax
Reference_Syntax.orientation = "portrait | landscape"
4.178.2. Values
Type
String
Values
• portrait(default)
• landscape
The orientation of the medium places the short edge at the top.
• landscape
The orientation of the medium places the long edge at the top.
4.178.3. Applies to
Model
4.178.4. Version
XFA 2.1
Object
389
4
4.178.5. Examples
4.178.6. JavaScript
xfa.form.form1.pageSet.Page1.medium.orientation = "landscape";
4.178.7. FormCalc
xfa.form.form1.pageSet.Page1.medium.orientation = "landscape"
Scripting Properties
4.179. output
Specifies the output message associated with a particular WSDL connection operation.
4.179.1. Syntax
Reference_Syntax.output = "string"
4.179.2. Values
String
Type Values
A valid string representing the output message.
4.179.3. Applies to
Model
4.179.4. Version
XFA 2.1
Object
390
Scripting Properties
4.179.5. Examples
4.179.6. JavaScript
xfa.connectionSet.DataConnection.operation.output = "Connection successful.";
4.179.7. FormCalc
xfa.connectionSet.DataConnection.operation.output = "Connection successful."
4
4.180. overflowLeader (deprecated)
Specifies the subform to place at the top of the content area or page when it is entered as a result of an overflow.
As of XFA version 2.8, this property is now deprecated. See leader.
4.180.1. Syntax
Reference_Syntax.overflowLeader = "string"
4.180.2. Values
Type
String
Values
A valid string representing the name or fully qualified reference syntax expression of a subform.
4.180.3. Applies to
Model Object
391
Scripting Properties
4.180.4. Version
XFA 2.1
4.180.5. Examples
4.180.6. JavaScript
Subform1.break.overflowLeader = "Subform2";
4.180.7. FormCalc
Subform1.break.overflowLeader = "Subform2"
4.181. overflowTarget (deprecated)
Specifies the explicit content area that will be the transition target when the current content area or page area overflows.
As of XFA version 2.8, this property is now deprecated. See overflow.target.
4.181.1. Syntax
Reference_Syntax.overflowTarget = "string"
4.181.2. Values
Type
String
Values
The name or fully qualified reference syntax expression of a content area.
392
Scripting Properties
4.181.3. Applies to
Model Object
4.181.4. Version
XFA 2.1
4.181.5. Examples
4.181.6. JavaScript
Subform1.break.overflowTarget = "xfa.form.form1.pageSet.Page1.Content_Main";
4.181.7. FormCalc
Subform1.break.overflowTarget = "xfa.form.form1.pageSet.Page1.Content_Main"
4.182. overflowTrailer (deprecated)
Specifies the subform to place at the bottom of the content area or page when it overflows.
The vertical space required for the overflow trailer must be reserved.
As of XFA version 2.8, this property is now deprecated. See trailer.
4.182.1. Syntax
Reference_Syntax.overflowTrailer = "string"
4
393
Scripting Properties
4.182.2. Values
Type
String
Values
A valid string representing the name or fully qualified reference syntax expression of a subform.
4.182.3. Applies to
Model
4.182.4. Version
XFA 2.1
4.182.5. Examples
4.182.6. JavaScript
Subform1.break.overflowTrailer = "Subform2";
4.182.7. FormCalc
Subform1.break.overflowTrailer = "Subform2"
Object
4.183. override
When used with the calculate object, the
override property indicates whether the field allows
overrides to occur and disables or enables calculations. When used with the value object, the
override property indicates whether a calculation override has occurred.
When there is no accompanying calculate object, this property has no effect and the user can enter
a value in the field.
394
Scripting Properties
4.183.1. Syntax
Reference_Syntax.override = "error | ignore | disabled | warning"
4
395
4.183.2. Values
Scripting Properties
396
Scripting Properties 4
397
Scripting Properties
Type
String
Values
• error
• ignore
• disabled
• warning
•
Dismissindicates that the user wants to use the calculated value.
•
Overrideindicates that the user understands the message, but chooses to override the calculated value.
The calculation is enabled and the user cannot override the calculated value. If the user tries to override the calculated value, the processing application displays an error message. To avoid the need for error messages, form designers can define these fields as read-only.
This is the default override value if the calculateobject is included in the container object.
• ignore
• disabled
• warning
•
Dismissindicates that the user wants to use the calculated value.
•
Overrideindicates that the user understands the message, but chooses to override the calculated value.
The calculated value is supplied as a default. If the user overrides the value, the processing application allows the override to occur without displaying any warning message to the user.
This is the default override value if the calculateobject is omitted from the container.
• disabled
• warning
•
Dismissindicates that the user wants to use the calculated value.
•
Overrideindicates that the user understands the message, but chooses to override the calculated value.
The calculation is disabled. In an interactive context, the user can enter data in the field. The effect of this override value is independent of user action. The disabledvalue allows an event script to dynamically enable or disable a calculate object.
• warning
•
Dismissindicates that the user wants to use the calculated value.
•
Overrideindicates that the user understands the message, but chooses to override the calculated value.
The calculation is enabled and the calculated value is recommended over user-input values. If the user overrides the calculated value, the processing application displays a warning message. The message informs the user that the form object should use a calculated value and provides the user with two choices:
•
Dismissindicates that the user wants to use the calculated value.
398
•
Overrideindicates that the user understands the message, but chooses to override the calculated value.
Scripting Properties
4.183.3. Applies to
Model
4.183.4. Version
XFA 2.1
4.183.5. Examples
4.183.6. JavaScript
TextField1.calculate.override = "disabled";
4.183.7. FormCalc
TextField1.calculate.override = "disabled"
Object
4.184. pagePosition
Specifies a page’s position within a set of pages.
4.184.1. Syntax
Reference_Syntax.pagePosition = "any | first | last | rest | only"
4
399
Scripting Properties
4.184.2. Values
String
Type Values
• any(default)
• first
• last
• rest
• only
Matches any pages with a contiguous set of pages.
• first
• last
• rest
• only
Matches the first page within a contiguous sequence of pages.
• last
• rest
• only
Matches the last page within a contiguous sequence of pages.
• rest
• only
Matches any page that is both not the first or the last in a sequence of pages.
• only
Matches a single page sequence.
4.184.3. Applies to
Model Object
400
Scripting Properties
4.184.4. Version
XFA 2.5
4.184.5. Examples
The reference syntax expression will vary, depending on the object from which it is invoked.
4
4.184.6. JavaScript
xfa.form.form1.pageSet.Page1.pagePosition = "only";
4.184.7. FormCalc
xfa.form.form1.pageSet.Page1.pagePosition = "only"
4.185. parent
Returns the parent object of the current object.
NOTE
:
This property is read only.
4.185.1. Syntax
Reference_Syntax.parent
4.185.2. Values
Object
Type
4.185.3. Applies to
An XML Form Object Model object.
Values
401
Scripting Properties
4.185.4. Version
XFA 2.1
4.185.5. Examples
4.185.6. JavaScript
TextField1.parent;
4.185.7. FormCalc
TextField1.parent
R
ELATED LINKS
:
Manipulating instances of a subform
4.186. parentSubform
Specifies the parent subform (page) of this field.
4.186.1. Syntax
Reference_Syntax.parentSubform = "string"
4.186.2. Values
Type
String
Values
A valid string representing the name or fully qualified reference syntax expression of the parent subform object.
402
Scripting Properties
4.186.3. Applies to
Model
4.186.4. Version
XFA 2.1
4.186.5. Examples
4.186.6. JavaScript
TextField1.parentSubform;
4.186.7. FormCalc
TextField1.parentSubform
Object
4.187. passwordChar
Specifies the character the form displays for each password character a user enters.
4.187.1. Syntax
Reference_Syntax.passwordChar = "* | character"
4.187.2. Values
String
Type
•
“*”(asterisk) (default)
• Any valid single character.
Values
403
4
Scripting Properties
4.187.3. Applies to
Model Object
4.187.4. Version
XFA 2.1
4.187.5. Examples
4.187.6. JavaScript
PasswordField1.resolveNode("ui.#passwordEdit").passwordChar = "*";
4.187.7. FormCalc
PasswordField1.ui.#passwordEdit.passwordChar = "*"
4.188. permissions
Specifies the access permissions granted for a form that includes an author signature.
For information about author signatures, see signatureType.
4.188.1. Syntax
Reference_Syntax.permissions = "1 | 2 | 3"
404
Scripting Properties
4.188.2. Values
Type
String
Values
•
1
•
2(default)
•
3
No changes to the document are permitted. Any change to the document invalidates the signature.
•
2(default)
•
3
The permitted changes are filling in forms, instantiating page templates, and signing. Other changes invalidate the signature.
•
3
The permitted changes are those allowed by 2, as well as annotation creation, deletion, and modification. Other changes invalidate the signature.
4.188.3. Applies to
4
Model Object
4.188.4. Version
XFA 2.5
4.189. placement
Specifies the placement of the caption.
4.189.1. Syntax
Reference_Syntax.placement = "left | right | top | bottom | inline"
405
4.189.2. Values
Type
String
Values
• left(default)
• right
• top
• bottom
• inline
Locates the caption to the left of the content.
• right
• top
• bottom
• inline
Locates the caption to the right of the content.
• top
• bottom
• inline
Locates the caption above the content.
• bottom
• inline
Locates the caption below of the content.
• inline
Locates the caption inline immediately before to the content.
4.189.3. Applies to
Model
Object
Scripting Properties
406
Scripting Properties
4.189.4. Version
XFA 2.1
4.189.5. Examples
4.189.6. JavaScript
TextField1.caption.placement = "left";
4.189.7. FormCalc
TextField1.caption.placement = "left"
4.190. platform
Returns the platform of the machine running the script.
NOTE
:
This property is read only.
4.190.1. Syntax
Reference_Syntax.platform
4.190.2. Values
Type
String
Values
A valid string representing the operating system. For example, in the case of a PDF form in Acrobat, this property returns one of:
WIN,MAC, orUNIX.
4
407
4.190.3. Applies to
Model
4.190.4. Version
XFA 2.1
4.190.5. Examples
4.190.6. JavaScript
xfa.host.platform;
4.190.7. FormCalc
xfa.host.platform
4.191. posture
Specifies the posture of the font.
4.191.1. Syntax
Reference_Syntax.posture = "normal | italic"
Object
Scripting Properties
408
Scripting Properties
4.191.2. Values
String
Type
• normal(default)
• italic
The font has a normal posture.
• italic
The font is italicized.
4.191.3. Applies to
Model
4.191.4. Version
XFA 2.1
4.191.5. Examples
4.191.6. JavaScript
TextField1.font.posture = "italic";
4.191.7. FormCalc
TextField1.font.posture = "italic"
4.192. presence
Specifies an object’s visibility.
409
Values
Object
4
Scripting Properties
4.192.1. Syntax
Reference_Syntax.presence = "visible | invisible | hidden | inactive"
4.192.2. Values
Type
String
Values
• visible(default)
• The object is visible.
• invisible
• The object is transparent. Although invisible, the object still takes up space.
• hidden
• The object is hidden. The form does not display the object and the object does not take up space on the form’s layout.
• inactive
• Applies only to objects that represent containers:
subform. For all other objects the inactive state should be treated the same as
hidden. The container participates in the data merge process. Associated calculations and validations within the container must not fire. All event processing associated with the container must not occur. The rendering of the container must be the same as for the hidden state.
• This value is available only for XFA 2.9 and newer processors. Older processors treat presence="inactive" as presence="visible".
410
Scripting Properties
4.192.3. Applies to
Model Object
4.192.4. Version
XFA 2.1
4.192.5. Examples
4.192.6. JavaScript
TextField1.presence = "hidden";
4.192.7. FormCalc
TextField1.presence = "hidden"
R
ELATED LINKS
:
Making an object visible or invisible
4.193. preserve
Specifies widow/orphan-style constraints on the overflow behavior of the content within the enclosing container.
4
411
Scripting Properties
4.193.1. Syntax
Reference_Syntax.preserve = "0 | integer | all"
4.193.2. Values
Type
String
Values
•
0(default)
• integer
• all
The content is broken across an overflow boundary.
• integer
• all
An integer value greater than zero specifies the minimum quantity of content that must transition across the overflow boundary. For instance, specifying an integer value of
2would prevent a single line of content from being widowed across the overflow boundary; it would result in a minimum of two lines of content transitioning across the overflow boundary.
• all
Each paragraph of content must be kept intact and therefore cannot be broken across an overflow boundary.
4.193.3. Applies to
Model Object
4.193.4. Version
XFA 2.1
412
Scripting Properties
4.193.5. Examples
4.193.6. JavaScript
TextField1.para.preserve = "all";
4.193.7. FormCalc
TextField1.para.preserve = "all"
4.194. prevContentType
Specifies the content type of the value specified for the prevText property.
For example, if prevContentType='text/html', prevText contains an XHTML fragment.
4.194.1. Syntax
Reference_Syntax.prevContentType = "allowRichText | plainTextOnly"
4.194.2. Values
4
String
Type
• allowRichText(default)
• plainTextOnly
The field supports rich text.
• plainTextOnly
The field does not support rich text.
Values
413
Scripting Properties
4.194.3. Applies to
Model
4.194.4. Version
XFA 2.1
4.194.5. Examples
4.194.6. JavaScript
xfa.event.prevContentType = "plainTextOnly";
4.194.7. FormCalc
xfa.event.prevContentType = "plainTextOnly"
Object
4.195. previous
Specifies the constraints on keeping a form object together with the previous container within a content area or page.
4.195.1. Syntax
Reference_Syntax.previous = "none | contentArea | pageArea"
414
Scripting Properties
4.195.2. Values
Type
String
Values
• none(default)
• contentArea
• pageArea
The determination of whether a form object renders in the same content area or page together with the previous object or subform will be delegated to the processing application. No special constraints are forced.
• contentArea
• pageArea
The form object is requested to be rendered in the same content area with the previous object or subform.
• pageArea
The form object is requested to be rendered in the same page with the previous object or subform.
4.195.3. Applies to
Object Model
4.195.4. Version
XFA 2.1
4.195.5. Examples
4.195.6. JavaScript
Subform1.keep.previous = "contentArea";
4
415
Scripting Properties
4.195.7. FormCalc
Subform1.keep.previous = "contentArea"
4.196. prevText
Specifies the content of the field before it changes in response to the actions of a user.
The prevTextvalue can be recalled, similar to an undo feature.
4.196.1. Syntax
Reference_Syntax.prevText
4.196.2. Values
String
Type
4.196.3. Applies to
A string up to 255 characters.
Model
4.196.4. Version
XFA 2.1
4.196.5. Examples
4.196.6. JavaScript
xfa.event.prevText;
Values
Object
416
Scripting Properties
4.196.7. FormCalc
xfa.event.prevText
R
ELATED LINKS
:
4
4.197. printCheckDigit
Specifies whether to print the check digits in the human-readable text.
The parser ignores this property if the checksum property has a value of
erty has a value of
1 and the standard behavior for the barcode type is to not include a checksum.
4.197.1. Syntax
Reference_Syntax.printCheckDigit = "0 | 1"
4.197.2. Values
Type
String
Values
•
0(default)
•
1
Do not print the check digit in the human-readable text, only in the barcode itself.
•
1
Append the check digit to the end of the human-readable text.
4.197.3. Applies to
Model Object
417
Scripting Properties
4.197.4. Version
XFA 2.1
4.197.5. Examples
4.197.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").printCheckDigit = "1";
4.197.7. FormCalc
Code11BarCode1.ui.#barcode.printCheckDigit = "1"
4.198. priority
Alters the search path for text to speak. Whichever object is named in this property moves to the front of the search path. The other objects retain their relative order.
4.198.1. Syntax
Reference_Syntax.priority = "custom | caption | name | tooltip"
418
Scripting Properties
4.198.2. Values
String
Type
4.198.3. Applies to
Values
• custom(default)
• caption
• name
• tooltip
The search order is speak, tooltip, caption, the container’s name.
• caption
• name
• tooltip
The search order is caption, speak, tooltip, the container’s name.
• name
• tooltip
The search order is the container’s name, speak, tooltip, caption.
• tooltip
The search order is tooltip, speak, caption, the container’s name.
Model Object
4.198.4. Version
XFA 2.1
4
419
Scripting Properties
4.198.5. Examples
4.198.6. JavaScript
TextField1.assist.speak.priority = "tooltip";
4.198.7. FormCalc
TextField1.assist.speak.priority = "tooltip"
4.199. pushCharacterCount
Specifies the minimum number of grapheme clusters, exclusive of any hyphen glyphs added to the start of the next line, allowed in a suffix for the hyphenation point to be considered. If the suffix is too short, the candidate is rejected.
4.199.1. Syntax
Reference_Syntax.pushCharacterCount = "integer"
4.199.2. Values
Type
Integer
Values
A valid integer representing the minimum grapheme clusters. The default value is
3.
4.199.3. Applies to
Model Object
420
Scripting Properties
4.199.4. Version
XFA 2.8
4
4.200. radius
Specifies the radius of the corner.
The radiusproperty always influences the appearance of round corners, but will also determine the depth of an inverted square corner. Each edge is trimmed from its end points by the corner radius, regardless of the values of the inverted and join properties. In general, this is of no consequence, because the corner will visibly join with the edges at their trim points. However, if the corner specifies a presence if invisible, the trimming of the edges will become apparent, even when the corner is square and not inverted.
4.200.1. Syntax
Reference_Syntax.radius = "0in | measurement"
4.200.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.200.3. Applies to
Model Object
4.200.4. Version
XFA 2.1
421
4.200.5. Examples
4.200.6. JavaScript
TextField1.border.corner.radius = "0.5in";
4.200.7. FormCalc
TextField1.border.corner.radius = "0.5in"
4.201. radixOffset
Specifies an offset value for the anchor of the paragraph.
4.201.1. Syntax
Reference_Syntax.radixOffset = "0in | measurement"
4.201.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.201.3. Applies to
Model
4.201.4. Version
XFA 2.1
Object
Scripting Properties
422
Scripting Properties
4.201.5. Examples
4.201.6. JavaScript
NumericField1.para.radixOffset = "0in";
4.201.7. FormCalc
NumericField1.para.radixOffset = "0in"
4.202. rate
Specifies the percentage of stipple color that is stippled over a solid background color.
The background color is not specified by the stipple object.
4.202.1. Syntax
Reference_Syntax.rate = "50 | integer"
4.202.2. Values
Type
String
Values
•
50(default)
• Any valid integer value between
0and 100, where0results in no visible stippling drawn over the background color and
100results in a complete obscuring of the background color by filling the area completely with stipple color.
Any stipple rate between
0and100results in a varying blend of background color and an overlaid stipple color. For example, a stipple rate of
50results in an equal blend of background color and stipple color.
4
423
4.202.3. Applies to
Model
4.202.4. Version
XFA 2.1
4.202.5. Examples
4.202.6. JavaScript
TextField1.border.fill.stipple.rate = "75";
4.202.7. FormCalc
TextField1.border.fill.stipple.rate = "75"
4.203. rawValue
Specifies the unformatted value of the current object.
For example, this property can return or set the value of a field.
4.203.1. Syntax
Reference_Syntax.rawValue = "value"
Object
Scripting Properties
424
Scripting Properties
4.203.2. Values
Type
Varies
Values
Values differ depending on the referencing object. For example, for objects that require a color value, this property specifies a comma-separated list of values for each color component of the color space in the form r,g,b.
Alternatively, the rawValueproperty of afieldobject is a string representing the actual value displayed in the field, or the field’s bound value.
4.203.3. Applies to
Model Object
4
4.203.4. Version
XFA 2.1
4.203.5. Examples
4.203.6. JavaScript
TextField1.rawValue = "Hello";
4.203.7. FormCalc
TextField1.rawValue = "Hello"
R
ELATED LINKS
:
Creating a node in the data model
Getting or setting object values
Working with page numbers and page counts
425
Scripting Properties
Using radio buttons and check boxes
Determining that a form has changed
4.204. ready
Specifies whether the form layout process is complete and scripting tasks can begin.
NOTE
:
This property is read only.
4.204.1. JavaScript Syntax
Reference_Syntax.ready;
4.204.2. FormCalc Syntax
Reference_Syntax.ready
4.204.3. Values
Boolean
Type Values
true | 1(default)
Layout process is complete.
• false | 0
Layout process is not complete.
4.204.4. Applies to
Model Object
426
Scripting Properties
4.204.5. Version
XFA 2.1
4.204.6. Examples
4.204.7. JavaScript
xfa.layout.ready;
4.204.8. FormCalc
xfa.layout.ready
4.205. recordsAfter
Returns the number of records in the data window following the current record.
NOTE
:
This property is read only.
4.205.1. Syntax
Reference_Syntax.recordsAfter
4.205.2. Values
Type
Integer
Values
A valid integer value between
0 and the index value of the last record in the source data.
4.205.3. Applies to
Model Object
427
4
Scripting Properties
4.205.4. Version
XFA 2.1
4.205.5. Examples
4.205.6. JavaScript
xfa.dataWindow.recordsAfter;
4.205.7. FormCalc
xfa.dataWindow.recordsAfter
For an example of using the recordsAfter property to browse data records, see the example
Browsing records stored in a data file available at www.adobe.com/go/dev_lc_scripting_samples.
4.206. recordsBefore
Returns the number of records that are in the data window prior to the current record.
NOTE
:
This property is read only.
4.206.1. Syntax
Reference_Syntax.recordsBefore
4.206.2. Values
Type
Integer
Values
A valid integer value between
0 and the index value of the first record in the source data.
428
Scripting Properties
4.206.3. Applies to
4
Model Object
4.206.4. Version
XFA 2.1
4.206.5. Examples
4.206.6. JavaScript
xfa.dataWindow.recordsBefore;
4.206.7. FormCalc
xfa.dataWindow.recordsBefore
For an example of using the recordsBefore property to browse data records, see the example
Browsing records stored in a data file available at www.adobe.com/go/dev_lc_scripting_samples.
4.207. reenter
Specifies whether the enter event is occurring for the first time. The enter event occurs each time a user clicks in a field.
The first time a user clicks in a field, an enter event is sent with the reenter property set to false. If the user clicks in the field again or presses the Enter key, another enter event is sent with the reenter property set to true.
4.207.1. JavaScript Syntax
Reference_Syntax.reenter = false | true;
- or -
Reference_Syntax.reenter = 0 | 1;
429
4.207.2. FormCalc Syntax
Reference_Syntax.reenter = 0 | 1
4.207.3. Values
Type
Boolean
4.207.4. Applies to
• true | 1
• false | 0
The enter event has already occurred.
• false | 0
The enter event occurs for the first time.
Values
Model
4.207.5. Version
XFA 2.1
4.207.6. Examples
4.207.7. JavaScript
xfa.event.reenter = 0;
4.207.8. FormCalc
xfa.event.reenter = 0
Object
Scripting Properties
430
Scripting Properties
4.208. ref
Specifies a reference syntax expression defining the node in the data model to which the enclosing container will bind.
4
4.208.1. Syntax
Reference_Syntax.ref = "string"
4.208.2. Values
Type
String
4.208.3. Applies to
A valid reference syntax expression.
Values
Model
4.208.4. Version
XFA 2.1
4.209. relation
Specifies the relationship among the members of the set.
431
Object
Scripting Properties
NOTE
:
Beginning with Acrobat 8.0, this property is read only.
4.209.1. Syntax
Reference_Syntax.relation (Acrobat 8.x and later)
Reference_Syntax.relation = "ordered | unordered | choice" (Acrobat 7.x and earlier)
4.209.2. Values
Type
String
Values
• ordered(default)
• unordered
• choice
Instantiates members in the order in which they are declared in the form design. This has the effect of potentially re-ordering the content to satisfy the document order of the form design.
• unordered
• choice
Instantiates the members in data order regardless of the order in which they are declared. This has the effect of potentially re-ordering the set to satisfy the ordering of the content.
• choice
The members are exclusive of each other, and only one member may be instantiated. The determination of which member to instantiate is based upon the data.
4.209.3. Applies to
Model Object
4.209.4. Version
XFA 2.1
432
Scripting Properties
4.209.5. Examples
4.209.6. JavaScript
xfa.form.form1.resolveNode("#subformSet").relation;
4.209.7. FormCalc
xfa.form.form1.#subformSet.relation
4.210. relevant
Controls whether a form object is included when the form is printed.
4.210.1. Syntax
Reference_Syntax.relevant = "+print | -print"
4.210.2. Values
Type
String
Values
•
+print | print(default for visible objects)
Forces a particular object to appear when the form is
printed, regardless of the object’s presence property
setting.
•
-print(default for invisible or hidden objects)
Forces an object not to appear when the form is
printed, regardless of the object’s presence property
setting.
4
433
Scripting Properties
4.210.3. Applies to
Model Object
4.210.4. Version
XFA 2.1
4.210.5. Examples
4.210.6. JavaScript
Button1.relevant = "-print";
4.210.7. FormCalc
Button1.relevant = "-print"
R
ELATED LINKS
:
Making an object visible or invisible
4.211. remainCharacterCount
Specifies the minimum number of grapheme clusters, exclusive of any hyphen glyphs added to the end of the line, allowed in a prefix for the hyphenation point to be considered. If the prefix is too short, the candidate is rejected.
434
Scripting Properties
4.211.1. Syntax
Reference_Syntax.remainCharacterCount = "integer"
4.211.2. Values
Type
Integer
Values
A valid integer representing the number of grapheme clusters. The default value is
3.
4.211.3. Applies to
4
Model Object
4.211.4. Version
XFA 2.8
4.212. reserve
A measurement value that specifies the height or width of the caption.
The effect of this property is determined by the placement property. When the caption is placed at
the left or right, the reserveproperty specifies the height of the caption region. When the caption is placed at the top or bottom, the reserveproperty specifies the width. When the caption is placed inline, the reserveproperty is ignored.
A reserve of
0sets the caption area to auto-fit. It adjusts the size of the object to fit the caption.
4.212.1. Syntax
Reference_Syntax.reserve = "measurement"
435
Scripting Properties
4.212.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.212.3. Applies to
Model
4.212.4. Version
XFA 2.1
4.212.5. Examples
4.212.6. JavaScript
TextField1.caption.reserve = "1.5in";
4.212.7. FormCalc
TextField1.caption.reserve = "1.5in"
Object
4.213. restoreState
Restores the form nodes of a form to their original state, including resetting the visual properties of fields such as changes to border colors.
436
Scripting Properties
4.213.1. Syntax
Reference_Syntax.restoreState = "none | manual | auto"
4
437
4.213.2. Values
Scripting Properties
438
Scripting Properties
439
Type
String
Values
• none(default): The state and restore information are not saved.
• manual: Specific properties are saved and restored using script objects.
• The checksum is verified.
•
All state information is restored using the restore method.
• Field values and calculation overrides are restored if the checksum was valid.
• auto(default for new forms): Automatically saves and restores the form to its original state. When opening a certified form, the state will not be restored. On an uncertified form, certification of the document will not be allowed.
• The checksum is verified
• After the merge step is complete but prior to calculations being executed, each form node will have its state restored using the saved form model only if the checksum was valid.
• Field values and calculation overrides are restored if the checksum was valid.
If the root subform uses this value, the following properties are saved and restored:
• The checksum is verified.
•
All state information is restored using the restore method.
• Field values and calculation overrides are restored if the checksum was valid.
• auto(default for new forms): Automatically saves and restores the form to its original state. When opening a certified form, the state will not be restored. On an uncertified form, certification of the document will not be allowed.
• The checksum is verified
• After the merge step is complete but prior to calculations being executed, each form node will have its state restored using the saved form model only if the checksum was valid.
• Field values and calculation overrides are restored if the checksum was valid.
The autosetting can not be used for certified documents.
If the root subform uses this value, the following properties and saved and restored:
• The checksum is verified
• After the merge step is complete but prior to calculations being executed, each form node will have its state restored using the saved form model only if the checksum was valid.
• Field values and calculation overrides are restored if the checksum was valid.
4
4.213.3. Applies to
Model
4.213.4. Version
XFA 2.5
4.213.5. Examples
4.213.6. JavaScript
Subform1.restoreState = "auto";
4.213.7. FormCalc
Subform1.restoreState = "auto"
4.214. rightInset
Specifies the size of the right inset.
4.214.1. Syntax
Reference_Syntax.rightInset = "0in | measurement"
4.214.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
Object
Scripting Properties
440
Scripting Properties
4.214.3. Applies to
Model
4.214.4. Version
XFA 2.1
4.214.5. Examples
4.214.6. JavaScript
Subform1.margin.rightInset = "0.25in";
4.214.7. FormCalc
Subform1.margin.rightInset = "0.25in"
4.215. role
Specifies the role played by the parent container.
4.215.1. Syntax
Reference_Syntax.role = "string"
4.215.2. Values
Object
Type
String
Values
A valid string specifying the role of the parent container. It may be used by speech-enabled XFA processing applications to provide information. For example, it may be assigned values borrowed from HTML, such as
TH(table headings) andTR(table rows).
4
441
Scripting Properties
4.215.3. Applies to
Model
4.215.4. Version
XFA 2.2
4.215.5. Examples
4.215.6. JavaScript
TextField1.assist.role = "TH";
4.215.7. FormCalc
TextField1.assist.role = "TH"
Object
4.216. rotate
Rotates the object around its anchor point by the specified angle.
The angle represents degrees counter-clockwise with respect to the default position. The value must be a non-negative multiple of 90.
NOTE
:
The direction of rotation is the same as for positive angles in PostScript
®
, PDF, and PCL but opposite to that in SVG.
4.216.1. Syntax
Reference_Syntax.rotate = "0 | measurement"
442
Scripting Properties
4.216.2. Values
String
Type Values
•
0(default)
• Any valid angle measurement.
4.216.3. Applies to
Model Object
4.216.4. Version
XFA 2.1
4.216.5. Examples
4.216.6. JavaScript
TextField1.rotate = "90";
4.216.7. FormCalc
TextField1.rotate = "90"
4.217. rowColumnRatio
An optional ratio of rows to columns for supported 2D barcodes.
The parser ignores this property if dataRowCount and dataColumnCount properties are specified.
4
443
Scripting Properties
When rowColumnRatio is supplied, the barcode grows to the number of rows required to hold the supplied data. If the last row is not filled by the supplied data it is padded out with padding symbols.
4.217.1. Syntax
Reference_Syntax.rowColumnRatio = "string"
4.217.2. Values
Type
String
Values
A valid string representing the ratio of rows to columns.
4.217.3. Applies to
Model Object
4.217.4. Version
XFA 2.1
4.218. runAt
Specifies what application can execute the script.
Keep in mind these points when specifying the application that can execute a script:
• The runAt setting is enforced even if another script calls the script.
• Scripts in forms designed for printing run at the server even when you set the scripts to run at the client.
• The preSubmit event does not execute in interactive forms and forms designed for printing when you set the script to run at the server.
444
Scripting Properties
4.218.1. Syntax
Reference_Syntax.runAt = "client | server | both"
4.218.2. Values
String
Type
4.218.3. Applies to
• client(default)
• server
• both
The script runs only on the client.
• server
• both
The script runs only on the server.
• both
The script runs on both client and server.
Values
Model
4.218.4. Version
XFA 2.1
4.218.5. Examples
4.218.6. JavaScript
NumericField1.calculate.script.runAt = "both";
445
Object
4
Scripting Properties
4.218.7. FormCalc
NumericField1.calculate.script.runAt = "both"
4.219. save
Determines whether the values in a particular column represent both display and bound values, or if the data in the column represents bound values only.
4.219.1. Syntax
Reference_Syntax.save = "0 | 1"
4.219.2. Values
Type
String
Values
•
0(default)
•
1
The values supplied by this object are for display only.
•
1
The values supplied by this object may be entered into the field.
At least one column must have a value of
1. If multiple columns have a value set to1, then the parser saves the first column first column with a value of
1that is encountered.
4.219.3. Applies to
Model Object
4.219.4. Version
XFA 2.1
446
Scripting Properties
4.219.5. Examples
4.219.6. JavaScript
DropDownList1.resolveNode("#items").save = "1";
4.219.7. FormCalc
DropDownList1.#items.save = "1"
4
4.220. savedValue
Returns a typed object, but you cannot assign this value. If the property is not saved, the value is the
4.220.1. Syntax
Reference_Syntax.savedValue = "typed object"
4.220.2. Values
Type
Depends on the type of the property
4.220.3. Applies to
Model
4.220.4. Version
XFA 2.5
447
The typed object for the property.
Values
Object
Scripting Properties
4.221. scope
Controls participation of the subform in data binding and reference syntax expressions. It is valid only on the root subform.
By default, a named subform takes part in data binding and can be referenced using a reference syntax expression. This property allows a subform to be given a name but remain transparent to data binding and reference syntax expressions.
4.221.1. Syntax
Reference_Syntax.scope = "name | none"
4.221.2. Values
Type
String
Values
• name(default)
• none
If the subform has a name it takes part in data binding and reference syntax expressions. Otherwise it does not.
• none
The subform does not take part in data binding and reference syntax expressions, even if it has a name.
4.221.3. Applies to
Model Object
4.221.4. Version
XFA 2.1
448
Scripting Properties
4.221.5. Examples
4.221.6. JavaScript
Subform1.scope = "none";
4.221.7. FormCalc
Subform1.scope = "none"
4
4.222. scriptTest
Controls validation by the enclosed script.
Scripts specified as part of a validation should make no assumptions as to how the processing application might use the validation results, or when the
validate object is invoked. In particular, the
script should not attempt to provide feedback to a user or alter the state of the form in any way.
The scriptTestproperty can be used for validations. The scriptTest property is not evaluated on null fields. The scriptTest property can be an evaluated context during the lifetime of a form, such as when focus leaves a field.
4.222.1. Syntax
Reference_Syntax.scriptTest = "error | disabled | warning"
449
Scripting Properties
4.222.2. Values
Type
String
Values
• disabled
• error(default)
• warning
• dismiss:The user understands the message and wants to return to the form to satisfy this constraint.
• override:The user understands the message, but chooses to contravene this constraint.
Do not perform this test. The form object is permitted to have a value that does not conform to the script. The field can be left with a non-conforming value, and it will not negatively affect the validity of the form. This value disables the validation test.
• error(default)
• warning
• dismiss:The user understands the message and wants to return to the form to satisfy this constraint.
• override:The user understands the message, but chooses to contravene this constraint.
Emit a message and refuse to accept data that the script reports is erroneous. The form object is required to have a value that conforms to the script.
• warning
• dismiss:The user understands the message and wants to return to the form to satisfy this constraint.
• override:The user understands the message, but chooses to contravene this constraint.
Emit a message if the script reports the data is erroneous but allow the user to proceed to the next field.
The message must inform the user that the form object is recommended to have a value that conforms to the script’s constraints, and provide two choices:
• dismiss:The user understands the message and wants to return to the form to satisfy this constraint.
• override:The user understands the message, but chooses to contravene this constraint.
450
Scripting Properties
4.222.3. Applies to
4
Model
4.222.4. Version
XFA 2.1
4.222.5. Examples
4.222.6. JavaScript
NumericField1.validate.scriptTest = "disabled";
4.222.7. FormCalc
NumericField1.validate.scriptTest = "disabled"
Object
4.223. selectedIndex
The index of the first selected item.
Setting this property sets the specified index and deselects any previously selected items. If you want to preserve the multiple selection state, use the getItemState or setItemState methods instead. Specifying an index value of
-1 clears the list. Getting this property returns a value of -1 when no items are selected.
4.223.1. Syntax
Reference_Syntax.selectedIndex
4.223.2. Version
2.5
451
Scripting Properties
4.223.3. Values
Type
Integer
Values
A valid integer representing the index value of the first selected item.
Specifying an index value of
-1clears the list. Specifying any other valid value results in only that item being selected.
4.223.4. Applies to
Model Object
4.223.5. Version
XFA 2.5
4.224. selEnd
during a change event.
4.224.1. Syntax
Reference_Syntax.selEnd
4.224.2. Values
Type
Integer
Values
A valid integer representing the 0 based index value of the last character of the text selection.
If no text is selected, this property is set to the position of the text entry cursor at the time the change is made. Changing the value of this property changes which characters will be replaced by the value of change and also repositions the text entry cursor.
452
Scripting Properties
4.224.3. Applies to
4
Model
4.224.4. Version
XFA 2.1
4.224.5. Examples
4.224.6. JavaScript
xfa.event.selEnd;
4.224.7. FormCalc
xfa.event.selEnd
Object
4.225. selStart
during a change event.
4.225.1. Syntax
Reference_Syntax.selStart
453
Scripting Properties
4.225.2. Values
Type
Integer
Values
A valid integer representing the 0-based index value of the first character of the text selection.
If no text is selected, this property is set to the position of the text entry cursor at the time the change is made. Changing the value of this property changes which characters will be replaced by the value of change and also repositions the text entry cursor.
4.225.3. Applies to
Model
4.225.4. Version
XFA 2.1
4.225.5. Examples
4.225.6. JavaScript
xfa.event.selStart;
4.225.7. FormCalc
xfa.event.selStart
4.226. server
Specifies the URL for a time stamp server.
Object
454
Scripting Properties
4.226.1. Syntax
Reference_Syntax.server = "string"
4.226.2. Values
Type
String
Values
A valid string representing the URL for the time stamp server.
4.226.3. Applies to
Model Object
4.226.4. Version
XFA 2.5
4.227. shape
Specifies whether the check box or radio button displays with a square or round outline.
4.227.1. Syntax
Reference_Syntax.shape = "square | round"
4
455
4.227.2. Values
String
Type
4.227.3. Applies to
• square(default)
• round
The button appears with a square outline.
• round
The button appears with a round outline.
Values
Model Object
4.227.4. Version
XFA 2.1
4.227.5. Examples
4.227.6. JavaScript
CheckButton1.resolveNode("ui.#checkButton").shape = "square";
4.227.7. FormCalc
CheckButton.ui.#checkButton.shape = "square"
4.228. shift
Specifies whether the Shift key is held down during a particular event.
Scripting Properties
456
Scripting Properties
4.228.1. JavaScript Syntax
Reference_Syntax.shift = false | true;
- or -
Reference_Syntax.shift = 0 | 1;
4.228.2. FormCalc Reference
Reference_Syntax.shift = 0 | 1
4.228.3. Values
Type
Boolean
Values
• true | 1(default)
• false | 0
The Shift key is pressed during event execution.
• false | 0
The Shift key is not pressed during event execution.
4.228.4. Applies to
4.228.5. Version
XFA 2.1
4.228.6. Examples
4.228.7. JavaScript
xfa.event.shift;
Model
457
Object
4
Scripting Properties
4.228.8. FormCalc
xfa.event.shift
4.229. short
Specifies the length of the short edge of the medium object.
The length specified by the short property must be smaller than the length specified by the long
property.
4.229.1. Syntax
Reference_Syntax.short = "0in | measurement"
4.229.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.229.3. Applies to
Model Object
4.229.4. Version
XFA 2.1
458
Scripting Properties
4.229.5. Examples
4.229.6. JavaScript
xfa.form.form1.pageSet.Page1.medium.short;
4.229.7. FormCalc
xfa.form.form1.pageSet.Page1.medium.short
4.230. signatureType
Specifies how a form with a document signature is saved as certified PDF document.
4.230.1. Syntax
Reference_Syntax.signatureType = "filler | author"
4.230.2. Values
Type
String
Values
• filler(default)
• author
Saves the form as a certified PDF document.
• author
Documents with author signatures are referred to as certified. After the form is saved as a PDF document and opened in Acrobat, the user can click the signature field to certify the entire document.
4.230.3. Applies to
Model Object
459
4
Scripting Properties
4.230.4. Version
XFA 2.5
4.231. size
A measurement specifying the size of the check box or radio button outline representing either the height and width for a check box, or the diameter for a radio button.
4.231.1. Syntax
Reference_Syntax.size = "10pt | measurement"
4.231.2. Values
Type
String
Values
•
10pt(default)
• Any valid measurement.
• For the fontobject, this property specifies the size of the font.
• For the checkButtonobject, this property specifies either the height or width of a check box or the diameter of a radio button.
The values for this property depend on the referencing object:
• For the fontobject, this property specifies the size of the font.
• For the checkButtonobject, this property specifies either the height or width of a check box or the diameter of a radio button.
4.231.3. Applies to
Model Object
460
Scripting Properties
4.231.4. Version
XFA 2.1
4.231.5. Examples
4.231.6. JavaScript
CheckBox1.resolveNode("ui.#checkButton").size = "20pt";
4.231.7. FormCalc
CheckBox1.ui.#checkButton.size = "20pt"
4.232. slope
Specifies the orientation of the line.
4.232.1. Syntax
Reference_Syntax.slope = "\ | /"
4.232.2. Values
Type
String
Values
•
\(backslash character) (default)
•
/(forward slash character)
The line extends from the top-left to the bottom-right.
•
/(forward slash character)
The line extends from the bottom-left to the top-right.
461
4
Scripting Properties
4.232.3. Applies to
Model
4.232.4. Version
XFA 2.1
4.232.5. Examples
4.232.6. JavaScript
Line1.resolveNode("value.#line").slope = "/";
4.232.7. FormCalc
Line1.value.#line.slope = "/"
Object
4.233. soapFaultCode
Specifies any fault code that occurs when a user attempts to execute a web service connection.
4.233.1. Syntax
Reference_Syntax.soapFaultCode = "string"
4.233.2. Values
String
Type Values
A valid string representing the SOAP fault code.
462
Scripting Properties
4.233.3. Applies to
4
4.233.4. Version
XFA 2.1
Model
Object
4.234. soapFaultString
Specifies the descriptive message that corresponds to a particular web service connection fault code.
4.234.1. Syntax
Reference_Syntax.size = "10pt | measurement"
4.234.2. Values
Type
String
Values
A valid string representing the SOAP fault code message.
4.234.3. Applies to
4.234.4. Version
XFA 2.1
463
Model
Object
4.235. somExpression
Reads the reference syntax expression for this node.
4.235.1. Syntax
Reference_Syntax.somExpression
4.235.2. Values
Type
String
Values
A valid string representing a fully qualified reference syntax expression.
4.235.3. Applies to
4.235.4. Version
XFA 2.1
4.235.5. Examples
4.235.6. JavaScript
TextField1.somExpression;
4.235.7. FormCalc
TextField1.somExpression
Scripting Properties
464
Scripting Properties
4.236. spaceAbove
4
Specifies the amount of vertical spacing and the maximum font leading for the first line of the paragraph.
4.236.1. Syntax
Reference_Syntax.spaceAbove = "0in | measurement"
4.236.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.236.3. Applies to
Model
4.236.4. Version
XFA 2.1
4.236.5. Examples
4.236.6. JavaScript
TextField1.para.spaceAbove = "2pt";
4.236.7. FormCalc
TextField1.para.spaceAbove = "2pt"
465
Object
Scripting Properties
4.237. spaceBelow
Specifies the amount of vertical spacing and the maximum font leading for the first line of the paragraph.
4.237.1. Syntax
Reference_Syntax.spaceAbove = "0in | measurement"
4.237.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.237.3. Applies to
Model
4.237.4. Version
XFA 2.1
4.237.5. Examples
4.237.6. JavaScript
TextField1.para.spaceBelow = "2pt";
4.237.7. FormCalc
TextField1.para.spaceBelow = "2pt"
Object
466
Scripting Properties
4.238. startAngle
Specifies the angle where the beginning of the arc renders.
4.238.1. Syntax
Reference_Syntax.startAngle = "0 | angle"
4.238.2. Values
Type
String
Values
•
0(default)
• A value greater than 0 and less than or equal to
360.
4.238.3. Applies to
Model
4.238.4. Version
XFA 2.1
4.238.5. Examples
4.238.6. JavaScript
Circle1.resolveNode("value.#arc").startAngle = "12";
4.238.7. FormCalc
Circle1.value.#arc.startAngle = "12"
Object
467
4
Scripting Properties
4.239. startChar
Specifies an optional starting control character to add to the beginning of the barcode data.
The starChar property is ignored by the parser if the barcode pattern does not support the specified starting control character.
4.239.1. Syntax
Reference_Syntax.startChar = "character"
4.239.2. Values
String
Type
4.239.3. Applies to
Values
A valid string representing a control character.
Model Object
4.239.4. Version
XFA 2.1
4.239.5. Examples
4.239.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").startChar = "*";
4.239.7. FormCalc
Code11BarCode1.ui.#barcode.startChar = "*"
468
Scripting Properties
4.240. startNew
4
Determines whether it is necessary to start a new content area or page even when the current content area or page has the required name.
This property has no effect unless the before(deprecated) property has the value
contentArea or pageArea.
4.240.1. Syntax
Reference_Syntax.startNew = "0 | 1"
4.240.2. Values
Type
String
Values
•
0(default)
•
1
Does not start a new content area or page area if the current one has the specified name.
•
1
Starts a new content area or page.
The name of the content area or page is supplied by the accompanying beforeTarget(deprecated)
property.
4.240.3. Applies to
Model Object
4.240.4. Version
XFA 2.1
469
Scripting Properties
4.240.5. Examples
4.240.6. JavaScript
Subform1.break.startNew = "1";
4.240.7. FormCalc
Subform1.break.startNew = "1"
4.241. stateless
Determines whether a script’s variables persist from one invocation to the next.
4.241.1. Syntax
Reference_Syntax.stateless = "0 | 1"
4.241.2. Values
Type
String
Values
•
0(default)
•
1
The script’s variables do persist (it is stateful).
•
1
The script’s variables do not persist (it is stateless).
4.241.3. Applies to
Model
Object
470
Scripting Properties
4.241.4. Version
XFA 2.1
4.241.5. Examples
4.241.6. JavaScript
TextField1.resolveNode("#event.#script").stateless = "1";
4.241.7. FormCalc
TextField1.#event.#script.stateless = "1"
4.242. stock
Specifies the name of a standard paper size.
4.242.1. Syntax
Reference_Syntax.stock = "letter | paper_size"
4.242.2. Values
String
Type
• letter(default)
• Any valid paper size value.
Values
4.242.3. Applies to
Model Object
471
4
Scripting Properties
4.242.4. Version
XFA 2.1
4.242.5. Examples
4.242.6. JavaScript
xfa.form.form1.pageSet.Page1.medium.stock = "A4";
4.242.7. FormCalc
xfa.form.form1.pageSet.Page1.medium.stock = "A4"
4.243. stroke
Specifies the appearance of a line.
4.243.1. Syntax
Reference_Syntax.stroke = "solid | dashed | dotted | dashDot | dashDotDot | lowered | raised | etched | embossed"
472
Scripting Properties
4.243.2. Values
4
473
Scripting Properties
474
Scripting Properties
475
Type
String
• solid(default)
• dashed
• dotted
• dashDot
• dashDotDot
• lowered
• raised
• etched
• embossed
Solid.
• dashed
• dotted
• dashDot
• dashDotDot
• lowered
• raised
• etched
• embossed
A series of rectangular dashes.
• dotted
• dashDot
• dashDotDot
• lowered
• raised
• etched
• embossed
A series of round dots.
• dashDot
• dashDotDot
• lowered
• raised
• etched
Values
4
Type Values
String
(Continued)
Alternating rectangular dashes and dots.
• dashDotDot
• lowered
• raised
• etched
• embossed
A series of a single rectangular dash followed by two round dots.
• lowered
• raised
• etched
• embossed
The line appears to enclose a lowered region.
• raised
• etched
• embossed
The line appears to enclose a raised region.
• etched
• embossed
The line appears to be a groove lowered into the drawing surface. embossed
The line appears to be a ridge raised out of the drawing surface.
Scripting Properties
4.243.3. Applies to
Model Object
4.243.4. Version
XFA 2.1
476
Scripting Properties
4.243.5. Examples
4.243.6. JavaScript
Line1.resolveNode("value.#line.edge").stroke = "etched";
4.243.7. FormCalc
Line1.value.#line.edge.stroke = "etched"
4.244. sweepAngle
Specifies the length of the arc as an angle.
4.244.1. Syntax
Reference_Syntax.sweepAngle = "360 |angle"
4.244.2. Values
Type
String
Values
•
360(default)
• A value less than
360and greater than or equal to0.
4.244.3. Applies to
Model Object
4.244.4. Version
XFA 2.1
477
4
4.244.5. Examples
4.244.6. JavaScript
Circle1.resolveNode("value.#arc").sweepAngle = "45";
4.244.7. FormCalc
Circle1.value.#arc.sweepAngle = "45"
4.245. tabDefault
Specifies the distance between default tab stops.
By default, no default tab stops are defined.
4.245.1. Syntax
Reference_Syntax.tabDefault = "string"
4.245.2. Values
String
Type Values
A valid string representing the distance between the default tab stops.
4.245.3. Applies to
Model Object
4.245.4. Version
XFA 2.1
Scripting Properties
478
Scripting Properties
4.245.5. Examples
4.245.6. JavaScript
TextField1.para.tabDefault = "3in";
4.245.7. FormCalc
TextField1.para.tabDefault = "3in"
4
4.246. tabStops
Specifies a space-separated list of tab stop locations and leader properties.
Within the region from the left margin to the rightmost tab stop in the list, the tab stop locations
right of this region.
Each entry in the list of tab stops consists of a keyword specifying the alignment at the tab stop, followed by a space, followed by the distance of the tab stop from the left margin.
Tab stop leader properties including pattern and pattern width can also be specified.
4.246.1. Syntax
Reference_Syntax.tabStops = alignment leader (leaderPattern (leaderAlign
leaderPatterWidth)) measurement
479
4.246.2. Values
Type
String
Values
The tab stop alignment is one of the following values:
• center
• left
• right
• decimal
Specifies a center-aligned tab stop.
• left
• right
• decimal
Specifies a left-aligned tab stop.
• right
• decimal
Specifies a right-aligned tab stop.
• decimal
Specifies a tab stop that aligns content around a radix point.
Scripting Properties
480
Scripting Properties
Type
String
String
Values
The tab-stop leader properties include the following values:
• leaderPattern
• leaderAlign
• Specifies how to align the repeating leader pattern in the inline progression direction. If the value is none, there are no special alignment requirements. If the value is page, the pattern is aligned as if its cycle started at the start edge of the page.
Specifies the leader pattern to fill the space between a tab and the character following it. The values are space | rule | dots | use-content.
If the value is set to rule, the leader is filled with a line. TheruleThicknessis any valid measurement that specifies the thickness of the line. The ruleStyle may be one of solid
(default), dotted, dashed, none, double, groove,orridge.
If the value is set to dots, the leader is filled with a repeating pattern of dots. The leader value can also be set to any quoted string.
• leaderAlign
• Specifies how to align the repeating leader pattern in the inline progression direction. If the value is none, there are no special alignment requirements. If the value is page, the pattern is aligned as if its cycle started at the start edge of the page.
• leaderPatternWidth
Specifies the period of the pattern cycle for the leader patterns of dots, use-content, and in some cases rule.
The value may be a valid measurement.
If the content width is shorter that the value of this property, each repetition of the pattern content is padded with a blank space to fill out the width. If the content width is longer than the value of this property, the leader pattern width is ignored.
The tab-stop measurement is any valid measurement.
4
4.246.3. Applies to
Model Object
4.246.4. Version
XFA 2.1
481
Scripting Properties
4.246.5. Examples
4.246.6. JavaScript
TextField1.para.tabStops = "left leader (rule(solid 0.5pt)) 4in”;
4.246.7. FormCalc
TextField1.para.tabStops = "left leader (rule(solid 0.5pt)) 4in”
4.247. target
Specifies the object upon which the action will occur.
4.247.1. Syntax
Reference_Syntax.target = "ObjectName | Reference_Syntax | URL"
4.247.2. Values
Type
String
Values
A valid string representing the name of a form design object, a reference syntax expression, or a URL where data is sent.
the target property to reference a content area, or vice versa.
4.247.3. Applies to
Object
Model
482
Scripting Properties
Model
4.247.4. Version
XFA 2.4
4.247.5. Examples
4.247.6. JavaScript
xfa.event.target = "click";
- or -
Subform1.breakAfter.targetType = "contentArea";
Subform1.breakAfter.target = "#ContentArea2";
4.247.7. FormCalc
xfa.event.target = "click"
- or -
Subform1.breakAfter.targetType = "contentArea"
Subform1.breakAfter.target = "#ContentArea2"
R
ELATED LINKS
:
Object
4.248. targetType
Specifies the constraints on moving to a new page or content area before laying out the parent subform.
The
targetType property replaces the deprecatedbreak.before(deprecated) property.
4
483
4.248.1. Syntax
Reference_Syntax.targetType = "auto | contentArea | pageArea"
4.248.2. Values
Scripting Properties
Type
String
Values
the targetTypeproperty set tocontentArea, or vice versa.
• auto(default)
• contentArea
• pageArea
The determination of a transition to a new page or content area is delegated to the processing application. No transition to a new page or content area is forced.
• contentArea
• pageArea
Rendering transitions to the next available content area.
• pageArea
Rendering transitions to a new page.
The startNew property also modifies some of these behaviors.
4.248.3. Applies to
Model Object
4.248.4. Version
XFA 2.4
484
Scripting Properties
4.248.5. Examples
4.248.6. JavaScript
Subform1.breakAfter.targetType = "contentArea";
Subform1.breakAfter.target = "#ContentArea2";
4.248.7. FormCalc
Subform1.breakAfter.targetType = "contentArea"
Subform1.breakAfter.target = "#ContentArea2"
4
4.249. textEncoding
Specifies the encoding of text content in the document.
4.249.1. Syntax
Reference_Syntax.textEncoding = "UTF-8 | UTF-16 | Shift-JIS | Big-Five
|ISO-8859-1 | ISO-8859-2 | ISO-8859-7 | KSC-5601 | GB-2312 | UCS-2 | fontSpecific"
4.249.2. Values
The value of this property is case-sensitive and must match one of the following values.
NOTE
:
Use values
ISO-8859-1, ISO-8859-2, and ISO-8859-7 only when you know that
Adobe Acrobat will not be used to submit form data.
Type
String
Values
• none(default)
•
ISO-8859-1
•
ISO-8859-2
•
ISO-8859-7
•
Shift-JIS
485
Scripting Properties
•
KSC-5601
•
Big-Five
•
GB-2312
•
UTF-8
•
UTF-16
•
UCS-2
• fontSpecific
No special encoding is specified. The characters are encoded using the ambient encoding for the operating system.
•
ISO-8859-1
•
ISO-8859-2
•
ISO-8859-7
•
Shift-JIS
•
KSC-5601
•
Big-Five
•
GB-2312
•
UTF-8
•
UTF-16
•
UCS-2
• fontSpecific
The characters are encoded using ISO-8859-1, also known as Latin-1.
•
ISO-8859-2
•
ISO-8859-7
•
Shift-JIS
•
KSC-5601
•
Big-Five
•
GB-2312
•
UTF-8
•
UTF-16
•
UCS-2
486
Scripting Properties 4
• fontSpecific
The characters are encoded using ISO-8859-2.
•
ISO-8859-7
•
Shift-JIS
•
KSC-5601
•
Big-Five
•
GB-2312
•
UTF-8
•
UTF-16
•
UCS-2
• fontSpecific
The characters are encoded using ISO-8859-7.
•
Shift-JIS
•
KSC-5601
•
Big-Five
•
GB-2312
•
UTF-8
•
UTF-16
•
UCS-2
• fontSpecific
The characters are encoded using JIS X 0208, more commonly known as Shift-JIS.
•
KSC-5601
•
Big-Five
•
GB-2312
•
UTF-8
•
UTF-16
•
UCS-2
• fontSpecific
The characters are encoded using the Code for Information Interchange (Hangul and Hanja).
487
Scripting Properties
•
Big-Five
•
GB-2312
•
UTF-8
•
UTF-16
•
UCS-2
• fontSpecific
The characters are encoded using Traditional Chinese (Big-Five). There is no official standard for Big-Five and several variants are in use. The Adobe form object model uses the variant implemented by Microsoft as code.
•
GB-2312
•
UTF-8
•
UTF-16
•
UCS-2
• fontSpecific
The characters are encoded using Simplified Chinese.
•
UTF-8
•
UTF-16
•
UCS-2
• fontSpecific
The characters are encoded using Unicode code points as defined by Unicode, and UTF-8 serialization as defined by ISO/IEC 10646.
•
UTF-16
•
UCS-2
• fontSpecific
The characters are encoded using Unicode code points as defined by Unicode, and UTF-16 serialization as defined by ISO/IEC 10646.
•
UCS-2
• fontSpecific
The characters are encoded using Unicode code points as defined by Unicode, and UCS-2 serialization as defined by ISO/IEC 10646.
• fontSpecific
488
Scripting Properties 4
The characters are encoded in a font-specific way. Each character is represented by one 8-bit byte.
4.249.3. Applies to
Object Model
4.249.4. Version
XFA 2.1
4.249.5. Examples
4.249.6. JavaScript
Button1.event.submit.textEncoding = "UCS-2";
4.249.7. FormCalc
Button1.event.submit.textEncoding = "UCS-2"
4.250. textEntry
Determines if a user can type a value into a drop-down list.
4.250.1. Syntax
Reference_Syntax.textEntry = "0 | 1"
489
Scripting Properties
4.250.2. Values
Type
String
Values
•
0(default)
•
1
Prevents the user from typing in the current field. The value is chosen by selecting a value from the drop-down list.
•
1
Allows a user to type a value into a drop-down list or select from the drop-down list. This opens up the field value to be anything that the user might type. If the openproperty is set tomultiSelect, the user is not allowed to enter values in the field.
4.250.3. Applies to
Model Object
4.250.4. Version
XFA 2.1
4.250.5. Examples
4.250.6. JavaScript
DropDownList1.resolveNode("ui.#choiceList").textEntry = "1";
4.250.7. FormCalc
DropDownList1.ui.#choiceList.textEntry = "1"
490
Scripting Properties
4.251. textIndent
Specifies the horizontal positioning of the first line relative to the remaining lines in a paragraph.
A negative value indicates a hanging indent whereas a positive value indicates a first-line indent.
4
4.251.1. Syntax
Reference_Syntax.textIndent = "0in | measurement"
4.251.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.251.3. Applies to
Model
4.251.4. Version
XFA 2.1
4.251.5. Examples
4.251.6. JavaScript
TextField1.para.textIndent = "3in";
Object
491
Scripting Properties
4.251.7. FormCalc
TextField1.para.textIndent = "3in"
4.252. textLocation
Specifies the location of any text associated with the barcode.
The region available for embedded text, if any, is determined by the barcode format. For most barcode formats it is a single, contiguous region. However, for EAN series barcodes, it is divided into
4.252.1. Syntax
Reference_Syntax.textLocation = "below | none | above | aboveEmbedded | belowEmbedded"
492
Scripting Properties
4.252.2. Values
Type
String
Values
• below(default)
• above
• belowEmbedded
• aboveEmbedded
• none
Places text below the barcode.
• above
• belowEmbedded
• aboveEmbedded
• none
Places text above the barcode.
• belowEmbedded
• aboveEmbedded
• none
Partially embeds text at the bottom of the barcode aligned with the bottom of the bars.
• aboveEmbedded
• none
Partially embeds text at the top of the barcode aligned with the top of the bars.
• none
Displays no text.
4.252.3. Applies to
Model Object
4
493
Scripting Properties
4.252.4. Version
XFA 2.1
4.252.5. Examples
4.252.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").textLocation = "aboveEmbedded";
4.252.7. FormCalc
Code11BarCode1.ui.#barcode.textLocation = "aboveEmbedded"
4.253. thickness
Specifies the thickness or weight of the line.
4.253.1. Syntax
Reference_Syntax.thickness = "0.5pt | measurement"
4.253.2. Values
String
Type
•
0.5pt(default)
• Any valid measurement.
Values
494
Scripting Properties
4.253.3. Applies to
4
Model
4.253.4. Version
XFA 2.1
4.253.5. Examples
4.253.6. JavaScript
TextField1.border.edge.thickness = "0.2in";
4.253.7. FormCalc
TextField1.border.edge.thickness = "0.2in"
Object
4.254. this
Retrieves the current node, which is the starting node when using the resolveNode and resolveNodes
methods.
NOTE
:
This property is read only.
4.254.1. Syntax
this
495
4.254.2. Values
Object
Type
4.254.3. Applies to
The current object.
Model
4.254.4. Version
XFA 2.1
4.254.5. Examples
4.254.6. JavaScript
this
4.254.7. FormCalc
this
R
ELATED LINKS
:
Working with page numbers and page counts
4.255. timeout
Specifies the number of seconds to attempt a query.
Values
Object
Scripting Properties
496
Scripting Properties
4.255.1. Syntax
Reference_Syntax.timeout = "string"
4.255.2. Values
Type
String
Values
A valid string representing the number of seconds before the query times out.
4.255.3. Applies to
Model
4.255.4. Version
XFA 2.1
4.255.5. Examples
In these examples,
Titles represents the data connection name.
4.255.6. JavaScript
xfa.sourceSet.Titles.connect.timeout = "10";
4.255.7. FormCalc
xfa.sourceSet.Titles.connect.timeout = "10"
Object
4
497
Scripting Properties
4.256. timeStamp
Specifies the date/time stamp for this node.
4.256.1. Syntax
Reference_Syntax.timeStamp = "string"
4.256.2. Values
String
Type
4.256.3. Applies to
A valid string representing a date and time.
Values
Model Object
4.256.4. Version
XFA 2.1
4.257. title
Sets and gets the title of the document. It is available only for client applications.
4.257.1. Syntax
Reference_Syntax.title
498
Scripting Properties
4.257.2. Values
Type
String
Values
A valid string representing the title of the current form.
4.257.3. Applies to
4.257.4. Version
XFA 2.1
4.257.5. Examples
4.257.6. JavaScript
xfa.host.title;
4.257.7. FormCalc
xfa.host.title
Model
4.258. topInset
A measurement specifying the size of the top inset.
4.258.1. Syntax
Reference_Syntax.topInset = "0in | measurement"
Object
499
4
Scripting Properties
4.258.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
4.258.3. Applies to
Model
4.258.4. Version
XFA 2.1
4.258.5. Examples
4.258.6. JavaScript
Subform1.margin.topInset "1in";
4.258.7. FormCalc
Subform1.margin.topInset "1in"
Object
4.259. trailer
Specifies the subformorsubformSetobject to place at the bottom of a content or page area.
The trailer property replaces the deprecated overflowTrailer(deprecated) and book-
endTrailer(deprecated) properties.
500
Scripting Properties
4.259.1. Syntax
Reference_Syntax.trailer = "string"
4.259.2. Values
Type
String
Values
A valid string representing the ID or fully qualified reference syntax expression of a subform or subform set. The default is an empty string.
4.259.3. Applies to
Object Model
4.259.4. Version
XFA 2.4
4.259.5. Examples
4.259.6. JavaScript
Subform1.breakBefore.trailer = "Subform2";
4.259.7. FormCalc
Subform1.breakBefore.trailer = "Subform2"
4
501
Scripting Properties
4.260. transferEncoding
Specifies the encoding of binary content in the referenced document.
4.260.1. Syntax
Reference_Syntax.transferEncoding = "none | base64"
4.260.2. Values
Type
String
Values
• none(default)
• base64
The referenced document is not encoded. If the referenced document is specified via a URI then it will be transferred as a byte stream. If the referenced document is inline it must conform to the restrictions on the PCDATA data type.
• base64
The binary content is encoded in accordance with the base64 transfer encoding standard.
4.260.3. Applies to
Model Object
4.260.4. Version
XFA 2.1
502
Scripting Properties
4.261. transient
4
Specifies whether the processing application must save the value of the exclusion group as part of a form submission or save operation.
4.261.1. Syntax
Reference_Syntax.transient = "0 | 1"
4.261.2. Values
String
Type
4.261.3. Applies to
•
0(default)
•
1
The exclusion group value must be saved.
•
1
The exclusion group must not be saved.
Values
Model
4.261.4. Version
XFA 2.1
4.262. truncate
Truncates the right edge of the barcode for supported formats.
Object
503
Scripting Properties
The truncation applies only to barcode type PDF417. The parser ignores this property for barcode formats to which it does not apply.
4.262.1. Syntax
Reference_Syntax.truncate = "0 | 1"
4.262.2. Values
String
Type
•
0(default)
•
1
Include the right-hand synchronization mark.
•
1
Omit the right-hand synchronization mark.
Values
4.262.3. Applies to
Model
4.262.4. Version
XFA 2.1
4.262.5. Examples
4.262.6. JavaScript
Code11BarCode1.resolveNode("ui.#barcode").truncate = "1";
Object
504
Scripting Properties
4.262.7. FormCalc
Code11BarCode1.ui.#barcode.truncate = "1"
4.263. type
Specifies the pattern used by an object.
type property specifies the direction of flow for a color transition.
For the subjectDNs object, the
typeproperty specifies whether the values provided in the element should be treated as a restrictive or a non-restrictive set.
4.263.1. Syntax
Reference_Syntax.type = "toRight | toLeft | toTop | toBottom"
4.263.2. Values
4
Type
String
Values
The values for this property depend on the referencing object.
For the barcodeobject:
A string that identifies the barcode pattern. This property must be supplied. The set of supported values for this property is specific to the display device.
The following values have been defined for this property as indicating particular barcode types:
• codabar
• Codabar, as defined in ANSI/AIM BC3-1995, USS Codabar.
• code2Of5Industrial
• Code 2 of 5 Industrial; no official standard.
• code2Of5Interleaved
• Code 2 of 5 Interleaved, as defined in ANSI/AIM BC2-1995, USS Interleaved
2-of-5.
• code2Of5Matrix
• Code 2 of 5 Matrix; no official standard.
505
Scripting Properties
Type Values
• code2Of5Standard
• Code 2 of 5 Standard; no official standard.
• code3Of9
• Code 39 (also known as code 3 of 9), as defined in ANSI/AIM BC1-1995, USS
Code 39.
• code3Of9extended
• Code 39 extended; no official standard.
• code11
• Code 11 (USD-8); no official standard.
• code49
• Code 49, as defined in ANSI/AIM BC6-1995, USS Code 49.
• code93
• Code 93, as defined in ANSI/AIM BC5-1995, USS Code 93.
• code128
• Code 128, as defined in ANSI/AIM BC4-1995, Code 128.
• code128A
• Code 128 A, as defined in ANSI/AIM BC4-1995, ISS Code 128.
• code128B
• Code 128 B, as defined in ANSI/AIM BC4-1995, ISS Code 128.
• code128C
• Code 128 C, as defined in ANSI/AIM BC4-1995, ISS Code 128.
• code128SSCC
• Code 128 serial shipping container code, as defined in ANSI/AIM BC4-1995, ISS
Code 128.
• ean8
• EAN-8, as defined in ISO/EEC 15420.
• ean8add2
• EAN-8 with 2-digit Addendum, as defined in ISO/EEC 15420.
506
Scripting Properties
Type Values
• ean8add5
• EAN-8 with 5-digit Addendum, as defined in ISO/EEC 15420.
• ean13
• EAN-13, as defined in ISO/EEC 15420.
• ean13pwcd
• EAN-13 with price/weight customer data.
• ean13add2
• EAN-13 with a 2-digit addendum.
• ean13add5
• EAN-13 with a 5-digit addendum.
• fim
• United States Postal Service facing identification mark (FIM), as defined in
First-Class Mail (USPS-C100).
• logmars
• Logistics Applications of Automated Marking and Reading Symbols (logmars) as definied by United States Military Standard MIL-STD-1189B .
• maxicode
• UPS Maxicode, as defined in ANSI/AIM BC10-ISS Maxicode.
• msi
• Modified Plessey (MSI). May once have had a formal specification, but no longer does.
• pdf417
• PDF417, as defined in USS PDF417.
• pdf417macro
• PDF417, but allows the data to span multiple PDF417 barcodes. The barcodes are marked so that the bacrode reader knows when it still has additional barcodes to read and can prompt the operator if necessary.
• plessey
• Plessey; no official standard.
4
507
Scripting Properties
Type Values
• postAUSCust2
• Australian Postal Customer 2, as defined in Customer Barcoding Technical Specifications.
• postAUSCust3
• Australian Postal Customer 3, as defined in Customer Barcoding Technical Specifications.
• postAUSReplyPaid
• Australian Postal Reply Paid, as defined in Customer Barcoding Technical Specifications.
• postAUSStandard
• Australian Postal Standard, as defined in Customer Barcoding Technical Specifications.
• postUKRM4SCC
• United Kingdom RM4SCC (Royal Mail 4-State Customer Code), as defined in the
How to Use Mailsort Guide.
• postUSDPBC
• United States Postal Service Delivery Point barcode, as defined in DMM C840
Barcoding Standards for Letters and Flats.
• postUSStandard
• United States Postal Service POSTNET barcode (Zip+4), as defined in DMM
C840 Barcoding Standards for Letters and Flats.
• postUSZip
• United States Postal Service POSTNET barcode (5 digit Zip), as defined in DMM
C840 Barcoding Standards for Letters and Flats.
• qr
• QR Code, as defined in ISS - QR Code.
• telepen
• Telepen, as defined in USS Telepen.
• ucc128
• UCC/EAN 128, as defined in International Symbology Specification - Code 128
(1999).
508
Scripting Properties
Type Values
• ucc128random
• UCC/EAN 128 Random Weight, as defined in International Symbology Specification - Code 128 (1999).
• ucc128sscc
• UCC/EAN 128 serial shipping container code (SSCC), as defined in International
Symbology Specification - Code 128 (1999).
• upcA
• UPC-A, as defined in ISO/EEC 15420.
• upcAadd2
• UPC-A with 2-digit Addendum, as defined in ISO/EEC 15420.
• upcAadd5
• UPC-A with 5-digit Addendum, as defined in ISO/EEC 15420.
• upcApwcd
• UPC-A with Price/Weight customer data, as defined in ISO/EEC 15420.
• upcE
• UPC-E, as defined in ISO/EEC 15420.
• upcEadd2
• UPC-E with 2-digit Addendum, as defined in ISO/EEC 15420.
• upcEadd5
• UPC-E with 5-digit Addendum, as defined in ISO/EEC 15420.
• upcean2
• UPC/EAN with 2-digit Addendum, as defined in ISO/EEC 15420.
• upcean5
• UPC/EAN with 5-digit Addendum, as defined in ISO/EEC 15420.
4
509
Scripting Properties
Type Values
For the digestMethods,encodings, subjectDNs, andtimeStampobjects:
Specifies whether the signing options are restricted to the filter settings.
• optional(default)
• required
The signing options are not restricted to the filter settings. The values provided in the element are optional seed values that the XFA processing application may choose from. The XFA processing application may also supply its own value.
• required
The signing options are restricted to the filter settings. The values provided in the element are seed values that the XFA processing application must choose from.
For the linearobject:
Specifies the direction of flow for a color transition.
• toRight(default)
• toLeft
• toTop
• toBottom
The start color appears at the left side of the object and transitions into the end color at the right side.
• toLeft
• toTop
• toBottom
The start color appears at the right side of the object and transitions into the end color at the left side.
• toTop
• toBottom
The start color appears at the bottom side of the object and transitions into the end color at the top side.
• toBottom
The start color appears at the top side of the object and transitions into the end color at the bottom side.
510
Scripting Properties
Type Values
For the radialobject:
Specifies the direction of the color transition.
• toEdge(default)
• toCenter
The start color appears at the center of the object and transitions into the end color at the outer edge.
• toCenter
The start color appears at the outer edge of the object and transitions into the end color at the center.
4
4.263.3. Applies to
Model Object
4.263.4. Version
XFA 2.1
4.264. typeface
Specifies the name of the typeface.
4.264.1. Syntax
Reference_Syntax.typeface = "Courier | typeface"
511
4.264.2. Values
String
Type
•
Courier(default)
• Any valid typeface identifier.
Values
4.264.3. Applies to
Model
4.264.4. Version
XFA 2.1
4.264.5. Examples
4.264.6. JavaScript
TextField1.font.typeface = "Myriad Pro";
4.264.7. FormCalc
TextField1.font.typeface = "Myriad Pro"
4.265. underline
Specifies the activation and type of underlining.
4.265.1. Syntax
Reference_Syntax.underline = "0 | 1 | 2"
Object
Scripting Properties
512
Scripting Properties
4.265.2. Values
String
Type
4.265.3. Applies to
Values
•
0(default)
• The font renders without underlining.
•
1
• The font renders with a single underline.
•
2
• The font renders with a double underline.
Model
4.265.4. Version
XFA 2.1
4.265.5. Examples
4.265.6. JavaScript
TextField1.font.underline = "2";
4.265.7. FormCalc
TextField1.font.underline = "2"
Object
4
513
4.266. underlinePeriod
Controls the appearance of underlining.
4.266.1. Syntax
Reference_Syntax.underlinePeriod = "all | word"
4.266.2. Values
Type
String
Values
• all(default)
• The rendered line shall extend across word breaks.
• word
• The rendered line shall be interrupted at word breaks.
4.266.3. Applies to
Object Model
4.266.4. Version
XFA 2.1
4.266.5. Examples
4.266.6. JavaScript
TextField1.font.underlinePeriod = "word";
Scripting Properties
514
Scripting Properties
4.266.7. FormCalc
TextField1.font.underlinePeriod = "word"
4
4.267. upsMode
Represents the mode in a UPS Maxicode barcode.
4.267.1. Syntax
Reference_Syntax.upsMode = “usCarrier | internationalCarrier | standardSymbol | secureSymbol”
4.267.2. Values
Type
String
Values
• usCarrier(default)
• United States carrier with postal codes that contain up to nine digits.
• internationalCarrier
• International carrier with alphanumeric postal codes that contain up to six digits.
• standardSymbol
• Non-shipping encoded information up to 90 characters in length.
• secureSymbol
• Non-shipping encoded information up to 74 characters in length (it has more error correction than four).
515
4.267.3. Applies to
Model
4.267.4. Version
XFA 2.5
4.268. url
Specifies the URL for this object.
4.268.1. Syntax
Reference_Syntax.url = "string"
4.268.2. Values
Object
Type
String
Values
A valid string representing a URL for this individual node.
4.268.3. Applies to
Model
4.268.4. Version
XFA 2.5
Object
Scripting Properties
516
Scripting Properties
4.269. urlPolicy
Specifies the type of URL represented by the certificates object.
It is equivalent to the urlType attribute for PDF documents and its values are encoded as Browser,
ASSP, or the string the user entered for the urlType key.
4
4.269.1. Syntax
Reference_Syntax.urlPolicy = "enrollmentServer | roamingCredentialServer |
string"
4.269.2. Values
Type
String
Values
• enrollmentServer
• The URL references a web server where a signing party can enroll for a digital certificate.
• roamingCredentialServer
• The URL references web service that holds the digital credentials that a signing party uses to sign a document or data.
• A valid string that extends the use of this property with unique values.
4.269.3. Applies to
Model Object
4.269.4. Version
XFA 2.5
517
Scripting Properties
4.270. usage
Specifies the contexts in which to use the connection.
4.270.1. Syntax
Reference_Syntax.usage = "exportAndImport | exportOnly | importOnly"
4.270.2. Values
String
Type Values
• exportAndImport(default)
• Used during both import and export.
• exportOnly
• Used during export, ignored during import.
• importOnly
• Used during import, ignored during export.
4.270.3. Applies to
Model
4.270.4. Version
XFA 2.1
Object
518
Scripting Properties
4.270.5. Examples
4.270.6. JavaScript
TextField1.connect.usage = "importOnly";
4.270.7. FormCalc
TextField1.connect.usage = "importOnly"
4.271. use
Invokes a prototype.
4.271.1. Syntax
Reference_Syntax.use = "string"
4.271.2. Values
Type
String
Values
The value of this property is a ‘#’ character followed by the prototype’s identifier.
4.271.3. Applies to
Model Object
effectiveInputPolicy effectiveOutputPolicy
519
4
Scripting Properties
Model Object
4.271.4. Version
XFA 2.1
4.272. usehref
Invokes an external prototype.
NOTE
:
The usehrefproperty cannot target PDF files, even if the PDF files contain XML Form Object
Model objects.
If an object contains both a useand ausehrefproperty, theusehrefproperty has precedence over the useproperty. This precedence allows a different prototype to be used when rendering form designs on legacy systems. Legacy systems will ignore the usehrefproperty.
To mitigate security issues, specify HTTPS for the usehrefURI or ensure that all prototype references occur behind a firewall.
520
Scripting Properties
4.272.1. Syntax
Reference_Syntax.usehref = "string"
4.272.2. Values
Type
String
Values
A valid string representing an external prototype. The value of this property includes a “#” character and the prototype’s identifier: usehref="URL#XML_ID" usehref="URL#ref(reference_syntax)"
4.272.3. Applies to
Model
effectiveInputPolicy effectiveOutputPolicy
Object
4
521
Model
4.272.4. Version
XFA 2.4
4.273. uuid
Specifies the Universally Unique Identifier (UUID) for this object.
4.273.1. Syntax
Reference_Syntax.uuid = "string"
Scripting Properties
Object
522
Scripting Properties
4.273.2. Values
Type
String
Values
A valid string representing a universally unique identifier for this individual node.
4.273.3. Applies to
Object Model
4.273.4. Version
XFA 2.1
4.274. validationMessage
Specifies the validate message string for this field.
4.274.1. Syntax
Reference_Syntax.validationMessage = "string"
4.274.2. Values
Type
String
Values
A valid string representing a validation message to display to the user.
4
523
Scripting Properties
4.274.3. Applies to
Model Object
4.274.4. Version
XFA 2.1
4.274.5. Examples
4.274.6. JavaScript
NumericField1.validationMessage = "This is the validation message."
4.274.7. FormCalc
NumericField1.validationMessage = "This is the validation message."
4.275. validationsEnabled
Specifies whether the validation scripts will execute.
4.275.1. JavaScript Syntax
Reference_Syntax.validationsEnabled = false | true;
- or -
Reference_Syntax.validationsEnabled = 0 | 1;
4.275.2. FormCalc Syntax
Reference_Syntax.validationsEnabled = 0 | 1
524
Scripting Properties
4.275.3. Values
Boolean
Type Values
• false | 0(default)
• Validation scripts are disabled.
• true | 1
• Validation scripts are enabled.
4.275.4. Applies to
Model
4.275.5. Version
XFA 2.1
4.275.6. Examples
4.275.7. JavaScript
xfa.host.validationsEnabled = 1;
4.275.8. FormCalc
xfa.host.validationsEnabled = 1
4.276. vAlign
Specifies the vertical text alignment.
Object
525
4
4.276.1. Syntax
Reference_Syntax.vAlign = "top | middle | bottom"
4.276.2. Values
String
Type Values
• top(default)
• Align with the top of the available region.
• middle
• Center vertically within the available region.
• bottom
• Align with the bottom of the available region.
4.276.3. Applies to
Model
Object
Scripting Properties
4.276.4. Version
XFA 2.1
4.276.5. Examples
4.276.6. JavaScript
TextField1.vAlign = "top";
526
Scripting Properties
4.276.7. FormCalc
TextField1.vAlign = "top"
4.277. value
Specifies the value of the current object.
Specifies a comma separated list of values for each color component of the color space.
4.277.1. Syntax
Reference_Syntax.value = "various"
4.277.2. Values
Type
Varies
Values
Values differ depending on the referencing object.
For example, the valueproperty of afieldobject is a string representing the actual value displayed in the field, or the field’s bound value.
Alternatively, for objects that require an color value, this property specifies a comma-separated list of values for each color component of the color space. For the color-space of SRGB, the component values must be r,g,b, where r is the red component value, g is the green component value, and b is the blue component value. Each component value must be in the range 0 through 255, inclusive. 255 represents maximum display intensity. For example, 255,0,0 specifies the color red.
The default is dependent upon the context of where the color is used; the default color is determined by the object enclosing the color object.
4.277.3. Applies to
Model Object
4
527
Scripting Properties
Model
Also applies to objects derived from the textNodeclass class.
4.277.4. Version
XFA 2.1
4.277.5. Examples
Object
4.277.6. JavaScript
// Use the value property to set and get the document variable’s value.
TextField1.rawValue = docVar.value;
4.277.7. FormCalc
// Use the value property to set and get the document variable’s value.
TextField1 = docVar.value
R
ELATED LINKS
:
Creating a node in the data model
Manipulating instances of a subform
Getting or setting object values
528
Scripting Properties
4.278. valueRef
Resolves a data value for each data node in the set identified by the ref object.
The data values are then used to populate the value items, such as
<items save='1'>.
The valueRef property is a relative reference syntax expression.
NOTE
:
This property is read only.
4.278.1. Syntax
Reference_Syntax.valueRef = "string"
4.278.2. Values
4
Type
String
Values
A valid string representing a data value for each data node in the set.
4.278.3. Applies to
Model
4.278.4. Version
XFA 2.4
4.279. variation
Indicates the packaging of the application that is running the script.
It is available only for client applications.
NOTE
:
This property is read only.
529
Object
Scripting Properties
4.279.1. Syntax
Reference_Syntax.variation
4.279.2. Values
Type
String
Values
A valid string representing the packaging of the application. For example, in the case of a PDF form in
Acrobat, this property returns one of:
Reader, Fill-in,Business Tools, orFull.
4.279.3. Applies to
Object Model
4.279.4. Version
XFA 2.1
4.279.5. Examples
4.279.6. JavaScript
xfa.host.variation;
4.279.7. FormCalc
xfa.host.variation
4.280. version
Indicates the version number of the current application.
530
Scripting Properties
NOTE
:
This property is read only.
4.280.1. Syntax
Reference_Syntax.version
4.280.2. Values
Type
String
Values
A valid string representing the packaging of the application. For example, in Acrobat 6.0.1 this property returns
6.0.1.
4.280.3. Applies to
Object Model
4.280.4. Version
XFA 2.1
4.280.5. Examples
4.280.6. JavaScript
xfa.host.version;
4.280.7. FormCalc
xfa.host.version
4
531
Scripting Properties
4.281. vScrollPolicy
Specifies whether a field can scroll vertically.
NOTE
:
This property does not apply to Text Fields that can expand to accommodate data or text.
4.281.1. Syntax
Reference_Syntax.vScrollPolicy = "auto | on | off"
4.281.2. Values
Type
String
Values
• auto(default)
• Single-line fields scroll horizontally and multi-line fields scroll vertically
(displaying a vertical scroll bar when necessary).
• on
• Vertical scroll bars appear regardless of whether the text or data overflows the boundaries of the field.
• off
• Restricts the user from entering characters in the field beyond what can physically fit within the field width. Note that this restriction does not apply to data with the field.
4.281.3. Applies to
Model Object
4.281.4. Version
XFA 2.5
532
Scripting Properties
4.281.5. Examples
4.281.6. JavaScript
TextField1.resolveNode("ui.#textEdit").vScrollPolicy = "off";
4.281.7. FormCalc
TextField1.ui.#textEdit.vScrollPolicy = "off"
4
4.282. w
A measurement specifying the width for the layout.
property and the maxW property define the width for the object.
4.282.1. Syntax
Reference_Syntax.w = "0in | measurement"
4.282.2. Values
String
Type
•
0in(default)
• Any valid measurement.
Values
533
4.282.3. Applies to
Model
4.282.4. Version
XFA 2.1
4.282.5. Examples
4.282.6. JavaScript
TextField1.w = "3in";
4.282.7. FormCalc
TextField1.w = "3in"
4.283. weight
Controls the weight of the font typeface.
4.283.1. Syntax
Reference_Syntax.weight = "bold | normal"
Object
Scripting Properties
534
Scripting Properties
4.283.2. Values
Type
String
Values
• bold(default)
• The typeface is rendered with a bold weight.
• normal
• The typeface is rendered at the default typeface weight.
4.283.3. Applies to
Model
4.283.4. Version
XFA 2.1
4.283.5. Examples
4.283.6. JavaScript
TextField1.font.weight = "normal";
4.283.7. FormCalc
TextField1.font.weight = "normal"
4.284. wideNarrowRatio
Specifies a ratio of wide bar to narrow bar in supported barcodes.
Object
535
4
Scripting Properties
The allowable range of ratios varies between barcode formats and also, for hardware barcodes, the output device. The template must not specify a value outside the allowable range. The parser ignores this property for barcode formats which do not allow a variable ratio of wide to narrow bar widths.
4.284.1. Syntax
Reference_Syntax.wideNarrowRatio = "3:1 | wide[:narrow]"
4.284.2. Values
Type
String
Values
•
3:1(default)
• wide[:narrow]
Any valid ratio that uses the syntax:
• wide[:narrow] wherewideis a positive number representing the numerator of the ratio, and narrow is an optional positive number representing the denominator of the ratio.
If narrow is not supplied it defaults to
1.
4.284.3. Applies to
Model Object
4.284.4. Version
XFA 2.1
4.284.5. Examples
4.284.6. JavaScript
Barcode1.resolveNode("ui.#barcode").wideNarrowRatio = "5:1";
536
Scripting Properties
4.284.7. FormCalc
Barcode1.ui.#barcode.wideNarrowRatio = "5:1"
4
4.285. wordCharacterCount
Specifies the minimum number of grapheme clusters that must be present in a word in order for it to be eligible for hyphenation. Words with fewer clusters will not be hyphenated.
4.285.1. Syntax
Reference_Syntax.wordCharacterCount = "integer"
4.285.2. Values
Type
Integer
Values
A valid integer representing the number of grapheme clusters. The default value is
7.
4.285.3. Applies to
Model Object
4.285.4. Version
XFA 2.8
4.286. wordSpacingMaximum
Specifies the maximum inter-word percentage space when text is justified, hyphenation is enabled, or both.
537
Scripting Properties
If the maximum space is specified or defaulted to be less than the optimal word spacing, the specified maximum space is ignored and the optimal space value is used for the maximum.
4.286.1. Syntax
Reference_Syntax.wordSpacingMaximum = "[0..100]%"
4.286.2. Values
Type
String
Values
A percentage value between 0 and 100. The default value is
100%.
4.286.3. Applies to
Model
4.286.4. Version
XFA 2.8
4.286.5. Examples
4.286.6. JavaScript
TextField1.para.wordSpacingMaximum = "40%";
4.286.7. FormCalc
TextField1.para.wordSpacingMaximum = "40%"
Object
538
Scripting Properties
4.287. wordSpacingMinimum
4
Specifies the minimum inter-word percentage space when text is justified, hyphenation is enabled, or both.
If the minimum space is specified or defaulted to be greater than the optimal word spacing, the specified minimum space is ignored and the optimal space value is used for the minimum.
4.287.1. Syntax
Reference_Syntax.wordSpacingMinimum = "[0..100]%"
4.287.2. Values
Type
String
Values
A percentage value between 0 and 100. The default value is
100%.
4.287.3. Applies to
Model
4.287.4. Version
XFA 2.8
4.287.5. Examples
4.287.6. JavaScript
TextField1.para.wordSpacingMinimum = "40%";
539
Object
Scripting Properties
4.287.7. FormCalc
TextField1.para.wordSpacingMinimum = "40%"
4.288. wordSpacingOptimum
Specifies the optimal percentage width of an inter-word space when text is justified, hyphenation is enabled, or both.
4.288.1. Syntax
Reference_Syntax.wordSpacingOptimum = "[0..100]%"
4.288.2. Values
Type
String
Values
A percentage value between 0 and 100. The default value is
100%.
4.288.3. Applies to
Model Object
4.288.4. Version
XFA 2.8
540
Scripting Properties
4.288.5. Examples
4.288.6. JavaScript
TextField1.para.wordSpacingOptimum = "80%";
4.288.7. FormCalc
TextField1.para.wordSpacingOptimum = "80%"
4
4.289. x
Specifies the X coordinate of the container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
Containers with flowed content do not use x coordinates.
4.289.1. Syntax
Reference_Syntax.x = "0in | measurement"
4.289.2. Values
String
Type Values
•
0in(default)
• Any valid measurement value.
541
Scripting Properties
4.289.3. Applies to
Model Object
4.289.4. Version
XFA 2.1
4.289.5. Examples
4.289.6. JavaScript
TextField1.x = "5in";
4.289.7. FormCalc
TextField.x = "5in"
4.290. xdpContent
Controls what subset of the data is submitted. This property is used only when the format property
is xdp.
4.290.1. Syntax
Reference_Syntax.xdpContent = "string"
542
Scripting Properties
4.290.2. Values
Type
String
Values
• datasets pdf xfdf(default)
• Submits objects with the tags datasets, pdf, and xfdf to the host.
• tag1 tag2 ... tagN
• Submits objects with tags matching any of the specified tags.
•
* (asterisk)
• Submits all data objects to the host.
4.290.3. Applies to
Model
4.290.4. Version
XFA 2.1
4.290.5. Examples
4.290.6. JavaScript
Button1.resolveNode("#event.#submit").xdpContent = "*"
4.290.7. FormCalc
Button1.#event.#submit.xdpContent = "*"
Object
4
543
Scripting Properties
4.291. y
Specifies the Y coordinate of a container’s anchor point relative to the top-left corner of the parent container when placed with positioned layout.
Containers with flowed content do not use y coordinates.
4.291.1. Syntax
Reference_Syntax.y = "0in | measurement"
4.291.2. Values
String
Type Values
•
0in(default)
• Any valid measurement value.
4.291.3. Applies to
Model Object
4.291.4. Version
XFA 2.1
544
Scripting Properties
4.291.5. Examples
4.291.6. JavaScript
TextField1.y = "5in";
4.291.7. FormCalc
TextField.y = "5in"
4
545
Scripting Methods
5.
Scripting Methods
These methods are supported in this scripting environment.
Each host, such Acrobat, Adobe Reader or Designer
®
, is responsible for implementing the available methods. Some methods, such as beep, do not make sense on a server. The server does not implement these methods and instead can output an error message if a user tries to call the method.
5.1.
Scripting methods for Acrobat and Adobe Reader
5.1.1.
absPage
Determines the page of the form that a given form design object first appears on.
Syntax
Reference_Syntax.absPage( OBJECT param )
Parameters
param
The fully qualified reference syntax expression of one of the following form design objects: field, draw, subform, area, pageArea, contentArea.
Returns
An integer representing the page of the form (0-based).
NOTE
:
If a subform is hidden, the fields residing in it will not be found and the method does not return the page number. However, if the subform is visible but the fields in it are hidden, the method returns the page number on which fields reside.
546
Scripting Methods
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
TextField2.rawValue = xfa.layout.absPage(this);
FormCalc
TextField2 = xfa.layout.absPage($)
R
ELATED LINKS
:
Working with page numbers and page counts
5.1.2.
absPageCount
Determines the page count of the current form.
Syntax
Reference_Syntax.absPageCount()
Parameters
None
Returns
An integer representing the number of pages in the current form.
547
5
Scripting Methods
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
TextField2.rawValue = xfa.layout.absPageCount();
FormCalc
TextField2 = xfa.layout.absPageCount()
R
ELATED LINKS
:
Working with page numbers and page counts
5.1.3.
absPageCountInBatch
Determines the page count of the current batch.
Syntax
Reference_Syntax.absPageCountInBatch()
Version
2.5
Parameters
None
548
Scripting Methods
Returns
An integer representing the page count of the current batch.
Applies to
Model
Object
Version
XFA 2.1
5.1.4.
absPageInBatch
Determines which page within the batch contains the form object.
Syntax
Reference_Syntax.absPageInBatch( OBJECT param )
Version
2.5
Parameters
param
The fully qualified reference syntax expression of one of the following form objects: field, draw, subform, area, pageArea, contentArea.
Returns
An integer representing the page number that contains the form object.
5
549
Scripting Methods
Applies to
Model
Object
Version
XFA 2.5
5.1.5.
absPageSpan
Determines the number of pages that a specified form object spans.
Syntax
Reference_Syntax.absPageSpan( OBJECT param )
Parameters
param
The fully qualified reference syntax expression of one of the following form objects: field, draw, subform, area, pageArea, contentArea.
Returns
An integer representing the number of pages the specified form object spans.
Applies to
Model
Object
Version
XFA 2.1
550
Scripting Methods
Examples
JavaScript
xfa.layout.absPageSpan(Subform1);
FormCalc
xfa.layout.absPageSpan(Subform1)
5.1.6.
addInstance
Adds a new instance of a subform or subform set to the form model.
Syntax
Reference_Syntax.addInstance( BOOLEAN param )
Parameters
param
(Optional
)
Indicates if the new subform or subform set has a corresponding data value in the data model.
• true | 1(JavaScript) or1(FormCalc)(default)
• Merge the new subform or subform set with the data model.
• false | 0(JavaScript) or0(FormCalc)
• Do not perform a merge operation.
Returns
The new form object, or null if no object was added.
Applies to
5
Model
Object
551
Scripting Methods
Version
XFA 2.1
Examples
JavaScript
Subform1.instanceManager.addInstance(1);
FormCalc
Subform1.instanceManager.addInstance(1)
R
ELATED LINKS
:
Manipulating instances of a subform
5.1.7.
addItem
Adds new items to the current form field. For example, this method adds new items to a drop-down list.
Syntax
Reference_Syntax.addItem( STRING param1 [, STRING param2 ] )
Parameters
param1
param2
(Optional
)
A valid string representing the value to display in the field.
A valid string representing the new item’s bound value. If empty, the default value is an empty string.
Returns
Empty
552
Scripting Methods
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
DropDownList1.addItem("Human Resources");
FormCalc
DropDownList1.addItem("Human Resources")
R
ELATED LINKS
:
5.1.8.
addNew
Appends a new record to the recordset.
Syntax
Reference_Syntax.addNew()
Parameters
None
Returns
Empty
553
Object
5
Scripting Methods
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.dataConnectionName.addNew();
FormCalc
xfa.sourceSet.dataConnectionName.addNew();
5.1.9.
append
Appends a node to the end of the node list.
Syntax
Reference_Syntax.append( OBJECT param )
Parameters
Object
param
A valid reference syntax expression representing the node to be appended.
Returns
Empty
554
Scripting Methods
Applies to
Version
XFA 2.1
Examples
JavaScript
// Append a data group node to another data model node. xfa.record.nodes.append(oGroupNode);
FormCalc
// Append a data group node to another data model node. xfa.record.nodes.append(oGroupNode)
R
ELATED LINKS
:
Creating a node in the data model
5.1.10. applyXSL
Applies an XSL transformation to the XML representation of the current node. It is equivalent to calling saveXML and transforming the result with the specified XSL document.
Syntax
Reference_Syntax.applyXSL( STRING param )
Parameters
5
param
A valid string representing the XSL transformation input to apply.
Returns
A valid string representing the result of the XSL transformation.
555
Scripting Methods
Applies to
Version
XFA 2.1
5.1.11. assignNode
Evaluates the reference syntax expression using the current context and sets the value of the found node. If the node doesn’t exist, it can be created.
Syntax
Reference_Syntax.assignNode( STRING param1 [, STRING param2 [, INTEGER param3 ]
] )
Parameters
param1
param2
(Optional
)
A valid string representing a reference syntax expression that points to a particular node.
A valid string representing the value to assign to the node.
556
Scripting Methods
param3
(Optional
)
An integer value representing the action to take when creating new nodes. The following are the valid parameter values:
•
0
• If the node exists, the value is updated. If the node doesn’t exist, it is created.
•
1
• If the node exists, an error is thrown. If the node doesn’t exist, it is created.
•
2
• If the node exists, no action is taken. If the node doesn’t exist, it is created.
•
3
• A new node is always created.
5
Returns
An object corresponding to the specified node.
Applies to
Version
XFA 2.1
5.1.12. beep
Causes the system to play a sound. It is available only for client applications.
Syntax
Reference_Syntax.beep( [ INTEGER param ] )
557
Scripting Methods
Parameters
param(Op tional)
The system code for the appropriate sound. Each system code corresponds to a specific
Windows program event.
•
0(Error) - Corresponds to the Critical Stop program event.
•
1(Warning) - Corresponds to the Exclamation program event.
•
2(Question) - Corresponds to the Question program event.
•
3(Status) - Corresponds to the Asterisk program event.
•
4(Default) - Corresponds to the Default Beep program event.
To view the list of Windows program events, click Start > Settings > Control Panel >
Sounds and Audio Devices, and then click the Sounds tab. The Program Events list displays a list of system events. Events marked with a speaker icon have an associated sound.
Returns
Empty
Applies to
Version
XFA 2.1
Examples
JavaScript
xfa.host.beep("3");
FormCalc
xfa.host.beep("3")
Model
Object
558
Scripting Methods
5.1.13. boundItem
Gets the bound value of a specific display item of a drop-down list or list box.
Syntax
Reference_Syntax.boundItem( STRING param )
Parameters
param
A valid string representing the display value that appears in the list box or drop-down list.
Returns
A valid string representing the bound value of a specified display value.
Applies to
5
Model
Version
XFA 2.1
Examples
JavaScript
DropDownList1.boundItem("Text");
FormCalc
DropDownList1.boundItem("Text")
Object
559
Scripting Methods
5.1.14. cancel
Cancels any changes made to the current or new row of a recordset object, or the field collection of
a record object, before calling the update method.
Syntax
Reference_Syntax.cancel()
Parameters
None
Returns
Empty
Applies to
Object Model
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.dataConnectionName.cancel();
FormCalc
xfa.sourceSet.dataConnectionName.cancel()
560
Scripting Methods
5.1.15. cancelBatch
Cancels a pending batch update.
Syntax
Reference_Syntax.cancelBatch()
Parameters
None
Returns
Empty
Applies to
Model
Version
XFA 2.1
5.1.16. clear
Removes a given signature.
Syntax
Reference_Syntax.clear( OBJECT param1 [, BOOLEAN param2 ] )
Parameters
Object
param1
input A valid XML signature node.
561
5
Scripting Methods
param2
(Optional) input
(Optional)
• true | 1(JavaScript) or1(FormCalc) (default)
• Displays a confirmation dialog box indicating that the signature field is cleared.
• false | 0(JavaScript) or0(FormCalc)
• Does not display a confirmation dialog box indicating that the signature field is cleared.
Returns
Trueif the signature was removed successfully. Falseif the signature was not removed successfully. An exception if the node specified in param1 is not a signature node.
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
// This example removes the signature from all signed objects on a form. var oSigs = xfa.signature.enumerate(); var iNum = oSigs.length; for (var i=0; i < iNum; i++)
{ var oChild = oSigs.item(i); xfa.signature.clear(child);
}
FormCalc
// This example removes the signature from all signed objects on a form. var oSigs = xfa.signature.enumerate() var iNum = oSigs.length - 1
562
Scripting Methods
for i=0 upto iNum step 1 do var oChild = oSigs.item(i) xfa.signature.clear(child) endfor
5.1.17. clearErrorList
Removes all items from the current error log.
Syntax
Reference_Syntax.clearErrorList()
Parameters
None
Returns
Empty
Applies to
Version
XFA 2.1
5.1.18. clearItems
Removes all the items from the field. For example, it removes all the items contained within a drop-down list or a list box.
Syntax
Reference_Syntax.clearItems()
Parameters
None
563
5
Scripting Methods
Returns
Empty
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
DropDownList1.clearItems();
FormCalc
DropDownList1.clearItems()
R
ELATED LINKS
:
5.1.19. clone
Makes a copy of an object.
Syntax
Reference_Syntax.clone( BOOLEAN param )
Object
564
Scripting Methods
Parameters
param
A Boolean value indicating if cloning should occur recursively.
• true | 1(JavaScript) or1(FormCalc) (Default)
• Clone the object recursively.
• false | 0(JavaScript) or0(FormCalc)
• Do not clone the object recursively.
Returns
The duplicate copy of the object.
Applies to
Version
XFA 2.1
Examples
JavaScript
xfa.record.NewGroupNode.clone(1);
FormCalc
xfa.record.NewGroupNode.clone(1)
R
ELATED LINKS
:
Creating a node in the data model
5.1.20. close
Closes a connection to a data source.
5
565
Scripting Methods
Syntax
Reference_Syntax.close()
Parameters
None
Returns
Empty
Applies to
Model Object
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.nodes.item(nIndex).close();
FormCalc
xfa.sourceSet.nodes.item(nIndex).close()
5.1.21. createNode
Creates new node based on a valid class name.
NOTE
:
You cannot use the createNode method to create any of the following XML Form Object
Model objects:
566
Scripting Methods 5
Syntax
Reference_Syntax.createNode( STRING param1 [, STRING param2 [, STRING param3 ] ]
)
Parameters
param1
param2
(Optiona l)
A valid string representing the class name of the object to create.
A valid string representing the name to assign to the node. If empty, the value of this parameter defaults to an empty string.
param3
(Optiona l)
A valid string representing the XML namespace that the created node will exist in. If empty, the value of this parameter defaults to an empty string.
Returns
An object representing a valid node.
Applies to
Version
XFA 2.1
Examples
JavaScript
// Create a node of type dataGroup. var oGroupNode = xfa.datasets.createNode("dataGroup", "NewGroupNode");
FormCalc
// Create a node of type dataGroup. var oGroupNode = xfa.datasets.createNode("dataGroup", "NewGroupNode")
R
ELATED LINKS
:
567
Scripting Methods
Creating a node in the data model
5.1.22. currentDateTime
(currentDateTime)Returns current date and time in ISO 8601 format (YYYYMMDDTHHMMSS).
Syntax
Reference_Syntax.currentDateTime()
Parameters
None
Returns
The current date and time in ISO 8601 format (YYYYMMDDTHHMMSS).
Applies to
Object Model
Version
XFA 2.8
5.1.23. delete (FormCalc Only)
Deletes the current record from the recordset.
Syntax
Reference_Syntax.delete()
Parameters
None
568
Scripting Methods
Returns
Empty
Applies to
Model
Version
XFA 2.1
Example
FormCalc
xfa.sourceSet.dataConnectionName.delete()
5.1.24. deleteItem
Deletes the specified item.
Syntax
Reference_Syntax.deleteItem( INTEGER param )
Parameters
param
A valid integer representing the zero-based index into the item.
Returns
True if the item was deleted and false if it was not deleted.
Object
569
5
Scripting Methods
Applies to
Model
Version
XFA 2.5
JavaScript
ListBox1.deleteItem(ListBox1.selectedIndex);
FormCalc
ListBox1.deleteItem(ListBox1.selectedIndex)
5.1.25. deleteRecord
Deletes the current record from the recordset.
Syntax
Reference_Syntax.deleteRecord( )
Parameters
None
Returns
Empty.
Object
570
Scripting Methods
Applies to
Model Object
Version
XFA 2.5
JavaScript
xfa.sourceSet.dataConnectionName.deleteRecord();
FormCalc
xfa.sourceSet.dataConnectionName.deleteRecord()
5.1.26. documentCountInBatch
Determines the number of documents in the current batch.
Syntax
Reference_Syntax.documentCountInBatch()
Version
2.5
Parameters
None
Returns
An integer representing the total number of documents in the batch. Hosts that do not support batching return
1.
5
571
Scripting Methods
Applies to
Model
Object
Version
XFA 2.5
5.1.27. documentInBatch
Determines the ordinal number of the current document within the batch.
Syntax
Reference_Syntax.documentInBatch()
Version
2.5
Parameters
None
Returns
An integer representing a physical document number (zero based). Hosts that do not support batching return
0.
Applies to
Model
Object
572
Scripting Methods
Version
XFA 2.5
5.1.28. emit
Notifies the form event manager that an event has occurred.
Syntax
Reference_Syntax.emit()
Parameters
None
Returns
Empty
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.event.emit();
FormCalc
xfa.event.emit()
573
5
Scripting Methods
5.1.29. enumerate
Enumerates all the XML signatures found in the document.
Syntax
Reference_Syntax.enumerate()
Parameters
None
Returns
An object representing an XFA node list of all the XML signature nodes.
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
//This example removes the signature from all signed objects on a form.
//In this case, enumerate() is used to determine the list of objects signed
//by the signature. var oSigs = xfa.signature.enumerate(); var iNum = oSigs.length; for (var i=0; i < iNum; i++)
{ var oChild = oSigs.item(i); xfa.signature.clear(child);
}
574
Scripting Methods
FormCalc
//This example removes the signature from all signed objects on a form.
//In this case, enumerate() is used to determine the list of objects signed
//by the signature. var oSigs = xfa.signature.enumerate() var iNum = oSigs.length - 1 for i=0 upto iNum step 1 do var oChild = oSigs.item(i) xfa.signature.clear(child) endfor
5
5.1.30. evaluate
Gets the list of objects seen in the manifest.
Syntax
Reference_Syntax.evaluate()
Parameters
None
Returns
An object representing the list of objects.
Applies to
Model Object
Version
XFA 2.1
5.1.31. execCalculate
Executes any scripts on the calculate event of the specified object, and any child objects.
575
Scripting Methods
Ensure that you do not inadvertently execute this method with a larger scope than is necessary.
Depending on the nature of your scripts, the calculate event could trigger multiple times in response to a single method execution, and could trigger the calculate events of other objects if the value of those objects changes because of the execution of any script.
Syntax
Reference_Syntax.execCalculate()
Parameters
None
Returns
Empty
Applies to
Model Object
Version
XFA 2.1
Examples
JavaScript
xfa.form.execCalcu
late();
Executes the scripts contained on the calculate event for all objects on the form.
576
Scripting Methods
Subform1.execCalcu
late();
TextField1.execCal
culate();
Executes the scripts contained on the calculate event of the object named
Subform1, and for any objects contained within the subform.
Executes the scripts contained on the calculate event of the object named
TextField1.
5
FormCalc
xfa.form.execCalcu
late()
Subform1.execCalcu
late()
TextField1.execCal
culate()
Executes the scripts contained on the calculate event for all objects on the form.
Executes the scripts contained on the calculate event of the object named
Subform1, and for any objects contained within the subform.
Executes the scripts contained on the calculate event of the object named
TextField1.
5.1.32. execEvent
Executes the event script of the object.
Syntax
Reference_Syntax.execEvent( STRING param )
Parameters
param
A valid string representing the name of the event to execute.
Returns
Empty
577
Scripting Methods
Applies to
Model Object
Version
XFA 2.1
Examples
JavaScript
Button1.execEvent("click");
FormCalc
Button1.execEvent("click")
5.1.33. execInitialize
Executes any scripts on the initialize event of the specified object, and any child objects.
Syntax
Reference_Syntax.execInitialize()
Parameters
None
Returns
Empty
578
Scripting Methods
Applies to
Model Object
Version
XFA 2.1
Examples
JavaScript
xfa.form.execInitiali
ze();
Executes the scripts contained on the initialize event for all objects on the form.
Subform1.execInitiali
ze();
Executes the scripts contained on the initialize event of the object named
Subform1, and for any objects contained within the subform.
TextField1.execInitia
lize();
Executes the scripts contained on the initialize event of the object named
TextField1.
FormCalc
5
xfa.form.execInitial
ize()
Subform1.execInitial
ize()
TextField1.execIniti
alize()
Executes the scripts contained on the initialize event for all objects on the form.
Executes the scripts contained on the initialize event of the object named
Subform1, and for any objects contained within the subform.
Executes the scripts contained on the initialize event of the object named
TextField1.
579
Scripting Methods
5.1.34. execute
Executes a connection.
Syntax
Reference_Syntax.execute( BOOLEAN param )
Parameters
param
• true | 1(JavaScript) or1(FormCalc) (Default)
• Forces the remerging of the form design and the imported WSDL data.
• false | 0(JavaScript) or0(FormCalc)
• Imports the WSDL data into current Form without merging it with the form design.
Returns
True if the connection was executed successfully, and false if it is unsuccessful.
Applies to
Model
Object
Version
XFA 2.1
5.1.35. execValidate
Executes any scripts on the validate event of the specified object, and any child objects.
580
Scripting Methods
Syntax
Reference_Syntax.execValidate()
Parameters
None
Returns
Empty
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.form.execValida
te();
Subform1.execValida
te();
Executes the scripts contained on the validate event for all objects on the form.
Executes the scripts contained on the validate event of the object named
Subform1, and for any objects contained within the subform.
TextField1.execVali
date();
Executes the scripts contained on the validate event of the object named
TextField1.
5
581
Scripting Methods
FormCalc
xfa.form.execValid
ate()
Subform1.execValid
ate()
TextField1.execVal
idate()
Executes the scripts contained on the validate event for all objects on the form.
Executes the scripts contained on the validate event of the object named
Subform1, and for any objects contained within the subform.
Executes the scripts contained on the validate event of the object named
TextField1.
5.1.36. exportData
Exports the data from the current form in either XDP or XML format to a file.
For security reasons, if you provide the first parameter, the exportDatamethod executes only when performed on certified documents. If you do not provide the first parameter, the document does not need to be certified and the user is prompted to provide a location and filename.
Syntax
Reference_Syntax.exportData( [ STRING param1 [, BOOLEAN param2 ] ])
Parameters
param1(Optio nal)
param2
(Optional)
Specifies the location and file name of the file where the data will export. If you omit this parameter, a dialog box opens to let the user select the file manually.
This parameter is only valid on certified documents where the user has sufficient permissions.
Specifies the export format for the data.
• true | 1(JavaScript) or1(FormCalc) (Default)
• Export to XDP format.
• false | 0(JavaScript) or0(FormCalc)
• Export plain XML data.
To change the export type without specifying a file name, you must provide an empty string as the first parameter. For example: xfa.host.exportData("",0); //JavaScript xfa.host.exportData("", 0) //FormCalc
582
Scripting Methods
Returns
Empty
Applies to
5
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.host.exportData("filename.xdp");
FormCalc
xfa.host.exportData("filename.xdp")
R
ELATED LINKS
:
5.1.37. first
Moves to the first record in the recordset, and populates the data model with the record data.
NOTE
:
The data connection method xfa.sourceSet.DataConnection.firstlooks up a
table and updates the table if the data has changed. It uses the hasDataChanged method to determine
whether the data has changed.
Syntax
Reference_Syntax.first()
583
Scripting Methods
Parameters
None
Returns
Empty
Applies to
Model Object
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.dataConnectionName.first();
FormCalc
xfa.sourceSet.dataConnectionName.first()
5.1.38. formNodes
Returns a list of all form model objects that are bound to a specified data object.
Syntax
Reference_Syntax.formNodes( OBJECT param )
584
Scripting Methods
Parameters
5
param1 A valid reference syntax expression representing a data model object.
Returns
An object representing the list of all form model objects that have a relationship with the specified data object.
Applies to
Object Model
Version
XFA 2.1
5.1.39. getAttribute
Gets a specified property value.
Syntax
Reference_Syntax.getAttribute( STRING param )
Parameters
param
A valid string representing the name of the property to retrieve.
Returns
A valid string representing the value of the property.
585
Scripting Methods
Applies to
Model
Also applies to the nodeclass class.
Version
XFA 2.1
Examples
Object
JavaScript
var sBOFBackup = oDB.nodes.item(nIndex).query.recordSet.getAttribute("bofAction");
FormCalc
var sBOFBackup = oDB.nodes.item(nIndex).query.recordSet.getAttribute("bofAction")
5.1.40. getDelta
Gets a delta script object for a specific property.
Syntax
Reference_Syntax.getDelta( STRING param )
Version
2.5
586
Scripting Methods
Parameters
5
param
A string representing the reference syntax to a property.
Returns
A valid object representing a delta script object.
Applies to
Version
XFA 2.5
5.1.41. getDeltas
Recursively gets all the delta script objects for this container object and all its descendants.
NOTE
:
Depending on the number of deltas script objects, this method can negatively affect the runtime performance of your form.
Syntax
Reference_Syntax.getDeltas( )
Version
2.5
Parameters
None
Returns
A valid object representing a delta script object.
587
Applies to
Version
XFA 2.5
5.1.42. getDisplayItem
Retrieves the item display text for the specified item index.
Syntax
Reference_Syntax.getDisplayItem( INTEGER param )
Version
2.5
Parameters
param1
An integer representing the zero-based index into the item.
Returns
A valid string representing the text of the item or null if no display item exists.
Applies to
Scripting Methods
Model Object
Version
XFA 2.5
588
Scripting Methods 5
5.1.43. getElement
Returns a specified child object.
NOTE
:
This method returns only child objects that are not container objects, such as field or subform.
Syntax
Reference_Syntax.getElement( STRING param1 [, INTEGER param2 ] )
Parameters
param1
param2
(Optional)
A valid string representing the name of the object to retrieve.
An integer value representing the instance of the object to retrieve.
Returns
The specified object.
Applies to
Version
XFA 2.1
Examples
JavaScript
Subform1.getElement("border");
FormCalc
Subform1.getElement("border")
589
Scripting Methods
5.1.44. getFocus
Finds and returns the form object that currently has the input focus.
Syntax
Reference_Syntax.getFocus()
Parameters
None
Returns
The form object that currently has the input focus, or null if no form object has the input focus.
Applies to
Model
Object
Version
XFA 2.6
5.1.45. getInvalidObjects
Returns a list of nodes contained within this subform (inclusive) that have a failed validation test.
Generates a list of all the invalid container objects, such as afield, exclusion group, or subform, contained within descendants of that subform. If the subform that this script method is called on is itself invalid, that subform is included in the returned list. The list is only generated on demand by recursively traversing the subform. The returned list is in document order.
The getInvalidObjects method does not return the list of mandatory fields until after the submit has fired. If the list of mandatory fields is required, the
called first.
590
Scripting Methods
Syntax
Reference_Syntax.getInvalidObjects()
Parameters
None
Returns
A list of invalid container objects in the order they exist on the form.
Applies to
Model
Version
XFA 2.9
5.1.46. getItemState
Returns the selection state of the specified item.
Syntax
Reference_Syntax.getItemState( INTEGER param )
Version
2.5
Parameters
param
Object
A valid integer representing the zero-based index into the item.
591
5
Scripting Methods
Returns
True if the item was selected and false if it was not selected.
Applies to
Model
Version
XFA 2.5
5.1.47. getSaveItem
Retrieves the data value for the specified item index.
Syntax
Reference_Syntax.getSaveItem( INTEGER param )
Parameters
Object
param
A valid integer representing the zero-based index into the item.
Returns
A valid string representing the text of the data item or null if no data item exists.
Applies to
Model Object
592
Scripting Methods
Version
XFA 2.5
5.1.48. gotoRecord
Moves the current record of the data window to a particular record within the range of records in the data.
5
Syntax
Reference_Syntax.gotoRecord( INTEGER param )
Parameters
param
A valid integer value representing the specified record in the range of records.
Returns
Empty
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
xfa.dataWindow.gotoRecord(2);
Object
593
Scripting Methods
FormCalc
xfa.dataWindow.gotoRecord(2)
For an example of using the gotorecord method to browse data records, see the example
Browsing records stored in a data file available at www.adobe.com/go/dev_lc_scripting_samples.
5.1.49. gotoURL
Retrieves the specified URL. It is available only for client applications.
Syntax
Reference_Syntax.gotoURL( STRING param1 )
Parameters
param1
A valid string representing a fully qualified or a relative URL. It is possible to include a query string at the end of the URL.
If the form is being viewed inside a browser or Acroba®t Capture
®
is not available, the
Weblink plug-in retrieves the requested URL. If the form is running inside Acrobat, the URL of the current document is obtained either from the document’s base URL, from the URL of page 0 (if the document was Web Captured), or from the file system.
Returns
Empty
Applies to
Model
Object
Version
XFA 2.1
594
Scripting Methods
Examples
JavaScript
xfa.host.gotoURL("http://www.adobe.com");
FormCalc
xfa.host.gotoURL("http://www.adobe.com")
5.1.50. h
Determines the height of a given form design object.
Syntax
Reference_Syntax.h( OBJECT param1 [, STRING param2 [, INTEGER param3 ] ] )
Parameters
5
param1
param2
(Optional)
param3
(Optional)
The fully qualified reference syntax expression of one of the following container XML
Form Object Model objects: area, contentArea, draw, field, pageArea, subform.
A string representing the unit type of the return value. If left blank, the default unit type is points.
An integer representing a zero-based index value indicating the content area in which you want to obtain the object’s height. If left blank, the default value is
0.
This parameter allows you to calculate the height of an object that is distributed across multiple content areas, such as pages. For example, if you want to find the height of a subform object that spans multiple content areas, you would use this parameter to enumerate the height of the subform in each of the content areas and add the totals together.
Returns
The height of the form design object in the specified content area.
595
Scripting Methods
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
// Returns the height of a single instance of TextField1 xfa.layout.h(TextField1,"in");
// Calculates the height of Subform1 across two content areas and displays
// the total in a message box. var iHeight = xfa.layout.h(Subform1,"in",0) + xfa.layout.h(Subform1,"in",1); xfa.host.messageBox(iHeight);
FormCalc
// Returns the height of a single instance of TextField1 xfa.layout.h(TextField1,"in")
// Calculates the height of Subform1 across two content areas and displays
// the total in a message box. var iHeight = xfa.layout.h(Subform1,"in",0) + xfa.layout.h(Subform1,"in",1) xfa.host.messageBox(iHeight)
5.1.51. hasDataChanged
Determines whether the current record data has changed.
This method is a pre-commit test of the active record. It compares the current record data with the record data from the current data source. If the data has changed, then this method returns true.
NOTE
:
The data connection methods xfa.sourceSet.DataConnection.first, xfa.sourceSet.DataConnec-
tion.next, xfa.sourceSet.DataConnection.previous, and xfa.sourceSet.DataConnection.last perform an
implicit update if the data has changed.
596
Scripting Methods
Syntax
Reference_Syntax.hasDataChanged()
Parameters
None
Returns
True if the data has changed, and false if the data has not changed.
Applies to
5
Model Object
Version
XFA 2.1
5.1.52. importData
Imports data to the current form from a specified file.
For security reasons, if you provide the parameter, the importDatamethod executes only when performed on certified documents. If you do not provide the parameter, the document does not need to be certified and the user is prompted to provide a location and filename.
Syntax
Reference_Syntax.importData( [ STRING param ] )
597
Scripting Methods
Parameters
param
(Optio nal)
A valid string representing the location and name of the file from which the data will be imported. If you omit this parameter, a dialog box opens to let the user select the file manually.
This parameter is valid only on certified documents where the user has sufficient permissions.
Returns
Empty
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
xfa.host.importData("filename.xdp");
FormCalc
xfa.host.importData("filename.xdp")
5.1.53. insert
Inserts a node before a specific node in the node list.
Object
598
Scripting Methods
Syntax
Reference_Syntax.insert( OBJECT param1, OBJECT param2 )
Parameters
param1 param2
A valid reference syntax expression representing the node to be inserted.
A valid reference syntax expression representing the node to insert before.
Returns
Empty
Applies to
Version
XFA 2.1
Examples
JavaScript
xfa.datasets.connectionData.DataConnection.nodes.insert(oHeader,oFirst);
FormCalc
xfa.datasets.connectionData.DataConnection.nodes.insert(oHeader,oFirst)
5.1.54. insertInstance
Inserts a new instance of a subform or subform set into a form.
Syntax
Reference_Syntax.insertInstance( INTEGER param1 [, BOOLEAN param2 ] )
599
5
Scripting Methods
Parameters
param1 param2
(optional)
An integer specifying the zero-indexed position to insert the instance within a set of instances.
A Boolean value indicating if data must be merged with the new subform instance.
• true | 1(JavaScript) or1(FormCalc)
• Merges the new subform instance with the available data.
• false | 0(JavaScript) or0(FormCalc)
• The new subform instance is not merged with data.
Returns
An object representing the new instance of the subform or subform set.
Applies to
Object Model
Version
XFA 2.1
Examples
JavaScript
Subform1.instanceManager.insertInstance(3, 0);
FormCalc
Subform1.instanceManager.insertInstance(3, 0)
600
Scripting Methods 5
5.1.55. isBOF
Determines if the current location is at the beginning of the recordset. The bofAction property must
be set to stayBOF.
Syntax
Reference_Syntax.isBOF()
Parameters
None
Returns
True if the current location is at the beginning of the recordset. False if the current location is not at the beginning of the recordset.
Applies to
Object Model
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.nodes.item(nIndex).isBOF();
FormCalc
xfa.sourceSet.nodes.item(nIndex).isBOF()
601
Scripting Methods
5.1.56. isCompatibleNS
Determines if a specified namespace is functionally equivalent, that is compatible, with the namespace of this model. It determines if the two namespaces are equivalent, even though the strings that represent them is not identical.
Syntax
Reference_Syntax.isCompatibleNS( STRING param )
Parameters
param
A valid string representing the namespace to compare.
Returns
Trueif the namespaces are equivalent andFalseif they are not compatible.
Applies to
Version
XFA 2.1
5.1.57. isEOF
to stayEOF.
Syntax
Reference_Syntax.isEOF()
Parameters
None
602
Scripting Methods 5
Returns
True if the current location is at the end of the recordset. False if the current location is not at the end of the recordset.
Applies to
Model Object
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.nodes.item(nIndex).isEOF();
FormCalc
xfa.sourceSet.nodes.item(nIndex).isEOF()
5.1.58. isPropertySpecified
Checks if a specific property has been defined for this node.
Syntax
Reference_Syntax.isPropertySpecified( STRING param1 [, BOOLEAN param2 [, INTEGER
param3 ] ] )
Parameters
param1
A valid string representing the name of the object property to search on.
603
Scripting Methods
param2
(Optional)
param3
(Optional)
A Boolean value that indicates if inheritance from parent classes should be taken into consideration.
• true | 1(JavaScript) or1(FormCalc) (default)
• Determines if this property is inherited from a parent class.
• false | 0(JavaScript) or0(FormCalc)
• Determines if this property is defined for the current object, regardless of inheritance.
An integer value specifying which occurrence of the property to examine. This parameter is only valid for those properties that can have multiple instances.
Returns
True if the property is specified and false if it is not specified.
Applies to
Version
XFA 2.1
Examples
JavaScript
TextField1.isPropertySpecified("ui");
FormCalc
TextField1.isPropertySpecified("ui")
5.1.59. isRecordGroup
Indicates if a particular dataGroup object is also a single record.
604
Scripting Methods
Syntax
Reference_Syntax.isRecordGroup( OBJECT param )
Parameters
param
A valid dataGroup object from the current data source.
Returns
True if the specified data group is also a single record, and false if it is not.
Applies to
Model Object
Version
XFA 2.1
Examples
JavaScript
xfa.dataWindow.isRecordGroup(xfa.datasets.data.dataNodeName);
FormCalc
xfa.dataWindow.isRecordGroup(xfa.datasets.data.dataNodeName)
5.1.60. item
Describes a zero-based index into the collection.
605
5
Scripting Methods
Syntax
Reference_Syntax.item( INTEGER param )
Parameters
param
A zero-based index into the collection.
Returns
An object representing an XFA tree.
Applies to
Version
XFA 2.1
R
ELATED LINKS
:
5.1.61. last
Moves to the last record in the recordset, and populates the data model with the record data.
NOTE
:
The data connection method xfa.sourceSet.DataConnection.lastlooks up a table
and updates the table if the data has changed. It uses the hasDataChanged method to determine
whether the data has changed.
Syntax
Reference_Syntax.last()
606
Scripting Methods
Parameters
None
Returns
Empty
Applies to
5
Model Object
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.dataConnectionName.last();
FormCalc
xfa.sourceSet.dataConnectionName.last()
5.1.62. loadXML
Loads and appends a specified XML document to the current object.
Syntax
Reference_Syntax.loadXML( STRING param1 [, BOOLEAN param2 [, BOOLEAN param3 ] ] )
607
Scripting Methods
Parameters
Returns
Empty
Applies to
Version
XFA 2.1
param1
param2
(Optional)
param3
(Optional)
A valid string representing the XML document.
A Boolean value indicating if the root node within the XML document should be ignored.
• true | 1(JavaScript) or1(FormCalc) (default)
• Ignores the root node of the XML document, and appends the remaining XML nodes directly to the current XML Form Object
Model object.
• false | 0(JavaScript) or0(FormCalc)
• Appends the root node of the XML document directly to the current XML Form Object Model object.
A Boolean value indicating if the data from the XML document should overwrite the information for the current XML Form Object Model object.
• true | 1(JavaScript) or1(FormCalc)
• Replaces the content of the current XML Form Object Model object with the XML document data.
• false | 0(JavaScript) or0(FormCalc) (default)
• Appends the XML document data to the current XML Form
Object Model object.
608
Scripting Methods
Examples
5
JavaScript
xfa.datasets.data.loadXML(xmlData,0,1);
FormCalc
xfa.datasets.data.loadXML(xmlData,0,1)
5.1.63. messageBox
Displays a dialog box on the screen. It is available only for client applications.
Syntax
Reference_Syntax.messageBox( STRING param1 [, STRING param2 [, INTEGER param3 [,
INTEGER param4 ] ] ] )
Parameters
param1
A valid string representing the message to display.
param2
(Option al)
A valid string representing the title to appear in the title bar of the dialog window.
To help protect against Internet spoofing, the dialog window title begins with the text
“Warning: JavaScript Window -”. The window title that you specify in this parameter displays after the warning text.
param3
(Option al)
An integer representing the icon to display in the dialog box.
•
0(Error) - This is the default.
•
1(Warning)
•
2(Question)
•
3(Status)
param4
(Option al)
An integer representing the buttons to display.
•
0(OK) - This is the default.
•
1(OK, Cancel)
•
2(Yes, No)
•
3(Yes, No, Cancel)
609
Scripting Methods
While param2, param3, and param4 are optional, if you want to include a particular parameter, include all of the preceding parameters. For example, the following JavaScript is incorrect: xfa.host.messageBox("Hello World!",3,1);
In this case you must also specify a value for param2 for the JavaScript to execute correctly.
Returns
A valid integer representing the value of the button pressed by the user:
•
1 (OK)
•
2 (Cancel)
•
3 (No)
•
4 (Yes)
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.host.messageBox("This is a message", "This is a title", 3, 1);
FormCalc
xfa.host.messageBox("This is a message", "This is a title", 3, 1)
R
ELATED LINKS
:
Creating a node in the data model
Making an object visible or invisible
610
Scripting Methods
Using radio buttons and check boxes
Determining that a form has changed
5
5.1.64. metadata
Collects a comprehensive Extensible Metadata Platform (XMP) metadata packet for the document.
Any third-party metadata is collected and converted to XMP as follows:
• All elements are given the namespace http://ns.adobe.com/xfa/promoted-desc/, with the suggested prefix desc:.
• The value of the name object becomes the object name.
• A desc:ref property qualifier is added, whose value is an XPath expression pointing back to the parent of the original
appears in the output.
•
Content under the desc object is converted as follows:
Object XMP type
Boolean
Date
Date
Real external: URI embedded: Thumbnail
Real external: URI embedded: Thumbnail
Integer
Text
Date
When the XDP file is rendered as a PDF file, the collected metadata is written to the PDF file’s
XMP packet. Copies of the same metadata continue to exist in the XFA stream inside the PDF file.
611
Scripting Methods
Syntax
Reference_Syntax.metadata ( INTEGER param )
Parameters
param
(Optional) An integer representing the serialization format.
•
0(RDF) (default)
•
1(PlainXMP)
Returns
A valid string representing the XML serialization of the XMP metadata.
Applies to
Model Object
Version
XFA 2.5
5.1.65. moveCurrentRecord
Repositions the current record to another location within the range of records.
Syntax
Reference_Syntax.moveCurrentRecord( INTEGER param )
612
Scripting Methods
Parameters
param
A valid integer representing the number of records separating the current record and the desired destination record. A positive integer indicates a record between the current record and the end of the range of records, a negative value indicates a record between the current record and the beginning of the range.
5
Returns
Empty
Applies to
Model Object
Version
XFA 2.1
Examples
JavaScript
xfa.dataWindow.moveCurrentRecord(1);
FormCalc
xfa.dataWindow.moveCurrentRecord(1)
For an example of using the moveCurrentrecord method to browse data records, see the example Browsing records stored in a data file available at www.adobe.com/go/dev_lc_scripting_samples.
5.1.66. moveInstance
Moves a subform object within a set of subform instances.
613
Scripting Methods
The corresponding data model information for the subform is also relocated within the data model.
Syntax
Reference_Syntax.moveInstance( INTEGER param1, INTEGER param2 )
Parameters
param1 param2
A valid integer representing the 0 based index position of the form model object to move.
A valid integer representing the 0 based position of the child object within the set of instances.
Returns
Empty
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
Subform1.instanceManager.moveInstance(0,6);
FormCalc
Subform1.instanceManager.moveInstance(0,6)
R
ELATED LINKS
:
Object
614
Scripting Methods
Manipulating instances of a subform
5.1.67. namedItem
Gets the first child of this node with the given name.
Syntax
Reference_Syntax.namedItem( STRING param )
Parameters
5
param
A valid string representing the name of this node.
Returns
An object representing the first child of this node with the given name.
Applies to
Version
XFA 2.1
5.1.68. next
Moves to the next record in the recordset, and populates the data model with the record data.
NOTE
:
The data connection method xfa.sourceSet.DataConnection.next looks up a
table and updates the table if the data has changed. It uses the hasDataChanged method to determine
whether the data has changed.
Syntax
Reference_Syntax.next()
615
Scripting Methods
Parameters
None
Returns
Empty
Applies to
Model Object
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.dataConnectionName.next();
FormCalc
xfa.sourceSet.dataConnectionName.next()
5.1.69. open
Connects to the data source and populates the data model with the results of the current record.
Syntax
Reference_Syntax.open()
Parameters
None
616
Scripting Methods
Returns
Empty
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.nodes.item(nIndex).open();
FormCalc
xfa.sourceSet.nodes.item(nIndex).open()
5.1.70. openList
Opens the drop-down list specified by the reference syntax expression.
It is available only for client applications.
Syntax
Reference_Syntax.openList( OBJECT param )
Reference_Syntax.openList( STRING param ) (deprecated)
Parameters
Object
param
A fully qualified reference syntax expression that specifies a drop-down list.
617
5
Scripting Methods
Returns
Empty
Applies to
Model
Object
Version
XFA 2.6
XFA 2.1 (deprecated)
5.1.71. page
Determines the page number that contains a given form design object. If the object spans multiple pages, this method returns the first page the object occurs on.
Syntax
Reference_Syntax.page( OBJECT param )
Parameters
param
The fully qualified reference syntax expression of one of the following a container form design objects: field, draw, subform, area, pageArea, contentArea.
Returns
An integer representing the logical page number (based on the initial page number) that contains the specified form object. This method returns
0 if the object specified in param cannot be found on the form.
618
Scripting Methods
Applies to
5
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.layout.page(this);
FormCalc
xfa.layout.page($)
R
ELATED LINKS
:
Working with page numbers and page counts
5.1.72. pageContent
Retrieves types of form design objects from a specified page of a form.
Syntax
Reference_Syntax.pageContent( INTEGER param1 [, STRING param2 [, BOOLEAN param3
] ] )
Parameters
param1
An integer representing the desired page number. This value is 0-based.
619
Scripting Methods
param2
(Optional)
param3
(Optional)
Return the following types of containers:
• field
• Returns all of the following form design objects: Button, Check
Box, Date/Time Field, Drop-down List, Signature Field, Image
Field, List Box, Numeric Field, Password Field, Radio Button, and Text Field.
• draw
• Returns all of the following form design objects: Circle, Line,
Rectangle, Static Image, and Static Text.
• subform
• Returns all subform form design objects.
• area
• Returns all area form design objects.
• pageArea
• Returns all pageArea form design objects.
• contentArea
• Returns all contentArea form design objects.
• empty(default)
• Returns all containers.
• true | 1(JavaScript) or1(FormCalc) (default)
• Returns only pageArea content nodes.
• false | 0(JavaScript) or0(FormCalc)
• Returns all non-pageArea content nodes.
Returns
A collection of form design objects from the specified page number.
620
Scripting Methods
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
// Get the fields in a document var oFields = xfa.layout.pageContent(i, "field");
FormCalc
// Get the fields in a document var oFields = xfa.layout.pageContent(i, "field")
R
ELATED LINKS
:
5.1.73. pageCount
Determines the number of pages of the current form.
Syntax
Reference_Syntax.pageCount()
Parameters
None
621
5
Scripting Methods
Returns
An integer representing the total number of pages of the form.
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.layout.pageCount();
FormCalc
xfa.layout.pageCount()
R
ELATED LINKS
:
Working with page numbers and page counts
5.1.74. pageDown
Moves to the next page of a form. Use the pageDown method at runtime.
Syntax
Reference_Syntax.pageDown()
Parameters
None
622
Scripting Methods
Returns
Empty
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.host.pageDown();
FormCalc
xfa.host.pageDown()
R
ELATED LINKS
:
Working with page numbers and page counts
5.1.75. pageSpan
Determines the number of logical pages a given form design object spans.
Syntax
Reference_Syntax.pageSpan( OBJECT param )
5
623
Scripting Methods
Parameters
param
The fully qualified reference syntax expression of one of the following a container form design objects:
•
•
•
•
•
•
Returns
An integer representing the number of logical pages a form object spans. For example, consider an
8-page form with a form object that exists only on pages 2, 4, 5, and 6. In this case, using the pageSpan method on the form object returns a value of 5, which is the number of pages of the form the object spans.
Applies to
Object Model
Version
XFA 2.1
Examples
JavaScript
xfa.layout.pageSpan(this);
624
Scripting Methods
FormCalc
xfa.layout.pageSpan($)
5.1.76. pageUp
Moves to the previous page of a form. Use the pageUp method at runtime.
Syntax
Reference_Syntax.pageUp()
Parameters
None
Returns
Empty
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.host.pageUp();
FormCalc
xfa.host.pageUp()
625
5
Scripting Methods
R
ELATED LINKS
:
Working with page numbers and page counts
5.1.77. previous
Moves to the previous record in the recordset, and populates the data model with the record data.
NOTE
:
The data connection method xfa.sourceSet.DataConnection.previouslooks up
whether the data has changed.
Syntax
Reference_Syntax.previous()
Parameters
None
Returns
Empty
Applies to
Object Model
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.dataConnectionName.previous();
626
Scripting Methods
FormCalc
xfa.sourceSet.dataConnectionName.previous()
5.1.78. print
Prints a specific number of pages from a document. It is available only for client applications.
5
Syntax
Reference_Syntax.print( BOOLEAN param1, INTEGER param2, INTEGER param3, BOOLEAN
param4, BOOLEAN param5, BOOLEAN param6, BOOLEAN param7, BOOLEAN param8 )
Parameters
param1 param2 param3 param4
• true | 1(JavaScript) or 1(FormCalc) (default)
• Displays a print dialog box and prompts the user for printing setup information and confirmation of the action.
• false | 0(JavaScript) or0(FormCalc)
• Does not display a print dialog box. Printing proceeds without prompting the user for information or confirmation.
A valid string representing the page number of the beginning of the range to print. Page values are 0-based, so you represent page 1 with a value of
0.
The start page is included in the printing.
A valid string representing the page number of the end of the range to print. Page values are 0-based, so you represent page 1 with a value of
0.
The end page is included in the printing.
• true | 1(JavaScript) or1(FormCalc) (default)
• Does not display a cancel dialog box during the printing process.
• false | 0(JavaScript) or0(FormCalc)
• Displays a cancel dialog box to stop the printing process.
627
Scripting Methods
param5 param6 param7 param8
• true | 1(JavaScript) or1(FormCalc) (default)
• Shrinks the page (if necessary) to fit within the imageable area of the printed page.
• false | 0(JavaScript) or0(FormCalc)
• Does not shrink the page to fit within the imageable area of the printed page.
• true | 1(JavaScript) or1(FormCalc) (default)
• Prints each page as an image.
• false | 0(JavaScript) or0(FormCalc)
• Prints each page as a page of text.
• true | 1(JavaScript) or1(FormCalc) (default)
• Prints the pages in reverse order.
• false | 0(JavaScript) or0(FormCalc)
• Prints the pages in order.
• true | 1(JavaScript) or1(FormCalc) (default)
• Prints all annotations.
• false | 0(JavaScript) or0(FormCalc)
• Does not print annotations.
Returns
Empty
Applies to
Version
XFA 2.1
Model
Object
628
Scripting Methods
Examples
5
JavaScript
xfa.host.print(1, "0", "0", 0, 1, 0, 0, 0);
FormCalc
xfa.host.print(1, "0", "0", 0, 1, 0, 0, 0)
5.1.79. recalculate
Forces a specific set of scripts located on calculate events to execute. The specific events can be either pending calculate events or all calculate events.
Syntax
Reference_Syntax.recalculate( BOOLEAN param )
Parameters
param
A Boolean value indicating which calculation scripts should execute.
• true | 1(JavaScript) or1(FormCalc) (default)
• All calculation scripts are re-executed.
• false | 0(JavaScript) or0(FormCalc)
• Only pending calculation scripts should execute.
Returns
Empty
629
Scripting Methods
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
xfa.form.recalculate(1);
FormCalc
xfa.form.recalculate(1)
5.1.80. record
Returns a record in a position relative to the current record.
Syntax
Reference_Syntax.record( INTEGER param )
Parameters
Object
para m
A valid integer representing the number of records separating the current record and the desired destination record. A positive integer indicates a record between the current record and the end of the range of records, a negative value indicates a record between the current record and the beginning of the range.
630
Scripting Methods
Returns
Object
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
xfa.dataWindow.record(0).dataNodeName.value;
FormCalc
xfa.dataWindow.record(0).dataNodeName.value
R
ELATED LINKS
:
Creating a node in the data model
5.1.81. relayout
Reapplies the layout options to the current form.
Syntax
Reference_Syntax.relayout()
Parameters
None
631
Object
5
Scripting Methods
Returns
Empty
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.layout.relayout();
FormCalc
xfa.layout.relayout()
5.1.82. relayoutPageArea
Replaces the layout of the pageArea object content with a new layout.
Syntax
Reference_Syntax.relayoutPageArea( [ INTEGER param ] )
Parameters
param(Optio nal)
The page number of the page to substitute. Page number values are 0 based.
632
Scripting Methods
Returns
Empty
Applies to
5
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.layout.relayoutPageArea(0);
FormCalc
xfa.layout.relayoutPageArea(0)
5.1.83. remerge
Forces the remerging of the data model and template model to re-create the form model. After the remerge is complete, any layout model processing must be redone if necessary for the completed form.
Syntax
Reference_Syntax.remerge()
Parameters
None
633
Scripting Methods
Returns
Empty
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
xfa.form.remerge();
FormCalc
xfa.form.remerge()
5.1.84. remove
Removes a node from the node list.
Syntax
Reference_Syntax.remove( OBJECT param )
Parameters
Object
param
A valid reference syntax expression representing the node to be removed.
634
Scripting Methods
Returns
Empty
Applies to
Version
XFA 2.1
Examples
5
JavaScript
xfa.record.nodes.remove(oNode);
FormCalc
xfa.record.nodes.remove(oNode)
R
ELATED LINKS
:
Creating a node in the data model
5.1.85. removeAttribute
Removes an XML attribute from a custom third-party XML packet that is added to the XML source of a form design.
Syntax
Reference_Syntax.removeAttribute( STRING param )
Parameters
param
A valid string representing the name of the property to remove.
635
Scripting Methods
Returns
Empty
Applies to
Model Object
Version
XFA 2.1
Examples
Using a custom XML packet named myCustomPacket with an attribute named id, you could remove the attribute using the following scripts:
JavaScript
xfa.myCustomPacket.removeAttribute("id");
FormCalc
xfa.myCustomPacket.removeAttribute("id")
5.1.86. removeInstance
Removes a specified subform or subform set from the form model.
When removing a subform instance, avoid subform occurrence violations. You cannot remove a subform instance if it has reached the minimum number of instances. When a subform reaches the minimum number of instances, the JavaScript debugger displays an error message:
The element [min] has violated its allowable number of occurrences.
If the end user is allowed to remove every instance of a subform, reset the minimum number of instances to
0before attempting to remove an instance. Otherwise, the script should prevent any attempt to remove subform instances beyond the minimum number.
636
Scripting Methods
Syntax
Reference_Syntax.removeInstance( INTEGER param )
Parameters
param
A valid integer representing the 0 based index position within the form model of the subform or subform set to remove.
5
Returns
Empty
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
Subform2.instanceManager.removeInstance(3);
FormCalc
Subform2.instanceManager.removeInstance(3)
R
ELATED LINKS
:
Manipulating instances of a subform
Object
637
Scripting Methods
5.1.87. requery
Updates the current data binding by re-executing the query on which the object data is based. Calling
this method is equivalent to calling the close and open methods in succession.
Syntax
Reference_Syntax.requery()
Parameters
None
Returns
Empty
Applies to
Object Model
Version
XFA 2.1
5.1.88. reset
Resets all of the properties within the XML form event model.
Syntax
Reference_Syntax.reset()
Parameters
None
638
Scripting Methods
Returns
Empty
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
xfa.event.reset();
FormCalc
xfa.event.reset()
5.1.89. resetData
Resets the fields to their default values within a document.
Syntax
Reference_Syntax.resetData([ STRING param ])
Parameters
Object
param
(Optional)
A valid string listing either the names or the equivalent reference syntax expressions of the fields to reset. The list entries are delimited by the “,” (comma) character. If the string is not present or empty, all the fields in the form are reset to their default value.
5
639
Scripting Methods
Returns
Empty
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.host.resetData("xfa.form.form1.TextField1,xfa.form.form1.TextField2");
FormCalc
xfa.host.resetData("xfa.form.form1.TextField1,xfa.form.form1.TextField2")
5.1.90. resolveNode
Evaluates the specified reference syntax expression, beginning with the current XML form object model object, and returns the value of the object specified in the reference syntax expression.
The search for an object starts at a different point in the form hierarchy, depending on how the resolveNode property was accessed:
• this.resolveNode() The search starts from the current object and moves up the form hierarchy.
• xfa.resolveNode() The search starts at the top of the form hierarchy and moves down.
NOTE
:
The search could return unexpected results if the form contains several objects that use the same name. It returns the value of the first object that it finds.
640
Scripting Methods
Syntax
Reference_Syntax.resolveNode( STRING param )
Parameters
5
param
A valid string representing a reference syntax expression that evaluates to a specific XML form object model object.
Returns
A single object corresponding to the reference syntax expression, if it exists. If no such object exists, this method returns null.
Applies to
Version
XFA 2.1
Examples
JavaScript
xfa.resolveNode("#subform").x = "2in";
TextField1.resolveNode("ui.#textEdit").border.edge.stroke = "lowered";
R
ELATED LINKS
:
Creating a node in the data model
Manipulating instances of a subform
641
Scripting Methods
5.1.91. resolveNodes
Evaluates the specified reference syntax expression, beginning with the current XML form object model object, and returns the value of the object or objects specified in the reference syntax expression.
The search for an object starts at a different point in the form hierarchy, depending on how the resolveNode property was accessed:
• this.resolveNodes() The search starts from the current object and moves up the form hierarchy.
• xfa.resolveNodes() The search starts at the top of the form hierarchy and moves down.
NOTE
:
The search could return unexpected results if the form contains several objects that use the same name. It returns the value of the first object that it finds.
Syntax
Reference_Syntax.resolveNodes( STRING param )
Parameters
param
A valid string representing a reference syntax expression that evaluates to one or many
XML form object model objects.
Returns
A single object corresponding to the reference syntax expression, if it exists. If no such object exists, this method returns empty.
Applies to
Version
XFA 2.1
642
Scripting Methods
Examples
5
JavaScript
xfa.resolveNodes("Subform1[*]");
FormCalc
xfa.resolveNodes("Subform1[*]")
R
ELATED LINKS
:
Using radio buttons and check boxes
5.1.92. response
Displays a dialog box containing a question and an entry field for the user to reply to the question.
The return value is a string containing the user's response. If the user presses the cancel button on the dialog box, the response is null.
Syntax
Reference_Syntax.response(STRING param1 [, STRING param2 [, STRING param3 [,
BOOLEAN param4 ] ] ])
Parameters
param1
param2
(Optional)
param3
(Optional)
param4
(Optional)
A valid string representing a question for the user.
A valid string representing the title that appears in the title bar of the dialog box.
A valid string representing the default value for the answer to the question.
• true | 1(JavaScript) or1(FormCalc) (default)
• Masks the user’s answer with * (asterisks).
• false | 0(JavaScript) or0(FormCalc)
• Does not mask the user’s answer.
643
Scripting Methods
Returns
A string representing the user’s answer. If the user presses the cancel button on the dialog box, the answer is the null object.
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
xfa.host.response("Question", "Title", "Default Value");
FormCalc
xfa.host.response("Question", "Title", "Default Value")
5.1.93. restore
Updates the property’s current value with the saved value.
The script performs any required validations before calling the restore property.
Syntax
Reference_Syntax.restore()
Parameters
None
644
Scripting Methods
Returns
Null
Applies to
Model
Version
XFA 2.5
5.1.94. resync
Refreshes the current recordset or data connection.
Syntax
Reference_Syntax.resync()
Parameters
None
Returns
Empty
Applies to
Model
Object
Object
645
5
Version
XFA 2.1
5.1.95. saveFilteredXML
Saves the current node to a string, but includes only a subset of the child nodes.
Scripting Methods
Syntax
Reference_Syntax.saveFilteredXML( OBJECT param1 [, "pretty" ] )
Parameters
param1
pretty
(Optional)
A node list that includes the subset of nodes to include in the string.
Outputs the XML string is an easier to read format.
Returns
A valid string representing the XML fragment that includes only the specified subset of the current node.
Applies to
Version
XFA 2.4
5.1.96. saveXML
Saves the XML structure of the current nodeclass to a string.
Syntax
Reference_Syntax.saveXML( [ "pretty" ] )
646
Scripting Methods
Parameters
pretty
(Optional)
Outputs the XML string in an easier to read format.
Returns
A valid string representing the XML fragment of the current object.
Applies to
Version
XFA 2.1
Examples
JavaScript
xfa.data.saveXML(); xfa.data.saveXML("pretty");
FormCalc
xfa.data.saveXML() xfa.data.saveXML("pretty")
R
ELATED LINKS
:
Determining that a form has changed
5.1.97. selectedMember
Returns the selected member of an exclusion group.
Syntax
Reference_Syntax.selectedMember( [ STRING param ] )
647
5
Scripting Methods
Parameters
param(O ptional)
A valid string representing the name of the exclusion group member, provided the exclusion group member is within the same scope as the referencing object. Otherwise, a valid string representing the reference syntax expression of the exclusion group member to select.
Returns
The object representing the selected member of the exclusion group. In Designer, for example, this method would return the selected radio button.
Applies to
Model Object
Version
XFA 2.1
5.1.98. setAttribute
Sets the value of a specified property.
Syntax
Reference_Syntax.setAttribute( STRING param1, STRING param2 )
Parameters
param1 param2
A valid string representing the new value of the property.
A valid string representing the name of the property.
648
Scripting Methods
Returns
Empty
Applies to
Model
Also applies to the nodeclass class.
Version
XFA 2.1
Examples
Object
JavaScript
Subform1.border.setAttribute("open", "break");
5.1.99. setElement
Sets a specified object to be the current object.
Syntax
Reference_Syntax.setElement( OBJECT param1 [, STRING param2 ] )
Parameters
param1
param2
(Optional)
An object representing the new object.
A valid string representing the name of the object to replace.
649
5
Scripting Methods
Returns
Empty
Applies to
Version
XFA 2.1
5.1.100. setFocus
Sets the keyboard focus to the form object specified by the reference syntax expression.
It is available only for client applications.
When the param1 argument is omitted or null, setFocus performs a clear focus operation. If any form object has the input focus, the focus is removed from that object and any pending edits in that object are committed, dirtying the document if appropriate. If committing the changes causes a validation error, that error is displayed. If no form object has the input focus, the zero-argument setFocus does nothing.
You cannot use setFocus with the form:ready, layout:ready, or initialize events.
Syntax
Reference_Syntax.setFocus( OBJECT param )
Reference_Syntax.setFocus( STRING param ) (deprecated)
Parameters
param
(Optional) A valid string representing a fully qualified reference syntax expression for the form object.
Returns
Empty
650
Scripting Methods
Applies to
Model
Object
Version
XFA 2.6
XFA 2. 1 (deprecated)
Examples
JavaScript
xfa.host.setFocus(xfa.form.form1.TextField1);
FormCalc
xfa.host.setFocus(“xfa.form.form1.TextField1”)
5.1.101. setInstances
Adds or removes specified subforms or subform sets from the form model.
Syntax
Reference_Syntax.setInstance( INTEGER param )
Parameters
param
A valid integer representing the desired number of instances of a particular subform or subform set in the form model.
5
Returns
Empty
651
Scripting Methods
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
Subform1.instanceManager.setInstances(5);
FormCalc
Subform1.instanceManager.setInstances(5)
R
ELATED LINKS
:
Manipulating instances of a subform
5.1.102. setItems
Adds new items and values to the current form field. For example, this method adds new items and values as arguments to a drop-down list.
Syntax
Reference_Syntax.setItems( STRING param1 [, INTEGER param2] )
Version
2.8
652
Scripting Methods
Parameters
param1 param2
A list of items and values separated by a comma. For example, “One,Two,Three” or
“One,1,Two,2,Three,3”. For items without values, leave the value blank. For example,
“item1,value1,item2,item3”.
The number of columns per item. For example, the itemValueList string,
"One,1,Two,2,Three,3" has numColumns=2. An itemValueList
"One,Uno,1,Two,Due,2,Three,Tre,3" has numColumns=3 while an itemValueList
"One,Two,Three" has numColumns=1. The value of 1 is the default.
Returns
True if the list was created successfully, False if the number of items do not match number of columns.
Applies to
5
Model
Version
XFA 2.8
5.1.103. setItemState
Sets the selection state of the specified item.
Syntax
Reference_Syntax.setItemState( INTEGER param1, BOOL param2 )
Version
2.8
Object
653
Scripting Methods
Parameters
param1 param2
A valid integer representing the zero-based index into the item.
• true | 1(JavaScript) or1(FormCalc)
• Adds this item to the current selection.
• false | 0(JavaScript) or0(FormCalc)
• Removes this item from the current selection.
Returns
None
Applies to
Model Object
Version
XFA 2.5
5.1.104. sheet
Determines the sheet number that contains the form object.
Some duplex documents use sheet numbers to number only the front surfaces. For example, you can use sheet numbers when the front surfaces contain variable data and the back surfaces contain boilerplate text, such as instructions, disclaimers, or legends.
Syntax
Reference_Syntax.sheet( OBJECT param )
Version
2.5
654
Scripting Methods
Parameters
param
The fully qualified reference syntax expression of one of the following form objects: field, draw, subform, area, pageArea, contentArea.
Returns
A zero-based integer representing the sheet number.
Applies to
5
Model
Version
XFA 2.5
5.1.105. sheetCount
Determines the number of sheets in the current form.
Syntax
Reference_Syntax.sheetCount( )
Version
2.5
Parameters
None
Returns
An integer representing the total number of sheets.
655
Object
Scripting Methods
Applies to
Model
Object
Version
XFA 2.5
5.1.106. sheetCountInBatch
Determines the sheet count of the current batch.
Syntax
Reference_Syntax.sheetCountInBatch( )
Version
2.5
Parameters
None
Returns
An integer representing the sheet count of the current batch.
Applies to
Model
Object
656
Scripting Methods
Version
XFA 2.5
5.1.107. sheetInBatch
Determines which sheet within the batch contains the form object.
Syntax
Reference_Syntax.sheetInBatch( OBJECT param )
Version
2.5
Parameters
param
The fully qualified reference syntax expression of one of the following form objects: field, draw, subform, area, pageArea, contentArea.
Returns
An integer representing the sheet number that contains the form object.
Applies to
5
Model
Object
Version
XFA 2.5
657
Scripting Methods
5.1.108. sign
Signs a given node list and places the signature in the target location.
Syntax
Reference_Syntax.sign( OBJECT param1, STRING param2, STRING param3 [, STRING
param4 [, BOOLEAN param5 [, OBJECT param6 [, OBJECT param7 ] ] ] ] )
Parameters
param1 param2
input input
param3
input
param4
(Optional
) input
(Option al)
A valid string representing an XML identification value for the signature.
The only valid value is open(default) indicating that data nodes are open for edit and can be manipulated at runtime.
param5
(Optional
) input
(Option al)
A valid XFA node list of all the nodes to be signed.
A valid string representing a reference syntax expression to the parent of the signature node.
Represents whether to use a dialog to allow a user to sign the form.
• true | 1(JavaScript) or1(FormCalc) (default)
• Indicates that a dialog is used for this operation.
• false | 0(JavaScript) or0(FormCalc)
• Indicates that a dialog is not used for this operation. If you specify this value you must provide an alternative security handler in param6 so that the application hosting the form can retrieve the correct password and credentials to use when signing the form.
param6
(Optional
) input
(Option al)
param7
(Optional
) output
(Option al)
Represents the SecurityHandler object that is used to sign. Security objects normally require initialization before they can be used for signing. You must provide a value for this parameter if you set param5 to
False.
Represents an output SignatureInfo object containing the writable properties of the signature.
658
Scripting Methods
Returns
Trueif the signature was applied successfully andFalseif the signing option was canceled. An exception is returned if the signing operation fails.
5
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
//This example signs all of the form objects that currently contain data. var oData = xfa.resolveNode("xfa.data.form1"); xfa.signature.sign(oData, "xfa.data.signatures", "mySignature");
FormCalc
//This example signs all of the form objects that currently contain data. var oData = xfa.resolveNode("xfa.data.form1") xfa.signature.sign(oData, "xfa.data.signatures", "mySignature")
5.1.109. update
Updates the current record in the record set.
Syntax
Reference_Syntax.update()
Parameters
None
659
Scripting Methods
Returns
Empty
Applies to
Model
Version
XFA 2.1
Examples
JavaScript
xfa.sourceSet.dataConnectionName.update();
FormCalc
xfa.sourceSet.dataConnectionName.update()
5.1.110. updateBatch
Writes all pending batch updates to the data source.
Syntax
Reference_Syntax.updateBatch()
Parameters
None
Returns
Empty
Object
660
Scripting Methods
Applies to
Model Object
Version
XFA 2.1
5.1.111. verify
Checks the validity of a signature.
Syntax
Reference_Syntax.verify( OBJECT param1 [, BOOLEAN param2 [, OBJECT param3 [,
OBJECT param4 ] ] ] )
Parameters
param1
param2
(Optional
) input input
(Optiona l)
A valid XML signature node.
• true | 1(JavaScript) or1(FormCalc) (default)
• Indicates that a dialog box is used for this operation.
• false | 0(JavaScript) or0(FormCalc)
• Indicates that a dialog box is not used for this operation.
param3(
Optional) input
(Optiona l)
The SecurityHandler object that is used to sign. Security objects normally require initialization before they can be used for signing.
param4
(Optional
) output
(Optiona l)
An output SignatureInfo object containing the writable properties of the signature.
5
661
Scripting Methods
Returns
An integer representing the validity of the signature or an exception if the node is not a signature node. The following table describes the validity values:
2
3
4
Value
0
1
Description
Signature is blank.
Unknown status. In this case, no attempt to validate the signature was made. One possible cause is a software or hardware issue that is preventing the validation from occurring.
Signature is invalid.
Signature is valid, but the identity of the signer could not be verified.
Signature is valid and the identity of the signer is valid.
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
//This example examines the validity of all signed objects on a form. For
//each signed object, the integer return value of the verify() method
// displays in a message box. var oSigs = xfa.signature.enumerate(); var iNum = oSigs.length; for (var i=0; i < iNum; i++)
{ var oChild = oSigs.item(i); var iVerify = xfa.signature.signer(child); xfa.host.messageBox(iVerify);
}
662
Scripting Methods
FormCalc
//This example examines the validity of all signed objects on a form. For
//each signed object, the integer return value of the verify() method
// displays in a message box. var oSigs = xfa.signature.enumerate() var iNum = oSigs.length - 1 for i=0 upto iNum step 1 do var oChild = oSigs.item(i) var iVerify = xfa.signature.signer(child) xfa.host.messageBox(iVerify) endfor
5
5.1.112. w
Determines the width of a given form design object.
Syntax
Reference_Syntax.w( OBJECT param1 [, STRING param2 [, INTEGER param3 ] ] )
Parameters
param1
param2
(Optional)
param3
(Optional)
The fully qualified reference syntax expression of one of the following container XML
Form Object Model objects: area, contentArea, draw, field, pageArea, subform.
A string representing the unit type of the return value. If left blank, the default unit type is points.
An integer representing a zero-based index value indicating the content area in which you want to obtain the object’s width. If left blank, the default value is
0.
This parameter allows you to calculate the width of an object that is distributed across multiple content areas, such as pages. For example, if you want to find the width of a subform object that spans multiple content areas, you would use this parameter to enumerate the width of the subform in each of the content areas and add the totals together.
Returns
The width of the form design object in the current content area.
663
Scripting Methods
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
// Returns the width of a single instance of TextField1 xfa.layout.w(TextField1,"in");
// Calculates the width of Subform1 across two content areas and displays
// the total in a message box. var iWidth = xfa.layout.w(Subform1,"in",0) + xfa.layout.w(Subform1,"in",1); xfa.host.messageBox(iWidth);
FormCalc
// Returns the width of a single instance of TextField1 xfa.layout.w(TextField1,"in")
// Calculates the width of Subform1 across two content areas and displays
// the total in a message box. var iWidth = xfa.layout.w(Subform1,"in",0) + xfa.layout.w(Subform1,"in",1) xfa.host.messageBox(iWidth)
5.1.113. x
Determines the x coordinate of a given form design object relative to its parent object.
Syntax
Reference_Syntax.x( OBJECT param1 [, STRING param2 [, INTEGER param3 ] ] )
664
Scripting Methods
Parameters
param1
param2
(Optional)
param3
(Optional)
The fully qualified reference syntax expression of one of the following container XML
Form Object Model objects: area, contentArea, draw, field, pageArea, subform.
A string representing the unit type of the return value. If left blank, the default unit type is points.
An integer representing a zero-based index value indicating the content area in which you want to obtain the object’s x coordinate. If left blank, the default value is
0.
This parameter allows you to calculate the x coordinate of an object that is distributed across multiple content areas, such as pages. For example, if you want to find the absolute x positioning of a subform object that spans multiple content areas, you would use this parameter to enumerate the x coordinate of the subform in each of the content areas and add the totals together.
If the object for which you want to calculate an x coordinate is nested within several layers of parent objects, you must factor in the x coordinate of each parent object when computing the actual x coordinate of the object.
Returns
The x coordinate of the form design object relative to its parent object.
Applies to
5
Model
Object
Version
XFA 2.1
Examples
JavaScript
// Returns the x coordinate of a single instance of TextField1, relative to
// its parent object. xfa.layout.x(TextField1,"in");
// Calculates the x coordinate of Subform1 across two content areas and
665
Scripting Methods
// displays the total in a message box. var iX = xfa.layout.x(Subform1,"in",0) + xfa.layout.x(Subform1,"in",1); xfa.host.messageBox(iX);
FormCalc
// Returns the x coordinate of a single instance of TextField1, relative to
// its parent object. xfa.layout.x(TextField1,"in")
// Calculates the x coordinate of Subform1 across two content areas and
// displays the total in a message box. var iX = xfa.layout.x(Subform1,"in",0) + xfa.layout.x(Subform1,"in",1) xfa.host.messageBox(iX)
5.1.114. y
Determines the y coordinate of a given form design object relative to its parent object.
Syntax
Reference_Syntax.y( OBJECT param1 [, STRING param2 [, INTEGER param3 ] ] )
Parameters
param1
param2
(Optional)
param3
(Optional)
The fully qualified reference syntax expression of one of the following container XML
Form Object Model objects: area, contentArea, draw, field, pageArea, subform.
A string representing the unit type of the return value. If left blank, the default unit type is points.
An integer representing a zero-based index value indicating the content area in which you want to obtain the object’s y coordinate. If left blank, the default value is
0.
This parameter allows you to calculate the y coordinate of an object that is distributed across multiple content areas, such as pages. For example, if you want to find the absolute y positioning of a subform object that spans multiple content areas, you would use this parameter to enumerate the y coordinate of the subform in each of the content areas and add the totals together.
If the object for which you want to calculate a y coordinate is nested within several layers of parent objects, you must factor in the y coordinate of each parent object when computing the actual y coordinate of the object.
Returns
The y coordinate of the form design object as a double.
666
Scripting Methods
Applies to
Model
Object
Version
XFA 2.1
Examples
JavaScript
// Returns the y coordinate of a single instance of TextField1, relative to
// its parent object. xfa.layout.y(TextField1,"in");
// Calculates the y coordinate of Subform1 across two content areas and
// displays the total in a message box. var iY = xfa.layout.y(Subform1,"in",0) + xfa.layout.y(Subform1,"in",1); xfa.host.messageBox(iY);
FormCalc
// Returns the y coordinate of a single instance of TextField1, relative to
// its parent object. xfa.layout.y(TextField1,"in")
// Calculates the y coordinate of Subform1 across two content areas and
// displays the total in a message box. var iY = xfa.layout.y(Subform1,"in",0) + xfa.layout.y(Subform1,"in",1) xfa.host.messageBox(iY)
5
5.2.
Scripting methods for Designer Macros
5.2.1.
alert
Shows a message box in Designer with sMsg as the text.
667
Scripting Methods
Syntax
designer.alert( STRING param )
Parameters
param
A valid string representing the message to display in the message box.
Returns
Empty.
5.2.2.
callExternalFunction
Provides a method for a macros script to call out to native code. Typically, used for bringing up a custom graphical user interface developed in a technology other than Flash.
When the script calls callExternalFunction, the specified DLL filename is loaded from the folder containing the currently executing script file. The DLL extension is added automatically to the specified filename. The DLL filename cannot include path elements and must include a filename without an extension such as myMacroExtension.
GetProcAddress is used to find the function identified by the sFunctionName parameter.
Sample call: designer.callExternalFunction("DesignerExtension", "ShowMyDialog", "user data here");
This call loads a DLL called DesignerExtension.dll from the same directory in which the macro is installed, looks up a function called ShowMyDialog, and passes the "user data here" string as a wide character string (const wchar_t *).
The function can return a string, which is returned from the designer.callExternalFunction call. The string is returned as an HGLOBAL containing a wide character string.
The following example of a function in a DLL, shows the passed-in string in a dialog, and returns
"yes" or "no" based on which option the user clicks. The C function must have the function prototype like this example.
extern "C" __declspec(dllexport) HGLOBAL _cdecl ShowMyDialog(HWND hwndParent, const wchar_t *pszArgument)
{
int nResult = ::MessageBox(hwndParent, pszArgument, L"DLL Function Sample",
MB_YESNO);
// Allocate some memory for the result string
HGLOBAL hMem = GlobalAlloc(0, 64);
668
Scripting Methods
if (!hMem)
return 0; wchar_t *pMem = (wchar_t *)GlobalLock(hMem);
wcscpy_s(pMem, 30, nResult == IDYES ? L"yes" : L"no");
::GlobalUnlock(hMem);
return hMem;
}
Syntax
designer.callExternalFunction ( STRING param1, STRING param2, STRING param3)
Parameters
5
param1 param2
param3
A string representing the DLL name. Specify the root filename of the DLL without the filename extension.
A string representing the function name.
The string parameter that is passed to the function.
Returns
String.
5.2.3.
getDialogString
Retrieves data from the Flex dialog box started by designer.showFlexDialog(). The Flex dialog box can send data to Designer by calling an external interface:
ExternalInterface.call("setDialogString", "SomeVariableName", "VariableValue");
If the Flex dialog box makes this external call to Designer, after the dialog box is closed. "SomeVariableName" is available for inspection in the macro script through a call to designer.getDialog-
String(). In this particular example, the call would be designer.getDialogString("SomeVariableName") and the return value would be "VariableValue".
Syntax
designer.getDialogString ( STRING param )
669
Scripting Methods
Parameters
param
A valid string representing the name of the field to inspect. This field is only available for inspection if the form application built with Flex made the appropriate
ExternalInterface call.
Returns
A valid string representing the value of sFieldName. Empty if the application built by Flex did not set that value.
5.2.4.
getLocale
Returns the current locale in Designer.
Syntax
designer.getLocal ()
Parameters
None.
Returns
A string representing the current locale in Designer in a format like en_US.
5.2.5.
getSelection
Returns the object or objects that are currently selected in the Layout Editor or in the Hierarchy palette. If no objects are selected, an empty list is returned.
Syntax
designer.getSelection ()
Parameters
None.
670
Scripting Methods 5
Returns
Returns an XFANodeList containing the nodes that make up the current selection. Returns an empty list if there is no selection.
5.2.6.
filterNodeTree
Filters a node tree by the specified filter type and filter parameter.
Syntax
designer.filterNodeTree (OBJECT param1, STRING param2, STRING param3)
Parameters
param1
param2
param3
The reference syntax expression representing the XFANodeTree.
A string representing the filter type.
A string representing the filter parameter.
Filters
className
name
Class name of the object you want.
Name of the object you want.
Returns
Returns a list of nodes that match.
5.2.7.
println
Outputs sMsg to the Log tab in the Report palette.
Syntax
designer.println( STRING param )
671
Scripting Methods
Parameters
param
A valid string representing the message output to the log window.
Returns
Empty.
5.2.8.
saveTextToFile
Saves text to a file after prompting the user for the save location. The default name in the Save As dialog box is populated with sDefaultFileName.
Syntax
designer.saveTextToFile (STRING param1, STRING param2 )
Parameters
param1 param2
A valid string representing the text data to save. Can be empty.
A valid string representing the default filename that populates the Save As dialog box, which the user is prompted with. Can be empty.
Returns
Returns TRUE if saved successfully, returns FALSE otherwise.
5.2.9.
setDialogString
Pushes data into the Flex dialog box before calling designer.showFlexDialog(). If the macro script wants to set data inside the Flex dialog box, it must call designer.setDialogString() with the data before starting designer.showFlexDialog().
Syntax
designer.setDialogString ( STRING param1, STRING param2 )
672
Scripting Methods
Parameters
5
param1 param2
A valid string representing the name of the variable that the application built with Flex must look in with its ExternalInterface call.
A valid string representing the value of sFieldName.
Returns
Empty.
5.2.10. showFlexDialog
Creates a new modal dialog box, instantiates a Flash Player inside the dialog box, and loads the SWF file. This is a way to provide graphical user interfaces inside Designer.
NOTE
:
Locate the SWF file in the same folder that the macros script is installed in. The sSWF parameter must only contain a filename, and no path information. Designer only loads the SWF file from the same folder as the currently running JavaScript file.
Syntax
designer.showFlexDialog( STRING param1, INTEGER param2, INTEGER param3)
Parameters
param1
param2
param3
A valid string value representing the name of a SWF file to load.
A valid integer value representing the width of the user interface contained in the SWF file.
This parameter indicates the width of the host dialog box. If this parameter is set to a value that is less than the minimum width for the dialog box, it is adjusted to that value. If this parameter is set to a value that is greater than the dialog box’s desktop width, it is adjusted to that value.
A valid integer value representing the height of the user interface contained in the
SWF file.
This parameter indicates the height of the host dialog box. If this parameter is set to a value that is less than the minimum width for the dialog box, the dialog box is adjusted to that value. If this value is set to a value that is greater than the dialog box’s desktop height, the dialog box is adjusted to that value.
673
Scripting Methods
Returns
A string from the form application built with Flex. When the form application built with Flex stops, it calls back to Designer to indicate that it has stopped running. With the callback, it passes back a string. A common use for this is for the form application built with Flex to send back its closing status, such as OK or Cancel.
5.2.11. showHelp
Opens a topic in a Windows HTML Help (CHM) file.
Syntax
designer.showHelp( STRING param1, STRING param2 )
Parameters
param1
param2
(optional)
A valid string value representing the filename (without the CHM filename extension) of the CHM Help file. This file must be in the same directory as the macro script.
A valid string value representing the name of the topic to display. The topic path is specified with a path that can contain forward slashes.
Returns
Empty.
5.2.12. showTextWindow
Creates a text file (scriptOutput.txt) in the system's temporary directory with the content of sText, and then opens the system's default text file editor with that file as a parameter. Each invocation of this method overwrites the content of the temporary file. Multiple invocations do not concatenate text together.
This method allows a non-modal way of showing output. The Flex and the Alert dialog boxes are both modal, which makes it impossible for a user to interact with the output of a macro script at the same time as they interact with Designer. In some cases, you can look at the output to make changes in Designer.
674
Scripting Methods
Syntax
designer.showTextWindow( STRING param )
Parameters
5
param1 A valid string value representing the text to show in the system's default text editor.
Returns
No return.
5.2.13. showXDPinAcrobat
Takes the dataPacket that you supply and writes it into an XDP file. The XDP file references the PDF file to load, and the data to merge and display. This method provides rich reporting from a macro script.
Syntax
designer.showXDPinAcrobat( STRING param1, STRING param2)
Parameters
param1
param2
A valid string value representing the XML data to write out.
A valid string value representing the base name of the PDF file to display, which must be in the same folder as the macro script.
Returns
Empty.
675
Understanding the XML Form Object Model
6.
Understanding the XML Form Object
Model
A DOM is a platform- and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document. DOMs are commonly used with data expressed in XML.
All of the DOMs used in the XML Form Object Model share the following characteristics:
• They are strictly tree-structured.
• A node may have mandatory children. In such cases, the mandatory child nodes are created at the same time as their parent.
• The non-mandatory children of each node in the tree are ordered by age. That is, the DOM is aware of the order in which the non-mandatory child nodes were added.
For each step in the form processing, there is a DOM that holds the data structures for that stage. Scripts can examine and modify each DOM. DOMs are responsible for maintaining internal consistency but not external consistency. For instance, when a script turns on a radio button by assigning the corresponding field, all the other buttons coupled to that one are automatically turned off. This is a matter of internal consistency so it is managed by the Form DOM itself.
By contrast, the Data DOM does nothing to prevent a script from violating the rules of XML, for instance, by giving an object two properties with the same name. This is a matter of external consistency so it is the responsibility of the script author, not the DOM.
Each time a form design is combined with data, the XML Form Object Model is used to facilitate the process of combining template and data to create the resulting form. This process begins by using the existing XML DOMs’ representations of the form design and the XML data to create separate models. These separate models store a structured representation of the original form design and original XML data. The Template DOM corresponds to the form design, and the Data DOM corresponds to the user-supplied XML data.
After the template and data models are created, a third model, the Form DOM, is created that represents the merged information. The Form DOM acts as a medium for combining the specific values from the XML data with the presentation rules defined by the form design.
If you are creating an interactive form, after the form DOM is created, the form is complete and ready for deployment to users. Interactive form designs may have associated data that they are merged with, but most interactive forms are designed to support user-entered data.
The process up to and including the creation of the form DOM is identical for all forms.
However, non-interactive forms have a set of data to merge with their form design. In the case of forms that have a fixed layout, data merging does not determine the presentation rules for the form; that is, data is merged into the appropriate fields without changing the field proper-
676
Understanding the XML Form Object Model 6
ties. In contrast, when data is merged with forms that have a flowable layout, the fields grow or shrink to accommodate the amount of data merged into them.
The Form DOM for forms with both fixed and flowable layouts looks very similar; it is one long form with no pagination. When the data and presentation rules are applied to these types of forms, they must be formatted according to the layout information. A Layout DOM is created from the Form DOM that structures the form into pages and applies any other page-based rules, such as page numbering, headers, and trailers. The following diagram illustrates this process.
After the layout rules are applied to forms that have a fixed or flowable layout, both types of forms are complete.
6.1.
XML Form Object Model DOMs
6.1.1.
connectionSet Model
The connectionSet model controls a data schema as well as a data source used by a particular form.
This model describes connections to XML schema, sample XML data, or web services. Using the connectionSet model, it is possible to extract the details, such as a URL, for a referenced schema or
WSDL for reporting purposes.
677
Understanding the XML Form Object Model
The connectionSet model consists of the following objects:
R
ELATED LINKS
:
effectiveInputPolicy effectiveOutputPolicy
6.1.2.
Data Model
The Data model is the in-memory representation of user data. When a form design and data are merged using the data-binding process, the data model supplies the content for fields on the final form.
Using this model, you can access and manipulate data from one of the following data sources:
• XML document
• OLEDB database
• XML schema file
• WSDL file
The Data model consists of the following objects:
•
•
•
•
6.1.3.
Event Model
The Event model controls the changes in a form that occur before, during, and after actions take place. These actions include dynamic form events, such as the point when the data and form design
678
Understanding the XML Form Object Model
are merged but before any pagination is applied, as well as interactive form events such as when a user updates the value of a field.
The Event model consists of the following object:
•
6
6.1.4.
Form Model
The Form model is the in-memory representation of the merged Template model and Data model.
Using this model, you can affect the look of the form, adjust field values, or perform other changes prior to either displaying the completed form to a user or processing the form through the Layout model.
Scripts run against the Form model by default; therefore, you do not need to specify the Form model in your reference syntax.
The Form model consists of the following objects:
signatureProperties(deprecated)
679
Understanding the XML Form Object Model
6.1.5.
Host Model
The Host model provides a set of properties and methods for working at the application level. These properties and methods are available for scripting regardless of the hosting application.
The Host model consists of the following object:
•
6.1.6.
Layout Model
The Layout model is the in-memory representation of a form after it is merged with data. This representation is the final layout of a form.
The Layout model consists of the following object:
•
6.1.7.
Signature Model
The Signature model provides a set of methods for working with XML digital signatures that conform to the W3C XML-Signature standard (http://www.w3.org/TR/xmldsig-core/). It lets you specify script commands to sign, clear, enumerate, and verify signatures.
The Signature model consists of the following object:
R
ELATED LINKS
:
6.1.8.
sourceSet Model
The sourceSet model provides a connection between an external OLEDB database and the Data model. Using this model, you can control connections to the data source, as well as manage records within the data source.
The sourceSet model consists of the following objects:
•
•
•
•
•
•
680
Understanding the XML Form Object Model
•
•
•
•
•
•
•
•
•
•
•
•
•
6.1.9.
XFA Model
The XFA model defines the application model that Designer uses to implement the XML Form
Object Model. The application model is the base model from which all other models are derived.
The XFA model consists of the following objects:
6
681
JavaScript Examples
7.
JavaScript Examples
These examples illustrate the properties and methods that are supported in this scripting environment.
7.1.
Referencing objects
These examples illustrate several ways to reference an object.
When accessing a specific instance of an object, be aware of the occurrence number of the object where the script resides. The script will return the object with the same occurrence number as the object where the script resides. For example, there are three buttons with the same name
(Button1[0], Button1[1] and Button1[2]) and three text fields with the same name (TF1[0], TF1[1] and TF1[2]). If the script on Button1[2] is xfa.host.messageBox(TF1.rawValue), the result will be
TF1[2].rawValue , and not TF1[0].rawValue.
7.1.1.
Uses
Properties Methods
682
JavaScript Examples
7.1.2.
Scripts
7
7.1.3.
Accessing the first instance of a text field
// Access a sibling field using the field name.
// Access the first instance of TextField1.
TextField1.rawValue = "Hello";
7.1.4.
Accessing the first instance of a text field
// Access the first instance of TextField1. When scripting with JavaScript, use
// xfa.resolveNode to start the search at the top and move down the form
// hierarchy. xfa.resolveNode("TextField1").rawValue = "Hello"; xfa.resolveNode("TextField1[0]").rawValue = "Hello";
7.1.5.
Accessing a field with accessors
// When scripting with JavaScript, use the resolveNode() method to access a
// field with a SOM expression that contains a # or [] operator. When searching
// with this.resolveNode, the search starts at the current object and moves up
// the form hierarchy. this.resolveNode("Subform2[1].NumericField4").rawValue = 25;
7.1.6.
Accessing a subform with an index number
// Access a subform with an index number. When using xfa.resolveNode,the search
// starts at the top of the form hierarchy and moves down. var nIndex = 2; var sSOM = "Subform2[" + nIndex + "]"; var oSubform = xfa.resolveNode(sSOM); oSubform.NumericField4.rawValue = "25";
7.1.7.
Accessing a field property
// Access a field property using a property name and value.
// Change the field properties of a specific subform.
// Use the [] operator to access an object’s property. var sProperty = "access"; var sValue = "readOnly";
// First, get the subform nodes. var oNodes = Subform2.nodes; var nNodesLength = oNodes.length;
683
JavaScript Examples
// Loop through the subform's nodes and look for fields. for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount ++) {
// Set the field property. if (oNodes.item(nNodeCount).className == "field") { oNodes.item(nNodeCount)[sProperty] = sValue;
}
}
7.1.8.
Counting the text fields in a document
// Count the number of text fields in a document.
// Get the field containers from each page. for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) { var oFields = xfa.layout.pageContent(nPageCount, "field"); var nNodesLength = oFields.length; var nCount = 0; for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { if (oFields.item(nNodeCount).ui.oneOfChild.className == "textEdit") { nCount++;
}
}
TextField1.rawValue = nCount;
}
7.1.9.
Accessing fields using partial object names
// Access fields using partial object names.
// Get the field containers from each page. for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) { var oFields = xfa.layout.pageContent(nPageCount, "field"); var nNodesLength = oFields.length; for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { if (oFields.item(nNodeCount).name.substr(0,2) == "Te") { xfa.host.messageBox(oFields.item(nNodeCount).name);
}
}
}
7.1.10. Accessing a choice list value
// Use the newText or prevText property to access the choice list value before
// or after the value changed.
// Trigger the script on a change event.
684
JavaScript Examples
TextField1.rawValue = xfa.event.prevText;
TextField2.rawValue = xfa.event.newText;
7.1.11. Accessing a field in a subform
// Access a field nested inside a sibling subform by prefixing the field name
// with its parent name.
Subform2.TextField3.rawValue = "Hello";
7.1.12. Accessing fields in a subform
// Access the first-level fields nested inside a subform.
Subform1.resoveNodes("#field[*]")
7
7.1.13. Getting the fields from each page
// Get the field containers from each page. for (var i = 0; i < xfa.host.numPages; i++) { var oFields = xfa.layout.pageContent(i, "field"); var nodesLength = oFields.length;
// Set the access type. for (var j = 0; j < nodesLength; j++) { var oItem = oFields.item(j); if (oItem != this) { oItem.access = "readOnly";
}
}
}
7.1.14. Creating a node in the data model
This example illustrates how to create or clone a new data model node.
685
JavaScript Examples
Uses
Properties Methods
Script
Creating a data node
// Display the number of child nodes under the rootNode (xfa.record).
// rootNode is the data file’s root node. xfa.host.messageBox("Initial number of nodes under rootNode: " + xfa.record.nodes.length);
// Create a node of type dataGroup. var oGroupNode = xfa.datasets.createNode("dataGroup", "NewGroupNode");
// Append the data group node to an existing data model node. xfa.record.nodes.append(oGroupNode);
// Display the number of child nodes under rootNode. xfa.host.messageBox("Number of nodes under rootNode after first append: " + xfa.record.nodes.length);
// Create a node of type dataValue. var oValueNode = xfa.datasets.createNode("dataValue", "NewValueNode");
// Set the value of the new data value node. oValueNode.value = "The item value";
// Append the data value node to the data group created above. xfa.record.NewGroupNode.nodes.append(oValueNode);
// Get the value from the data model.
TextField1.rawValue = xfa.record.NewGroupNode.NewValueNode.value;
// Append a cloned data group node. xfa.record.nodes.append(xfa.record.NewGroupNode.clone(1));
// Display the number of child nodes under rootNode. xfa.host.messageBox("Number of nodes under rootNode after appending clone: " + xfa.record.nodes.length);
686
JavaScript Examples 7
// Set the value of the new data value node. xfa.resolveNode("xfa.record.NewGroupNode[1].NewValueNode").value = "The clone value";
// Get the value of the cloned data value node.
TextField2.rawValue = xfa.resolveNode("xfa.record.NewGroupNode[1].NewValueNode").value;
// Remove the cloned data group from the node list. var oRemoveNode = xfa.resolveNode("xfa.record.NewGroupNode[1]"); xfa.record.nodes.remove(oRemoveNode);
// Display the number of child nodes under rootNode. xfa.host.messageBox("Number of nodes under rootNode once clone node removed: " + xfa.record.nodes.length);
7.1.15. Manipulating instances of a subform
These examples illustrate several ways to add or remove instances of a subform at run time.
Use the instance manager to manipulate the pages of a form that has a fixed layout. Each page is a subform; therefore, adding or removing a subform will look like adding or removing a page.
However, at run time, you cannot change the layout of a form that has a fixed layout. You can add and delete instances at the form:ready event; however, if the script is on a run-time event, such as click, nothing will happen.
Uses
Properties Methods
Scripts
Adding an instance by invoking the instance manager
// Add an instance of a subform by using the underscore syntax to invoke the
// instance manager directly.
// Forms rendered in a web browser do not support the underscore syntax.
// However, the underscore syntax is supported if the script runs at the
687
JavaScript Examples
// server.
_Subform2.addInstance(1);
Adding an instance by invoking the instanceManager property
// Add an instance of a subform by invoking the instanceManager property. Be
// careful to ensure that adding a subform will not violate the max occur
// value.
Subform2.instanceManager.addInstance(1);
Removing an instance
// Remove an instance of a subform. Set the min occur value only if removing an
// instance will violate it. For example, set the min occur to 0 if you want to
// remove the last, or the only, instance of a subform.
// Forms rendered in a web browser do not support the underscore syntax.
// However, the underscore syntax is supported if the script runs at the
// server.
Subform2.occur.min = "0";
_Subform2.removeInstance(0);
Removing the parent subform
// Remove the parent subform. parent.occur.min = "0"; parent.instanceManager.removeInstance(parent.index);
Setting the number of instances
// Set the number of instances of a subform. var oSubform = xfa.resolveNode("Subform2"); oSubform.instanceManager.setInstances(5);
Inserting a new subform instance
// Insert a new subform instance. This script will not work with a static form.
// The script is invoked by a button, named Insert Subform, that is nested
// inside a repeating subform. The new subform is inserted below the current
// subform. var oSubform = this.resolveNode("Subform2"); var oNewInstance = oSubform.instanceManager.addInstance(1); var nIndexFrom = oNewInstance.index; var nIndexTo = this.parent.index + 1;
// Invoke the instanceManager to insert the subform below the current one. oSubform.instanceManager.moveInstance(nIndexFrom, nIndexTo);
688
JavaScript Examples
Adding and removing a subform
// Invoke the instance manager to add and remove the comments subform. if (fComments.value == "0") {
// In this example, fComments is a document variable used as a flag.
// The fComments variable equals 1 when the comments subform is displayed.
_comments.setInstance(1);
// Add the comments subform. Change the button's caption. this.resolveNode("caption.value.#text").value = "Clear Comments";
// Set the flag value. fComments.value = "1";
} else {
// Remove the comments subform.
_comments.setInstance(0);
// Change the button's caption. this.resolveNode("caption.value.#text").value = "Add Comments";
// Reset the flag value. fComments.value = "0";
}
7
7.1.16. Getting or setting object values
These examples illustrate several ways to get or set a value for an object.
Uses
Properties
Scripts
Using rawValue
// Use the rawValue property to set and get a field’s raw value.
TextField1.rawValue = "K1V1W3"; // Set the field’s raw value.
TextField2.rawValue = TextField1.rawValue // Get the field’s raw value.
689
JavaScript Examples
Using value
// Use the value property to set and get the field’s raw value.
TextField1.rawValue = "k1V1W3";
TextField2.rawValue = TextField1.value.oneOfChild.value
Using formattedValue
// Use the formattedValue property to set and get the field’s formatted value.
// Use the value property to set and get an object’s value (picture).
TextField1.rawValue = "K1V1W3"; // Set the field’s raw value.
TextField1.format.picture.value = "A9A 9A9"; // Set the field’s display picture format.
TextField2.rawValue = TextField1.formattedValue; // Get the field’s formatted value.
Setting a data object’s value
// Use the value property to set and get a data object’s value.
// In this script, groupNode is a data group and addressL1 is a data value in
// the data file.
TextField1.rawValue = xfa.record.groupNode.address.line1.value;
Setting the document variable’s value
// Use the value property to set and get the document variable’s value.
TextField1.rawValue = docVar.value;
7.1.17. Working with page numbers and page counts
These examples illustrate several ways to use the host and layout models to work with page numbers and page counts.
The host and layout models have several different properties and methods for working with page numbers and page counts. The properties and methods that you should use depend on what the script does and when it executes.
Many of the host properties and methods are unavailable on the server. Use the host properties and methods to set or get page numbers at run time.
None of the layout methods set the page number. Use the layout methods to get the current page at layout:ready or to display the page numbers at the bottom of the page and see the page number when you open a form on a client.
690
JavaScript Examples
Uses
7
Properties Methods
Scripts
Getting the page number
// Use the page layout methods to get the current page number.
TextField1.rawValue = xfa.layout.page(this); // 1-based.
TextField2.rawValue = xfa.layout.absPage(this); // 0-based.
Getting the page count using the pageCount method
// Use the layout pageCount methods to get the number of pages in a document.
TextField1.rawValue = xfa.layout.pageCount(); // Get the logical number of pages.
TextField2.rawValue = xfa.layout.absPageCount(); // Get the physical number of pages.
Formatting the pagination
// Use the layout page and pageCount methods to format the pagination.
TextField1.rawValue = "Page " + xfa.layout.page(this) + " of " + xfa.layout.pageCount();
Getting and setting the current page number
// Use the host currentPage property to get and set the current page number at
// run time.
// This script cannot be used during a layout:ready, form:ready, or initialize
// event. However, it will work if the script is on a button. xfa.host.currentPage = 1; // Go to page 2 (0-based).
Getting the page count using the numPages property
// Use the host numPages property to get the number of pages in a document.
TextField1.rawValue = xfa.host.numPages; // Get the number of pages.
691
JavaScript Examples
Navigating down a document
// Use the host pageDown() method to navigate through a document. xfa.host.pageDown(); // Go to the next page.
Navigating up a document
// Use the host pageUp() method to navigate through a document. xfa.host.pageUp(); // Go to the previous page.
7.1.18. Concatenating data values
This example illustrates how to concatenate data values into an address block and ensure that there are no blank lines.
Uses
Properties Methods
Script
Concatenating data values
// Get the values from the data model. var sName = xfa.record.groupNode.address.line1.value; var sPostbox = xfa.record.groupNode.address.line2.value; var sStreet = xfa.record.groupNode.address.line3.value; var sCity = xfa.record.groupNode.address.line4.value; var sRegion = xfa.record.groupNode.address.line5.value; var sCountry = xfa.record.groupNode.address.line6.value; var sPostcode = xfa.record.groupNode.address.line7.value; var addressArray = new
Array(sName,sPostbox,sStreet,sCity,sRegion,sCountry,sPostcode); var sAddressBlock = "";
// Don’t display the postbox if the value is not provided. if (addressArray[1] == null) { sAddressBlock = addressArray[0] + "\n" + addressArray[2] + "\n" + addressArray[3]
692
JavaScript Examples 7
+ "\n";
} else { sAddressBlock = addressArray[0] + "\n" + addressArray[1] + "\n" + addressArray[3]
+ "\n";
}
// Do not display the region if the value is not provided. if (addressArray[4] == null) { sAddressBlock = sAddressBlock + addressArray[5] + " " + addressArray[6];
} else { sAddressBlock = sAddressBlock + addressArray[4] + ", " + addressArray[5] + " " + addressArray[6];
}
TextField2.rawValue = sAddressBlock;
// Make sure the field is set to display a multiple line value. To set the
// multiLine property programmatically, add the following line:
TextField2.ui.oneOfChild.multiLine = "1";
7.1.19. Calculating totals
This example illustrates how to calculate totals.
Uses
Properties Methods
Script
Calculating totals
// Access a field in a repeating subform by looping through the node list. var oFields = xfa.resolveNodes("Subform2[*].NumericField4"); var nNodesLength = oFields.length; var nSum = 0; for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { nSum += oFields.item(nNodeCount).rawValue;
}
TextField1.rawValue = nSum;
693
JavaScript Examples
7.1.20. Changing the background color
These examples illustrate how to change the background color of a subform or fields.
In a form that has a flowable layout, you can change the background color of the entire field, including the caption and the field area, at run time. However, in a form that has a fixed layout, you can only change the background color of the field area at run time.
Uses
Properties Methods
Scripts
Changing the background color of a subform
// Alternate the background color of a repeating subform. var oNodes = xfa.resolveNodes("Subform2[*]"); var nNodesLength = oNodes.length; for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { if (oNodes.item(nNodeCount).index%2 != 0) { oNodes.item(nNodeCount).border.fill.color.value = "200,200,250";
} else { oNodes.item(nNodeCount).border.fill.color.value = "200,150,250";
}
}
Changing the background color of a field
// Alternate the background color of the NumericField4 field.
// Before running this script, set a background color or set the
// border.fill.presence property to visible. var oNodes = xfa.resolveNodes("Subform2[*]"); var nNodesLength = oNodes.length; var sFillColor;
694
JavaScript Examples
for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { if (oNodes.item(nNodeCount).index%2 != 0) { sFillColor = "200,200,250";
} else { sFillColor = "200,150,250";
} oNodes.item(nNodeCount).NumericField4.fillColor = sFillColor;
}
Changing the background color of rows in a subform
// Reset the fields of the current subform. var dString = "xfa.form.form1.dtls[" + this.parent.index + "]"; var oDetails = xfa.form.resolveNode(dString); var sDtlFields;
// Build the string of field names to reset. for (var i = 0; i < oDetails.nodes.length; i++) { sDtlFields = sDtlFields + "," + dString + "." + oDetails.nodes.item(i).name;
}
// Pass the string variable as a parameter. xfa.host.resetData(sDtlFields); OR
// Alternate the background color of the repeating rows. if (this.index%2 != 0) this.border.fill.color.value = "255,255,255"; else this.border.fill.color.value = "201,201,146";
7
7.1.21. Populating a drop-down list
These examples illustrate several ways to add or remove list items in a drop-down list.
Save the item list before you populate a drop-down list at run time; otherwise, the items will be lost.
Only the value is saved in the data.
Uses
Properties Methods
695
JavaScript Examples
Scripts
Populating a drop-down list from a web service
// Populate the drop-down list with values from a web service.
// The web service used in this example is fictional.
SOAP.wireDump = false; var oListURL = "http://www.webservice.net/wsdl/query.wsdl"; var e; try
{ xfa.host.messageBox("Starting list retrieval."); var service = SOAP.connect(oListURL); if(typeof service != "object") { xfa.host.messageBox("Couldn't get List object.");
} if(service.getAllServiceNames == "undefined") { xfa.host.messageBox("Couldn't get getAllServiceNames Call.");
}
// Start the query var oItems = service.getAllServiceNames(); if(oItems == null) { xfa.host.messageBox("List empty.");
} var nCount = 0; var nLimit = 10; for(var nItemCount in oItems)
{ for(var nItemNode in oItems[nItemCount])
{ if (nItemNode == "name")
DropDownList1.addItem(oItems[nItemCount][nItemNode]);
} if (++nCount >= nLimit) break;
}
} catch(e)
{ xfa.host.messageBox("Problem with list Call: " + e);
}
Clearing a drop-down list
// Clear the items in a drop-down list.
DropDownList1.clearItems();
696
JavaScript Examples
Populating a drop-down list from a data file
// Populate the drop-down list with values from a data file. var oItems = xfa.resolveNode("xfa.record.groupNode.list"); var nItemsLength = oItems.nodes.length; for (var nItemCount = 0; nItemCount < nItemsLength; nItemCount++) {
DropDownList1.addItem(oItems.nodes.item(nItemCount).value);
}
DropDownList1.rawValue = "Second item in list";
7
Saving the values from a drop-down list in another field
// Access the items in a drop-down list box and save their values in a separate
// field. var oItems = xfa.resolveNode("DropDownList1.#items"); var nItemsLength = oItems.nodes.length; for (nItemCount = 0; nItemCount < nItemsLength; nItemCount++){ if (TextField2.rawValue == null) {
TextField2.rawValue = oItems.nodes.item(nItemCount).value;
} else {
TextField2.rawValue = TextField2.rawValue + "\n" + oItems.nodes.item(nItemCount).value;
}
}
Accessing a drop-down list value using newText or prevText properties
// Use the newText or prevText properties to access a drop-down list value
// before or after the value changes.
// Execute the script on a change event.
TextField1.rawValue = xfa.event.prevText;
TextField2.rawValue = xfa.event.newText;
7.1.22. Saving a form
These examples illustrate how to export data from a form and save a form.
Uses
Properties Methods
697
JavaScript Examples
Scripts
Exporting form data without specifying a file name
// Export a form’s data without specifying a file name. The end user is
// prompted to provide the file name. xfa.host.exportData(); // Will generate data in XDP format. xfa.host.exportData("", 0); // Will generate data in XML format.
Exporting form data using a filename
// If you specify a file name, the script must run on a certified form. xfa.host.exportData("filename.xdp"); // Will generate data in XDP format. xfa.host.exportData("filename.xml", 0); // Will generate data in XML format.
Saving a form
// Saving the form is done at the application level, so you need to invoke the
// Acrobat app model.
App.executeMenuItem("SaveAs"); // The end user will be prompted to specify a
// file name.
// However, you must save the form silently if the form needs to be certified
// and the certificate must be trusted for privileged JavaScript. var mydoc = event.target; mydoc.saveAs();
7.1.23. Making an object visible or invisible
This example illustrates how to make an object visible or invisible. If a print button is invisible, it will prevent the user from printing a form.
The prePrint event triggers immediately before the form is rendered for printing. Similarly, the post-
Print event triggers immediately after the form has been printed.
Uses
Properties
698
JavaScript Examples
Scripts
Setting a field to be visible or invisible
// If a field is visible, make it invisible and vice versa. if(Field1.presence == "visible")
{
Field1.presence = "invisible";
} else
{
Field1.presence = "visible";
}
Setting a button to be visible but non-printing
// Set a button to be visible but non-printing at design time.
Button1.relevant="-print"
7.1.24. Using radio buttons and check boxes
These examples illustrate how to select and clear radio buttons and check boxes.
Uses
Properties Methods
Scripts
Selecting a radio button
// Select the first radio button.
RadioButtonList.rawValue = '1'; xfa.host.messageBox('Value of RadioButtonList: ' + RadioButtonList.rawValue);
// Select the second radio button.
RadioButtonList.rawValue = '2'; xfa.host.messageBox('Value of RadioButtonList: ' + RadioButtonList.rawValue);
7
699
JavaScript Examples
Accessing radio buttons
// Access the radio buttons.
RadioButtonList.resolveNodes("#field[*]")
Clearing a radio button
// Clear a RadioButtonList value. Any invalid value will clear the list.
RadioButtonList.rawValue = '3'; xfa.host.messageBox('Value of RadioButtonList: ' + RadioButtonList.rawValue);
Selecting a check box
// Select a check box.
CheckBox1.rawValue = 1; xfa.host.messageBox('Value of checkbox: ' + CheckBox1.rawValue);
Deselecting a check box
// Deselect a check box.
CheckBox1.rawValue = 0; xfa.host.messageBox('Value of checkbox: ' + CheckBox1.rawValue);
7.1.25. Determining that a form has changed
This example illustrates how to determine that a form has changed.
Uses
Properties Methods
Script
Determining that a form has changed
// Save a copy of the original XML file. var sOriginalXML = xfa.data.saveXML();
// Change the form data.
700
JavaScript Examples
TextField1.rawValue = "changed";
// Determine whether the form data has changed. if(sOriginalXML == xfa.data.saveXML())
{ xfa.host.messageBox("Form has not changed.");
} else
{ xfa.host.messageBox("Form has changed.");
}
7.1.26. Disabling all form fields
This example illustrates how to disable all the fields on a form.
Uses
Properties Methods
Script
Disabling all form fields
// Get the field containers from each page. for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) { var oFields = xfa.layout.pageContent(nPageCount, "field"); var nNodesLength = oFields.length;
// Set the field property. for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { oFields.item(nNodeCount).access = "readOnly";
}
}
7
701
பதிவிறக்கு
விளம்பரம்