on 08-10-2005 5:54 PM
Hi everybody,
I've created an iView (AbstractPortalComponent) with links to different r/3 transactions (the links are generated URL thanks to IIViewUrlGenerator). Therefore when I click the link the transaction is launched in the same iView. What I would like to do it that the transaction is launched in another iView in the same page (target iView). So that the iView containing all the links is still visible (kind of navigation iView).
But I don't know how to do that. I am sure there must be a easy way to set the URL generated by IIViewURLGenerator as the target iView's content. I just know how to communicate between iViews (using EPCF) but I don't see how to set the URL as the target iView's content.
Any idea?
Thanks in advance
Renaud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In order to test I created two simple iViews. The first one send the google web page url to the target iView which is therefore supposed to display google's web page.
sender's doContent() :
String myUrl = "http://www.google.fr";
response.write("<script language='JavaScript'>");
response.write("EPCM.raiseEvent('namespace', 'myName', '" + myUrl + "');");
response.write("</script>");
Receiver's doContent() :
response.write("<script language='JavaScript'>");
response.write("EPCM.subscribeEvent('namespace','myEvent', setUrl);");
response.write("function setUrl(evt) {"
+ "var urlPassed = evt.dataObject;"
+ "document.write(urlPassed);"//just to check the url was passed
+ "var ivID = parent.pageSupport.getIvuId(); "
+ "var myIFrame = parent.pageSupport.getIvuFrameWindow(ivID);"
+ "myIFrame.location.href = urlPassed;"
+ "parent.pageSupport.ivuRefresh(ivID);"
+ "}");
response.write("</script>");
The URL is correctly passed to the receiver iView but I can't see google's webpage in the target iView. There must be a mistake in my code but I can't see it. Any idea?
Renaud
Hi Yoav,
thanks a lot it works! But I've got a weird behaviour from my iViews :
This is my code :
Sender
<script>
EPCM.raiseEvent('urn:myOwnNameSpace', 'doNavigateURL', "http://www.yahoo.fr");
</script>
Receiver
<script>
EPCM.subscribeEvent( 'urn:myOwnNameSpace', 'doNavigateURL', handle_donavigateURL_Event);
function handle_donavigateURL_Event(evt) {
var url = evt.dataObject;
document.write("<IFRAME src=" + url + "></IFRAME>");
}
</script>
When I launch the page containing the 2 iView the yahoo web page is actually displayed into the sender iView! Why??
Moreover when I click a link in yahoo the link is displayed in the whole page and not in the iFrame anymore.
Renaud
Message was edited by: Renaud Theuillon
User | Count |
---|---|
69 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.