Modifying the User Interface
Using Adobe Dialog Manager (ADM) in Acrobat JavaScript
10
The following example creates the modal dialog as shown below in
Figure 10.1:
F
IGURE
10.1
ADM Dialog with Item Cluster
To create a dialog such as the one above in
Figure 10.1,
first create an object literal
containing a dialog descriptor, and pass it as a parameter to the
app
object’s
execDialog
method. The object literal may be comprised of one or more of the handlers described in
a root dialog element, and a hierarchy of dialog items as children of the root
node.
We will begin by creating the handlers for the dialog descriptor. The
initialize
handler
is called as the dialog is created, and the
commit
handler is called when
OK
is selected. The
initialize
handler sets up the list tems, and the
commit
handler processes those
items.
Acrobat JavaScript Scripting Guide
165