Packagecom.adobe.portfolio.api
Interfacepublic interface IXFAForm extends IPDFDocument, flash.events.IEventDispatcher

Language Version : ActionScript 3.0
Product Version :  Acrobat ActionScript API 10.1
Runtime Versions : Flash Player 10.1, AIR 2.0

Provides access to an XFA form.



Public Methods
 MethodDefined By
  
overwriteDatasetsPacket(newValue:XML, responseHandler:Function = null):void
Overwrites the XFA form's datasets packet.
IXFAForm
  
readDatasetsPacket(responseHandler:Function):void
Reads the XFA form's datasets packet.
IXFAForm
Method Detail
overwriteDatasetsPacket()method
public function overwriteDatasetsPacket(newValue:XML, responseHandler:Function = null):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.1
Runtime Versions : Flash Player 10.1, AIR 2.0

Overwrites the XFA form's datasets packet.

This call is allowed if and only if the permission "Form"/"Import" has been granted. This permission can be checked using the ICollection.permissions property.

The status of the call is returned asynchronously, by calling back the optional responseHandler function. If the responseHandler argument is non-null it should have the following function signature:

    function responseHandler(response:Object>:void;
The response object has the following properties:

PropertyTypeValue
'error'StringA String describing an error. It is defined only if the success property is false. The error description is always in English and is intended to be read by navigator developers rather than end users.
'success'Booleantrue if the datasets packet has been overwritten successfully; false otherwise.

Replacing an XFA form's entire datasets packet forces a re-merge of the form. The re-merge will:

Because of these effects, Adobe recommends that this method be used only within a portfolio that has a non-interactive XFA form as its root document. For example, an appropriate usage is to have a portfolio where the navigator gives a dynamic, interactive presentation of the user's data, and the root document provides a non-interactive, printable presentation.

Parameters

newValue:XML — An XML representation of the new data to be written to the form. Must be non-null and formatted as a valid xfa:datasets element. See the "XML Forms Architecture (XFA) Specification" (the most recent published version is located at: http://partners.adobe.com/public/developer/en/xml/xfa_spec_3_1.pdf). An error response is returned if the XML is empty or, after being serialized to an array of bytes, exceeds 1,048,576 bytes.
 
responseHandler:Function (default = null) — A callback function, as described above.


Throws
ArgumentError — If the newValue argument is null.
 
IllegalOperationError — If the permission "Form"/"Import" has not been granted.

See also

readDatasetsPacket()method 
public function readDatasetsPacket(responseHandler:Function):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.1
Runtime Versions : Flash Player 10.1, AIR 2.0

Reads the XFA form's datasets packet.

The result is returned asynchronously, by calling back the responseHandler function. The function should have the following signature:

    function responseHandler(response:Object):void
The response object has the following properties:

PropertyTypeValue
'error'StringA String describing an error, or null if no error occurred. The error description is always in English and is intended to be read by navigator developers rather than end users.
'success'Booleantrue if the datasets packet has been read successfully; false otherwise.
'value'XMLAn XML representation of the form's data, or null if an error occurred.

Parameters

responseHandler:Function — A callback function, as described above. Must not be null.


Throws
ArgumentError — If the responseHandler argument is null.