cancel
Showing results for 
Search instead for 
Did you mean: 

Closing the Browser

Former Member
0 Kudos

Hi Gurus,

I have a Web Dynpro application and i need to close the "BROWSER" on clicking a link. The process of sending a javascript to the exit plug to the interface View controller is not working. Please help.

Thank You.

Kind Regards,

Manoj Durairaj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Manoj

Check this thread link

Regards

Ruturaj

Former Member
0 Kudos

Hi,

I remember I had done this functionality on click of Button in webdynpro application. It is there in SDN but i could not remember the link. Any how i will post the code below may be of some useful for you

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)

Regards

Raghu

Former Member
0 Kudos

Hi,

Why it is not working? have u checked all the stpes clearly?

Can u you tell how u have done it?

Regards,

Bala

Former Member
0 Kudos

Hi Bala,

I created as per one of the forum by Nibu Wilson where he goes on to pass this javascript to the exit plug. There was also another option of closing by getting the absolute URL of the html page stored in the mimes folder and sending it to the exit plug. However both the solutions were not working.

Thank You.

Kind Regards,

Manoj Durairaj

Former Member
0 Kudos

Hi,

Do one thing, delete that html file and add it again.

And also, code in it...some times it will not recognise....do some small changes and try again.

It happened for me also.

I tried like that, strangely it worked again.

make use u are calling exit plug only.

Regards,

Bala

Former Member
0 Kudos

Hi Bala,

Hmmmmm, i tried it, still its the same problem......

Thank You.

Kind Regards,

Manoj Durairaj

Former Member
0 Kudos

Hi Manoj,

While creating the parameter for exit plug did you give the parameter as Url (It is casesensitive. U should be CAPS and rl should be small).

If it is still not working, pls paste the complete procedure which you have done.

Regards,

VJR.