on 05-20-2008 2:44 PM
Hi,
I have created a web dynpro application like this: a first window with a button that calls a popup with user info and telephone number and a button OK.
When I click on OK, the popup window close perfectly, but if I click again on the button of the first page to see again the popup, I get a null pointer exception error:
The initial exception that caused the request to fail, was:
java.lang.NullPointerException
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handle(ApplicationWindow.java:258)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handleWindowEvents(ApplicationWindow.java:239)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:149)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
The popup code:
IWDWindow myPopup = wdContext.currentPopupNodeElement().getPopupAttribute();
if (myPopup == null)
{
IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("PopWin");
myPopup = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
myPopup.setWindowPosition(200, 200);
wdContext.currentPopupNodeElement().setPopupAttribute(myPopup);
wdContext.currentPopupNodeElement().setUserName("thibault");
wdContext.currentPopupNodeElement().setUserTelNumber("01010101");
}
myPopup.show();
The close function for the popup:
IWDWindow window = wdContext.currentPopupNodeElement().getPopupAttribute();
window.hide();
window.destroyInstance();
Has any one got any solution, I would really appreciate your help.
Thibault Schalck
Hi,
Try changing your code like this under popup.
IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("PopWin");
IWDWindow myPopup = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
wdContext.currentPopupNodeElement().setPopupAttribute(myPopup);
myPopup.setWindowPosition(200, 200);
wdContext.currentPopupNodeElement().setPopupAttribute(myPopup);
wdContext.currentPopupNodeElement().setUserName("thibault");
wdContext.currentPopupNodeElement().setUserTelNumber("01010101");
myPopup.show();
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
kiran,
Thank you for the answer, it works perfectly.
Ayyapparaj KV, sorry but with your source code the popup window never re-open...
I'll give full points to Kiran.
Thank you guys for your help, I realy appreciate.
Have a good day.
Thibault Schalck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Change the code to
IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("PopWin");
IWDWindow myPopup = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
myPopup.setWindowPosition(200, 200);
wdContext.currentPopupNodeElement().setPopupAttribute(myPopup);
wdContext.currentPopupNodeElement().setUserName("thibault");
wdContext.currentPopupNodeElement().setUserTelNumber("01010101");
myPopup.show();
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.