on 12-02-2008 9:06 PM
Hi All,
I need to implement the closing the browser where the webdynpro application running by click on some button in that application.
Can any body tell me how to implement that.
Regards
Vijay
Hi,
I resolved as follows(WebDynpro7.3) :
1.- Create a plug in the "Window" with the name "Exit" and parameter "closeWindow" the type Boolean, after edit it and put type Exit.
2.-Repeat the same but in the "Interface".
3.-Place the following code in the action:
IWDWindowController iwdWindowController =wdControllerAPI.getWindowController(); | |
IWDWindowInfo windowInfo=iwdWindowController.getWindowInfo(); | |
IWDOutboundPlugInfo iwdOutboundPlugInfo=windowInfo.findInOutboundPlugs("Exit"); | |
iwdWindowController.firePlug(iwdOutboundPlugInfo, new HashMap(){{put("closeWindow",true);}}); |
regards.
JCARMONA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
create an Exit Plug with an arbitary name (in the below example I called it closenow) and ensure it has a boolean parameter called closeWindow .
This is case sensitive, ensure the parameter is closeWindow!
Then create an action button on your Webdynrpo view, and invoke this code:
wdThis.wdGetCw2WindowController().wdFirePlugClosenow(true);
For this of course you have to have a data link from your webdynpro view to the webdynpro window (which is called in my example Cw2Window), then it will be visible from the view and the above code will work.
One pitfall is that once you created the exit plug on the interface view, it may report an error, but clicking on the Problems tab and selecting the error, in its context menu there is a quick Fix option that resolves the problem. Alternatively of course you can create the exit plug manually in the properties of the Window (tab Plugs).
I hope this helps.
Regards,
Ervin
Hi Manoj,
Can you give me the javascript.Thanks.
Regards,
Satish S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
have you tried with WDPortalNavigation.navigateAbsolute method ....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If your application is running stand-alone (not as a portal WD iview) then you can fire an exit plug on click of the button. The exit plug fire method expects an URL to redirect to and you can create a simple HTML file with the javascript to close the window and pass this URL to the exit plug.
If this is your case then search this forum for "javascript + close window" and you'll find a lot of threads.
However if your application is running in a portal then you cannot use exit plugs & the suggested method is to use portal navigation. But you cannot achieve this with portal navigation.
Regards,
Satyajit.
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 follow this procedure:
1.Create a Button called Exit.
2.Create an action for this button.
3. In the event handler for this button, write the following code:
String Url;
try {
Url = WDURLGenerator.getWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"close.html");
wdThis.wdGetAtpEmpDetailsWinInterfaceViewController().wdFirePlugExitPlug(Url);
} catch (Exception e) {
wdComponentAPI.getMessageManager().reportException("Technical Exception occured in the application : " + e.toString(), true);
}
4.Create a html page called u201Cclose.htmlu201D with Javascript code for closing a browser window.
5.Place this html page in SRC -> Mimes -> Components -> Project Structure(Create this folder and place the html page in this folder)
Hope this helps.
Regards,
Padmalatha.K
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
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.