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 xfa.host. messageBox .

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.

Hierarchy of objects

Model

Child objects

Host Model

None

Parent class

object class class

Properties

Name

Description

Type

Access

appType

Specifies the name of the client application in which a form currently exists.

String

Read

calculationsEnabled

Specifies whether calculate scripts will execute.

Boolean

Read /Write

currentPage

Sets the currently active page of a document at run time.

Integer

Read /Write

language

Returns the language of the running host application.

String

Read

numPages

Returns the number of pages in the current document.

Integer

Read

platform

Returns the platform of the machine running the script.

String

Read

title

Sets and gets the title of the document. It is available only for client applications.

String

Read /Write

validationsEnabled

Specifies whether the validation scripts will execute.

Boolean

Read /Write

variation

Indicates the packaging of the application that is running the script.

String

Read

version

Indicates the version number of the current application.

String

Read

Methods

Name

Description

Returns

beep

Causes the system to play a sound. It is available only for client applications.

Empty

currentDateTime

(currentDateTime)Returns current date and time in ISO 8601 format (YYYYMMDDTHHMMSS).

String

documentCountInBatch

Determines the number of documents in the current batch.

Integer

documentInBatch

Determines the ordinal number of the current document within the batch.

Integer

exportData

Exports the data from the current form in either XDP or XML format to a file.

Empty

getFocus

Finds and returns the form object that currently has the input focus.

Object

gotoURL

Retrieves the specified URL. It is available only for client applications.

Empty

importData

Imports data to the current form from a specified file.

Empty

messageBox

Displays a dialog box on the screen. It is available only for client applications.

Integer

openList

Opens the drop-down list specified by the reference syntax expression.

Empty

pageDown

Moves to the next page of a form. Use the pageDown method at run time.

Empty

pageUp

Moves to the previous page of a form. Use the pageUp method at run time.

Empty

print

Prints a specific number of pages from a document. It is available only for client applications.

Empty

resetData

Resets the fields to their default values within a document.

Empty

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.

String

setFocus

Sets the keyboard focus to the form object specified by the reference syntax expression.

Empty

// Ethnio survey code removed