Iframecontainer |
Makes an iframe object as a frame(dock) in the Explorer.
Syntax
HTML |
<iframe class="container" id= "myFrame"></iframe> |
The component is attached to any IFRAME object when its "class" is defined as "container" like in the syntax above. The component on initialization registers itself to the system as a frame with the id as the framename. The iframe object then acts like a frame (also called dock) in the Explorer.
All applications in the Process Platform Ajax Toolkit framework run inside a frame (dock). Examples of the docks provided by Process Platform Ajax Toolkit are "main", "left", "right" etc. The frame is responsible for providing the GUI around the application (if any) and also the behavior of the application with respect to the framework like hiding an application, showing an application etc. You can read the help on container and guiRepresentation for more clarity.
By using the iframecontainer component, an application can be loaded inside another by calling application.select(). Applications started in this manner can be accessed from anywhere through the system.windows array (that is,system.windows[applicationId]). Applications opened inside these IFRAMEs will behave like any other normal "application" in the Process Platform Ajax Toolkit framework. You can do an application.select() to this frame(dock) by specifying the frame tag in the application definition as the id of the iframe. In other words the IframeContainer component extends the Process Platform Ajax Toolkit framework by adding a frame(dock).
Following is a sample IFRAME container defined on the page.
HTML |
<div> <iframe class="container" id="myFrame" style="width:100%;height:50%></iframe> </div> |
The following XML definition specifies the frame where the application has to run as myFrame.
HTML |
<script id="newApplication" type="cordys/xml"> <Application> <id>multiFunctionalGrid</id> <description>Multi Functional Grid</description> <caption>Multi Functional Grid</caption> <url>/cordys/wcp/demo/multifunctionalgrid.htm</url> <frame>myFrame</frame> </Application> </script> |
You can use the application.select method to load the application to the above iframe and also fire onselect events to the application.
Scripting |
application.select(newApplication.XMLDocument.documentElement); |
To dynamically add and initialize this component, you can use the initializeHTMLElements or addType methods of the Application object.
Note:
- You can also register a frame (also called dock) in system, by implementing a guiRepresentationclass. The frame will be automatically unregistered when the window containing the document is closed.
- To ensure the uniqueness of the frame and application IDs, it is recommended that the following convention be followed for specifying the same:
<ISV name with domain><Product name><ID>