cancel
Showing results for 
Search instead for 
Did you mean: 

Blank window displayed

Former Member
0 Kudos

Hi,

I am developing an application on NWDS 7.1.

In the application a main window displays a modal window on some user action. When the user closes the modal window, the main window does not get displayed. Only a blank is shown. I can see the main window only on refresh the screen.

Do I need to add any extra code for 7.1?

Regards,

Rahul

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member751941
Active Contributor
0 Kudos

Hi Rahul,

Check this thread.

Regards,

Mithu

Former Member
0 Kudos

hi,

I understand you are using a modal window, hence you must have created another window which will act as the modal window. Now in the main window(view of the window), you may have a button which will create a modal window. This button will be in the view of the main window. Now add the code int he method in the component controller. and call this method in the onActionCreateModalWindow action created in the view of the main window. :

First declare,


//@@begin others
  IWDWindow modalWindow; 
  //@@end

Then


 public void createModalWindow( )
  {
    //@@begin createModalWindow()
    
    //creating the window
    IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows("NewPopWindow");
       modalWindow = wdComponentAPI.getWindowManager().createModalWindow(winInfo);
    
    //display window in centre
    modalWindow.setWindowPosition(WDWindowPos.CENTER);
    modalWindow.setTitle("Modal Window");
    modalWindow.setWindowSize(400,100);
    
    //opening the window
    modalWindow.show();
    
    //@@end
  }  

Now, create a button in the view of the modal window. Say Back(to return to the main window).Add the coding in the method created int he component controller and call this method, in the onActionBack method in the view of the modal window.:



public void destroyModalWindow( )
  {
    //@@begin destroyModalWindow()
	
    modalWindow.destroyInstance();
    //@@end
  }
 

regards,

pinki

Former Member
0 Kudos

Hi Pinki,

As I had mentioned earlier I am working in 7.1.

I had done the same thing as you have mentioned. But it does not work.

After destroying the modal window instance, I simply get a blank screen.

Regards,

Rahul

Former Member
0 Kudos

No, you don't need extra code. What are you doing in the action handler for the close button?

Armin

Former Member
0 Kudos

Hi Armin,

In the close button's action I trigger an event

wdThis.wdGetApptCompController().onApptConfirmDeleteEvent(true, status);

In the event handler I have the following code:

IWDWindow confirmDeleteWindow = wdContext.currentPopUpElement().getApptConfirmDeleteWindow();

confirmDeleteWindow.destroyInstance();

Regards,

Rahul