on 08-14-2007 2:38 PM
Hi,
We are using the following API in order to close an external window: TaskBinder.getCurrentTask().getClient().sendRedirect("javascript:window.close();",0);
After closing the window, the object in the backend system remain locked (and not released). it seems that the session remains alive and hence the object is locked.
If we close the window with the X of the window, the object of the backend is released as required.
As suggestions?
Thanks,
Aviad
Hi,
why do you want to close the window from WebDynpro?
Is it not enough just to make a close button in that external window?
Or do you mean that if you close the webDynpro window that you are still logged on to the AppServer because of the external window, the session of the Internet Explorer is not ended?
Regards,
Dennis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi AVIAD,
Check this.
Step 1: Take a context attribute(WindowInstance) of type com.sap.tc.webdynpro.services.session.api.IWDWindow.
Step 2: Take a CloseButton in the View(DisplayView) that is used as a embed View of external Window.
Step 3:
When you are calling the external window set WindowInstance
public void onActionDisplayExternal Window(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionDisplayResult(ServerEvent)
IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(
"DisplayWindow");
// create the Window
IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo, true);
window.setWindowPosition(WDWindowPos.CENTER);
window.setTitle("WindowTitle");
window.setWindowSize(100,100);
// Save WindowInstance in Context
wdContext.currentContextElement().setWindowInstance(window);
// and show the window
window.show();
//wdThis.wdFirePlugInDisplay();
//@@end
}
Step4: Associate action CloseWindow with the CloseButton
and destroy the window instance inside it.
public void onActionCloseWindow(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionCloseWindow(ServerEvent)
IWDWindow window = wdContext.currentContextElement().getWindowInstance();
window.destroyInstance();
//@@end
}
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.