cancel
Showing results for 
Search instead for 
Did you mean: 

Pop Up Windows - I keep getting Null Pointer Exception.

Former Member
0 Kudos

Hi All,

I need some help here, I am try to develop popup windows using Web Dynpro and while trying to save the instance of the Windown in the Context Attribute with the following code:

  IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("Windown2");
  

  IWDWindow window = wdComponentAPI.getWindowManager().createWindow( windowInfo, true);

  window.setWindowPosition(300, 150);

  window.open();



// EXCEPTION OCCURS AT THE LINE BELOW

  wdContext.currentPopupElement().setWindowInstance(window);

}

I keep getting an Exception at Line where I am saving the Instance, I tried to deploy the examples given in SDN and they have the same CODE and all they work fine, can anyone please suggest or help as to what I should do to get my program working, please I have been working on this for some but with no success.

Best Wishes,

John.

Accepted Solutions (1)

Accepted Solutions (1)

vijayakhanna_raman
Active Contributor
0 Kudos

HI,

Change the cardinality property of the pop up node element to 1:n. If this does not help, mail back.

Regards,

Vijayakhanna Raman

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

<i>wdContext.currentPopupElement().setWindowInstance(window);</i>

Why have u given currentPopupElement? Is the window instance attribute under a node Popup?

If so, try to create a attribute for Window Instance under the root context and change the code as below.

wdContext.currentContextElement().setWindowInstance(window);

Hope this helps.

Regards,

Rathna.