pp108 : Frame

Frame

The Frame control is an advanced control, using which you can load a web application inside an XForm. To do so, add the Frame control to the XForm and specify the XPath of the web application to be added.

Loading Applications in a Frame

You can load a Web application in a Frame in the following ways:

  1. By specifying the source URL You can specify the source URL of an application in the property sheet of the Frame. In case of Process Platform applications, you must also specify a dummy xml such as/wizard01.caf?data="<data/>"for the data parameter in the URL of the form. This ensures that the application loads in the Process Platform Framework.

    CAUTION
    Process Platform recommends using the application.select() method to load Process Platform Web Applications or .svg web pages in a Frame control.

  2. Using the application.select() methodThis method is applicable only for Process Platform applications. For information about how to use the application.select method to load an XForm in a Frame, see Application.

The Frame acts as a container for hosting the application. All methods and properties associated with the application are available and accessible through the containers collection (system.containers[applicationId]). This default implementation of a Frame (Iframecontainer) does not have a GUI definition, and custom implementations are necessary to make it fully functional.

For information about the Iframecontainer, see IframeContainer.

Note:

  • If no XForm is loaded into a Frame, you can use the frameID object to access its properties and methods.
  • For external Web Application loaded in a Frame, you can access the properties and methods of the Frame control using the document.all["FrameID"]object. For example:document.all["frame1"].show();.
  • For Process Platform Applications and XForms loaded in a frame, you can access the properties and methods of the Frame using the system.containers["ApplicationID"]object. For example:system.containers["MyApplication"].show();.
  • If the XForm and the Web Application loaded in the Frame control do not belong to the same organization, use/<xforms name>.caf?[organization=OrganizationDN |Organization]to define the URL in the application definition of the Web Application.
  • For a Frame control that contains a page of large size or a page that has multiple controls, the time taken for loading will be more. This is also true if the server response is slow. For such cases, it is recommended that you set the URL or source of the Web application in the init-done event handler of the form instead of the property sheet of the Frame control.

Properties and Methods of the Control

The Frame control has certain properties and methods associated with it. They define the behavior of the control and can be set through the property page of the control or programmatically using the APIs.

Table 1. List of Properties

Design-time property

Runtime property

Description

ID

Sets the string that identifies the control on an XForm. If not specified, a unique ID is automatically generated.

Tab Index

tabIndex

Sets and retrieves the position of the current control in the tabbing order for the current XForm.

Class Name

className

Sets or retrieves the class name applied on the control.

Source URL

Sets the location (URL) of the page or application to be loaded on the Frame control. This property must not be used for loading Process Platform Applications or XForms, both of which must be loaded using the select() method.

Task Part

Creates a task part for the control. Selecting the check box, displays the Task Part pane.

Load content after Form loads (for improved performance)

Enables delayed loading of the contents of the Frame control, in order to achieve better performance of the form. If selected, the contents of the control are loaded after the intialization of the form, that is after the Init Done event of the form is fired. It is selected by default.

Table 2. List of Methods

Method

Description

addListener()

This method registers the control to receive notifications for an event.

hide()

This method hides controls and all associated child controls.

removeListener()

This method unregisters the control to cease receiving notifications for its events.

show()

This method makes the control and its child controls visible.

Note:
In Internet Explorer, PDF files may overlap with other controls. Please use proper positioning to avoid the overlapping.