cancel
Showing results for 
Search instead for 
Did you mean: 

close window

Former Member
0 Kudos

Hi,

we have a close button in the view. once the user clicks on the button it should close the window .how to proceed on this?

Regards,

Pavani

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Check this out.

Thanks

Avik

Former Member
0 Kudos

Hi pavani,

Use this code,

IWDWindow Window =wdComponentAPI.getWindowManager().createModalWindow(wdComponentAPI.getComponentInfo().findInWindows("Your window name"));

if(Window != null)

{

Window.destroy();

}

Refer this blog also [Blog|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20d2def3-f0ec-2a10-6b80-877a71eccb68?overridelayout=true]

Regards,

Sunaina Reddy T

susmita_panigrahi
Active Participant
0 Kudos

Hi

Please refer the below forums, which can help you:

1.

2.

Thanks

Susmita

Former Member
0 Kudos

Hi,

If you want to navigate to a particular screen after you press exit button then do lilke this.

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 ,

I tried with all the methods what u have suggested.But logoff button is not working.Could you please help me on this?

Regards,

Pavani

Former Member
0 Kudos

Hi

you can hide the window or can destroy instance of window by using following sample code

IWDWindowInfo winfo=wdComponentAPI.getComponentInfo().findInWindows("NameOfIview");
	IWDWindow window1=wdComponentAPI.getWindowManager().createModalWindow(winfo);
	window1.hide();
	window1.destroy();

Thanks

former_member192434
Active Contributor
0 Kudos

Hi

You need to destroy the instance of the window on action of close button.

IWDWindow window = wdContext.currentPopNodeElement().getPopAttribute();
window.destroyInstance();

OR you can set this visibilty Inbvisible of the iview.

Hope it help you do solve ur problem.

Thanks

Former Member
0 Kudos

hello

For closing the window,you can display an empty view so user will not be able to see any UI element.

Thanks and Regards

V.S.Shetty