Portal applications that are rendered in their own IFrame, such as ITS-based and BSP applications, do not have direct access to the EPCM object. To solve this problem, the EPCF provides a proxy object, EPCMPROXY, through which such applications can access the EPCF APIs.
Subscribing to Events
The EPCF event subscription methods are called with function references. Since the references are kept across the IFrame borders, the references become invalid whenever the IFrame content is reloaded. To solve this problem, use the signature of the EPCM.subscribeEvent method that references the current window object:
For external applications that are rendered in their own IFrame, the EPCM object can convert the event handler subscription from window_reference, method_name to IFrame_name, method_name. As a result of this conversion, the method keeps the name rather than the object-method reference.
Using EPCM Proxy
The EPCMPROXY object is defined in the JavaScript epcfproxy.js file that has to be included into your portal application.
The following example demonstrates how to call the EPCF methods through EPCMPROXY.