Invoke rap application from another IFrame. [message #780534] |
Wed, 18 January 2012 13:47  |
Amandeep Chahal Messages: 85 Registered: September 2011 Location: India |
Member |
|
|
Hi,
I have a requirement to invoke certain operations on my RAP application from another application.
Say I have 2 applications App1 and App2 of which App2 is my RAP application. I'm making the 2 communicate using javascript. On click of a button in App1, App2 is loaded in a separate IFrame(Have achieved this). On click of another button in App1 some other operation needs to be performed in App2.
Here I want to create a rap request for that operation. This operation in my RAP application is performed by a button click, so I thought of simulating the button mouse event which would eventually create a request (Request.js does it).
Problems :
1. There are javascript functions to simulate events, but I dont have the ID for the button in RAP as its getting a new ID each time. How to work around this problem?
2. I want some parameters to be a part of the request that would be created as a result of this mouse event. Is there a way I can pass this?
Or is there another approach I should be looking at to achieve the above?
Javascript ref to create event :
var fireOnThis = document.getElementById('someID');
var evObj = document.createEvent('MouseEvents');
evObj.initMouseEvent( 'click', true, true, window, 1, 12, 345, 7, 220, false, false, true, false, 0, null );
fireOnThis.dispatchEvent(evObj);
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01566 seconds