on 05-22-2006 2:51 PM
Hello!
I am facing a peculiar problem in the production system where in the confirmation dialog isn't working and the NullPointerException is getting thrown. For some reason the production server isnt getting the handle for the event even though they are defined and the same piece of code is working fine in both Dev & QA.
Could someone look into the code and let me know what I can do to make it work.
-
try
{
String dialogTxt = "Are you sure you want to ignore changes? ";
IWDEventHandlerInfo eventIgnore = wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("evtIgnoreChanges");
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogTxt,eventIgnore,"Yes");
IWDEventHandlerInfo eventIgnoreCancel = wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("evtIgnoreCancel");
dialog.addChoice(eventIgnoreCancel,"No");
dialog.setWindowPosition(WDWindowPos.CENTER);
dialog.setWindowSize(250,50);
dialog.open();
}catch(Exception ex)
{
wdComponentAPI.getMessageManager().reportException("Error ignoring changes",true);
ex.printStackTrace();
}
-
Thank you very much in advance.
Regards,
Vikram
Hi,
Might be it is because of Your Production system is running in Clustered environment(Load Balancing) ,And Dev and QA not.
I am not sure whether this is the Problem but this is the only difference i can see apart from version problem.
Siddharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Greth,
Did you find a solution for this....
IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("FinalWindow");
// create the u201CAddressbookWindowu201D
IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
// set the WindowPosition on the screen
window.setWindowPosition(300, 150);
// and show the window
window.show();
// Save WindowInstance in Context
wdContext.currentTestElement().setInstance(window);
I am getting a null pointer exception?
any help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vikram,
This May be cause by the version Problem.
Check the SP version for both are equal or not.
Kind Regards
Mukesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vikram,
As far as behavior different on different servers, could you check versions of:
1. Your IDE
2. Your QA and Dev Systems
3. Your production Systems
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use this code:
IWDControllerInfo controllerInfo =
wdControllerAPI.getViewInfo().getViewController();
String dialogText = "Are you sure you want to ignore changes?";
IWDConfirmationDialog dialog =
wdComponentAPI.getWindowManager().createConfirmationWindow(
dialogText,
controllerInfo.findInEventHandlers("evtIgnoreChanges"),
"Yes");
dialog.addChoice(
controllerInfo.findInEventHandlers("evtIgnoreCancel"), "No");
dialog.open();
check if you have created events with name evtIgnoreChanges & evtIgnoreCancel in your view controller.
Regards,
Rajeev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will try the solution though I don't see any difference. Could you elucidate why the below code not work in production but works on my local m/c,dev & QA.
-
IWDEventHandlerInfo eventIgnore = wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("evtIgnoreChanges");
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogTxt,eventIgnore,"Yes");
-
Regards.
Hi,
Did anyone ever find an explanation for this? I have a similar problem whereby a popup window works correctly in DEV and QA but fails in production with a nullPointerException.
My code is failing on
IWDWindowInfo windowInfo =
(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(
"VendorSrchPopUp");
Thanks,
Gareth.
hai ,
try these code
IWDConfirmationDialog dialog =wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,
controllerInfo.findInEventHandlers("eventIgnore"),"Yes");
dialog.setWindowSize(90,90);
dialog.open();
regards,
naga raju
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai,
have you created events for "YES" .
try once by creating a event method name d as you wrote "Yes".
regards,
naga raju
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.