on 07-02-2007 9:53 AM
Hello All
I have 2 iviews, first with web dynpro app and second with java applet,
applet is embedded in dynpage.
I want pass parameters from applet to webdynpro.
I call javascript function in applet to fire portal event which is mapped to webdynpro action and everything should be fine but...
when i have both iviews in portal page, applet is unable to call javascript function
but when i open this page in new window everything is working fine.
pls can someone explain me how can i fix it?
Marek
Hi,
Inside the portal page, are the iviews isolated ?
Check with the iview properties and accordingly put them as isolated.
i.e. The isolation method has to be set to embedded for the iview containing the applet and for the other iview the isolaton method has to be url.
Refer this <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/97/0be13dc2fd605ae10000000a11405a/frameset.htm">link</a> for more details.
Award points if helpful.
Regards,
Sujana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally I found out the answer.
The problem was that javascript protocol couldn't find proper frame for function call in onpage javascript, it was caused by portal framework which produced new frames. To fix it has to be implemented parameter '_self' in this line:
getAppletContext().showDocument(new URL("javascript:sendXY("" + str +"")"),"_self");
Regards
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it was some workaround but it did not resolve my problem...
i have configuration in iviews as You adviced, but it still doesn't help,
if i change isolation from embedded to url in applet iview it don't work at all in any way. I tryed with EPCF levels but it gave the same effect.
thanks for reply
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i will print code from dynpage and applet:
dynpage:
Form myForm = this.getForm(); // get the form from DynPage
IPortalComponentResponse response = (IPortalComponentResponse)this.getResponse();
IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
IResource res = request.getResource(IResource.APPLET, "applet/");
String myappletRes= res.getResourceInformation().getURL(request);
AppletContainer container = new AppletContainer();
container.setClassObject("NewApplet");
container.setName("myApplet");
container.setWidth("727");
container.setHeight("684");
container.setLibrary(myappletRes);
myForm.addComponent(container);
myForm.addRawText("<script> function sendXY(s) {EPCM.raiseEvent('urn:pl.myNameSpace, 'SendXYEvent', s);} </script>");
applet:
public void mouseReleased(MouseEvent e) {
p = e.getPoint();
str = p.x + "#" + p.y;
try {
getAppletContext().showDocument(new URL("javascript:sendXY(\"" + str +"\")"));
}catch (MalformedURLException me) { }
repaint();
}
maby it will help You solve it,
post any advices and idea You have pls
thanks in advance
Regards
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.