on 10-19-2010 10:03 AM
Hi,
Iam trying to create a confirmation Pop up window on the click of a "Save" button. I followed the procedure mentioned in the following link :
http://wiki.sdn.sap.com/wiki/display/WDJava/CreatingConfirmationDialogBoxinWebDynproJava
But when i click on Save button, iam getting this exception -
com.sap.tc.webdynpro.services.exceptions.CreationFailedException: add of choice failed! (eventhandler: null)
at the following line :
IWDConfirmationDialog confDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(
/* dialogText, evtHndlr, buttonText OR evtHndlr.getName() */
wdComponentAPI.getTextAccessor().getText("GoHomeConfQuestion"),
evtHndlr,
wdComponentAPI.getTextAccessor().getText("GoHomeConfCancel")
Can any one please suggest me where iam going wrong and what is the cause of this exception?
Thanks in advance.
Regards,
Maggie
Hi,
Please make sure that you have created event handlers for each button.
From the Wiki, ensure event handler with name GoHome_Canceled is created.
Regards,
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sample code
dialog part
IWDConfirmationDialog createDialog=wdComponentAPI.getWindowManager().createConfirmationWindow("You are going to Submit. Are you sure?",ctrl.findInEventHandlers("create"),"YES");
createDialog.addChoice(ctrl.findInEventHandlers("doNothing"),"NO");
createDialog.open();
you have to create event not the metod
public void create(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//your action
}
public void doNothing(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin doNothing(ServerEvent)
//your action
//@@end
}
Hi Maggie.
I'm Facing the same error, I follow the same tutorial and all my event handler are creted, the message in the pool, and all the name are correct, but, I still have no Idea how to show the pop.... Actually I'm working in NWDS 7.2...
will any please tell me how this could be resolve?
thanks
Walex
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.