This document outlines the XML Form Object Model scripting
events, objects, properties, and methods that are available for
forms rendered in HTML and as Guides.
This content is relevant for form developers interested in either
creating scripts for forms that will be rendered into HTML or as
Guides, or in maintaining existing scripting capabilities across
several form output types. Knowledge of JavaScript™, the
XML Form Object Model, as well as data binding using Adobe® LiveCycle® Designer
11 is expected.
When you create forms using Designer, you have the option of
rendering those forms in either PDF or HTML format. Using the Guide
Design perspective in Workbench, you can also create Guides based
on Adobe Flash® technology. End users view
each of the formats (PDF, HTML, and Guides) by using an associated client
application. The following table provides an overview of the client
applications required to view PDF forms, HTML forms, and Guides.
Format
|
Client application
|
PDF
|
Adobe Acrobat® Professional,
Acrobat Standard, Adobe Reader®
|
HTML
|
Microsoft® Internet
Explorer, Mozilla Firefox, Netscape Navigator, Apple® Safari
|
Guide
|
Adobe Flash Player
|
Note: While end users may view the PDF form, HTML
form, or Guide in an application such as Adobe LiveCycle Workspace
11, it is important to remember that it is the underlying client
technology that is responsible for displaying the form or Guide
and its data.
Not all form features available in Designer are available across
all output formats. Forms rendered in PDF format, by default, have
access to the full XML Form Object Model, including all scripting
events, objects, properties, and methods. Forms rendered in HTML
format or as Guides have access to only a portion, or subset,
of the XML Form Object Model. The following diagram illustrates
the relationship between the full XML Form Object Model and the
subsets available for HTML forms and Guides. Note that the support
for Guides is a subset of the full XML Form Object Model, and that
the support for HTML forms is a subset of what is supported for
Guides.
The reduced scope of the XML Form Object Model for HTML forms
and Guides means that if you are creating form designs that may
be rendered in either of those formats, you will need to consider
how to structure your form scripting. To prevenet unexpected results,
avoid referencing objects, properties, or methods that are not available.
Note: Guides support version 2.8 of the XML Form Object
Model (XFA).
For information about the availability of other features, see Target Version Referenceand Transformation Reference.
Objects that support scripting Designer uses two separate definitions of objects with
respect to scripting:
Architecturally, objects that exist within the Object Library
palette are more meaningful representations of objects exposed in
the underlying XML. In fact, all objects available in the Object
Library palette are derived from only four XML objects: contentArea,
draw, field, and subform.
The Designer scripting model allows you to reference objects
directly using the name of the object. For example, if you have
a text field on your form, and you want to set its value, you could
use the following JavaScript:
TextField1.rawValue = "Hello World";
From an architectural perspective, this is logically equivalent
to the following:
field.rawValue = "Hello World";
The following table outlines how the Object Library objects map
to their underlying XML equivalents.
Object on the Standard tab of the Object
Library
|
Derived from
|
Content Area
|
contentArea
|
Circle, Image, Line, Rectangle, Text
|
draw
|
Barcodes (all), Button, Check Box, Date/Time
Field, Decimal Field, Drop-Down List, Email Submit Button, HTTP
Submit Button, Image Field, List Box, Numeric Field, Paper Forms
Barcode, Password Field, Print Button, Radio Button, Reset Button,
Signature Field, Text Field
|
field
|
Subform, Table (each body row, header row,
and footer row is a distinct subform object)
|
subform
subform.instanceManager
|
Note: You cannot script against Designer objects derived
from contentArea or draw objects. To find what properties and methods
are available for your Object Library objects, consult either the field or subform sections
of Object-Level Scripting Support.
In addition to objects available from the Object Library in Designer
, objects that are only available through scripting are supported
by HTML forms and Guides. The table below outlines how you reference
the supported scripting model objects using script:
For more information on the entire Adobe XML Form Object Model,
see Adobe LiveCycle Designer 11 Scripting Reference.
|
|
|