Skip to Content
avatar image
Former Member

Regarding POPup window closing.

hi,

I have Two DCs-DC1 and DC2.

Now i have called the dc1 in dc2.actually dc2 is the main dc.Now i have a cancel button in view in

dc1 which is used to close up a popup window.This popup should come in dc2.I have done all the steps to call this view from dc1 to dc2.but this cancel is not working.

I have done thje following steps to make this cancel button work.

1)i have created an event in the interface controler of dc1and a method to fire this event.i have written th folowing codes

public void fireprcupdateevent( )

{

//@@begin fireprcupdateevent()

wdThis.wdFireEventPrcupdateevent();

wdComponentAPI.getMessageManager().reportSuccess("success2");

//@@end

2)I am calling this controller in that view.

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

{

//@@begin onActioncancel(ServerEvent)

wdThis.wdGetC_PRCoutcomeInterfaceController().fireprcupdateevent();

wdComponentAPI.getMessageManager().reportSuccess("success1");

//@@end

}

Inn dc2:

1)I have created an event handler and wrtten this code:

*IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("W_PRCAction_popup");*

** IWDWindow window1 = wdThis.wdGetContext().createVn_popup_createprcElement().getVa_WindowInstance_updateprc();**

** window1.destroy();**

* *

Now iam unable to track the the problem as why this cancel button not performing the closing action.

Now the problem is itsi not showing any error but that cancel button is not working.if we click on it it will not close.

plz help

Edited by: Nisha Nair on Jan 23, 2008 8:16 AM

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 23, 2008 at 06:39 AM

    Hi Nisha,

    Use the same window instance available in the context instead of again using

    " IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("W_PRCAction_popup"); " while destroying the instance.

    regards

    Sumit

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Nisha,

      When u create a window instance to open a popup from some view, store that instance in the context , map that to component controller & in the popup view map ur window instance to the component controller. In popup access that window instance & destroy it.

      regards

      Sumit