cancel
Showing results for 
Search instead for 
Did you mean: 

closing the browser without popup message

Former Member
0 Kudos

Hi Experts,

I refered the following thread and done the below steps

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)

I have used Ie 7.0

My questin is when i clicking the button. It show popup message like

"Do you want to close this window " I don't want this popup.

without popup i need to close this window? How to do that?

Regards,

Manivannan P

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Manivannan p,

1.Create a Button called Close.

2.Create an action for this button.

3. In the event handler for this button, write the following code

You can try this

public void onActionClose(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionClose(ServerEvent)

WDPortalEventing.fire("urn:com.sapportals:navigation", "CloseWindow", "");

//@@end

}

This will help you closing the window with out Popup

Here we are calling a "Portal Event" called " CloseWindow" to close the windoe

Get back if you have any questions

Thanks & Regards

Swetha

Former Member
0 Kudos

Hi swetha,

I have done your steps

1.then create iView and assigned to page then click "Preview"

2.after clicking the button browser is not closing?

am i correct?? any idea for closing the browser??

Regards,

Manivannan P

Former Member
0 Kudos

Hi Manivannan P,

1) Does the code which i have attached before is asking some imports if so... have you imported these two API's

import com.sap.tc.webdynpro.clientserver.event.api.WDPortalEventMode;

import com.sap.tc.webdynpro.clientserver.event.api.WDPortalEventing;

2) This page which you are trying to close might be a part of an Application....could you please try to integrate this page in the main application, and then try clicking on the button

Thanks & Regards

Swetha

Former Member
0 Kudos

closed

Former Member
0 Kudos

Hello ,

Please use following procedure.

1.Create an extra view called "CloseView".

2.embeed an IFRAME UI Element in that view and specify the source property of IFRAME to close.htlm(html page saved in mimes)

2.maintain navagation between your mainView and closeview

3.On click of close button,fire outbound plug from MainView which navigates to closeview.

hope this helps.

Thanks,

Balaram Naidu Bankuru

Former Member
0 Kudos

Hi Balram,

Thanks for your reply.

How to embed close.html to IFrame view?i saved in html page in mimes!!

I done your steps. It just navigate only i need close the browser?

Regards,

Manivannan P

Former Member
0 Kudos

Hello,

Just specify the "source" property of IFrame to ur html file(close.html) name saved in mimes.

Hope this helps.

Thanks,

Balaram Naidu

Former Member
0 Kudos

Hi balram,

I done that above steps.

It just navigate main view to close view.. It doesnot close the browser???

Regards,

Manivannan P