on 12-17-2007 6:08 AM
Hi ,
My requirement is such that,i have a Button in my View Layout.On Click of that Button the Window should be closed.
I have gone through the forum and tried out various combinations,but i could not get it solved.
Can i have step by step approach for the same.
Thanks and regards,
Chandrashekar.
On Button Action Use
U can Get the instance of window
Then use window.close();
Edited by: Kanwalpreet on Dec 17, 2007 11:55 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mithu,
According to the links you had provided I have followed the similar steps as given.
But what i find on running the application is that the entire application is being logged of or closed .
But my requirement is such that the window must be closed and not the browser being logged off.
Thanks and regards,
Chandrashekar.
Hi chandrashekar,
Try this.It will only close the external window.
1> Take a button say(Close) inside the externalview layout.Create an external window embed the external view.
2> Take a WindowInstance context attribute of type <b>com.sap.tc.webdynpro.services.session.api.IWDWindow</b>
when you are opening the external window save the window instance
IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(
"Put Window Name here");
// create the Modal Window
IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
// Display window in center
window.setWindowPosition(WDWindowPos.CENTER);
window.setTitle("PopUp window");
window.setWindowSize(100,100);
// Save WindowInstance in Context
<b>wdContext.currentContextElement().setWindowInstance(window);</b>
// and show the window
window.show();
Inside the action of external window close button use this code.
IWDWindow window = wdContext.currentContextElement().getWindowInstance();
window.destroyInstance();
Regards,
Mithu
Hi Experts,
My requirement is yet to be solved.
I have tried all possible ways for closing a window on click of a Button.
I am able to logoff the application successfully but i need to close the Window completely according to my requirement.
Please do help me out in this regard if atall there is any Possibilty to close a Window on Click of a Button in the view Layout.
Thanks and regards,
Chandrashekar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Close IE?
You can define an action to fire exit plug.
If not, following the above two.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You should destroy the window instance you have created. This will close the window.
IWDWindow window =wdContext.<windowinstanceelement>..getWindowInstance();
window.destroy();
Regards,
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do you want to close the pop up window or the parent window?
If it's pop up window then you can save an instance of the window while window creation and then close it in OnAction even of the button using
<windowinstance>.close();
If you want to close the parent window then I think you need to write the javascript for that in some jsp page and using that close the parent window.
Regards,
Murtuza
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 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.