cancel
Showing results for 
Search instead for 
Did you mean: 

Tutorial TutWD_Popup_Init (3)

Former Member
0 Kudos

In this tutorial if you click the button "To" the window AdressBook will be opened. After you click the "Take this address" this window will be closed. But the closing is done from the EmailView. Why not from the AddressBook itself? I think one can close the AddressBook window in the AddressBookView. Right?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Thomas,

Try this <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">Tutorial</a>

Regards

Abhijith YS

Former Member
0 Kudos

Hi Abhijith,

your tutorial is the same what I had. Maybe you haven't understood my question. In the tutorial, the AddressBookView is closed in closed from the EmailView as follow:


  public void handleAddressSelectedEvent(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin handleAddressSelectedEvent(ServerEvent)
		//	put the selected email into context-attribute “ToAddress”
		wdContext.currentEmailSettingsElement().setToAddress(
			wdContext.currentAddressbookElement().getEmail());
		//	Get “AddressbookWindow” and close it
		IWDWindow window = wdContext.currentPopupElement().getWindowInstance();
		window.destroy();
    //@@end
  }

My question is: Can the AddressBookView be closed in AddessBookView?

Former Member
0 Kudos

I would imagine it can be done.

Try it and see what happens.

Former Member
0 Kudos

hi

If you want to close the window from other views use the handle what you have stored previously

wdContext.currentPopupElement().setWindowInstance(window);

IWDWindow window = (IWDWindow)wdContext.currentPopupElement().setWindowInstance(window);

window.close // depricated

or

window.destroyInstance

Regards

Ayyapparaj