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
|
input
|
A valid XFA node list of all the nodes to
be signed.
|
param2
|
input
|
A valid string representing a reference
syntax expression to the parent of the signature node.
|
param3
|
input
|
A valid string representing an XML identification
value for the signature.
|
param4
(Optional)
|
input (Optional)
|
The only valid value is
open
(default)
indicating that data nodes are open for edit and can be manipulated
at runtime.
|
param5
(Optional)
|
input (Optional)
|
Represents whether to use a dialog to allow
a user to sign the form.
-
true | 1
(JavaScript)
or
1
(FormCalc) (default)
-
Indicates that a dialog is used for this operation.
-
false | 0
(JavaScript) or
0
(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 (Optional)
|
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
.
|
param7
(Optional)
|
output (Optional)
|
Represents an output SignatureInfo object
containing the writable properties of the signature.
|
Returns
True
if
the signature was applied successfully and
False
if
the signing option was canceled. An exception is returned if the
signing operation fails.
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")
|
|
|