on 11-28-2008 4:06 PM
Hi experts,
How can I close a window without using a plug exit? By implementing some javascript in the Java code, or other options?
Thanks in advance.
Edited by: Alaa Cherqaoui on Nov 28, 2008 5:06 PM
Thanks for your response.
Actually, I found this response, but the problem is : It's not my application which opens this window. so is it possible to use your solution with an adapted way?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! But the problem is that I can use the Exit Plug, so how can I do it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
You can use the "destroy" method for window.
For example:
you need to create WindowInstance varibale of type:
com.sap.tc.webdynpro.services.session.api.IWDWindow
Then inside the action that suppose to open this window you write the following:
IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("NameOfTheWindow");
IWDWindow window = wdComponentAPI.getWindowManager().createWindow( windowInfo, true);
window.setWindowPosition(WDWindowPos.CENTER);
wdContext.currentContextElement().setWindowInstance(window);
window.open();
And inside the action that suppose to close this window write the following :
wdContext.currentContextElement().getWindowInstance().destroy();
Hope it's help...
Regards,
Shimon.
Anyway for javascripts to run in an HTML only since webdynpro doesn't support javascripts. As an option, create an HTML resource using java which closes the parent window and show it as a confirm dialog box.
nikhiL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.