on 01-22-2008 11:07 AM
Hi,
I want to create confirmation dialog box. My all coding is dynamically created. plz help me out.
ya i've create event handlers for it. but getiing the same error....... what can i do?????
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
java.lang.NullPointerException
at com.sap.tc.webdynpro.clientserver.window.ConfirmationDialogDelegate.<init>(ConfirmationDialogDelegate.java:79)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createConfirmationWindow(ClientComponent.java:987)
at com.sap.tut.popup.Email_View.onActionButton_Send(Email_View.java:346)
at com.sap.tut.popup.wdp.InternalEmail_View.wdInvokeEventHandler(InternalEmail_View.java:164)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:711)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:665)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:232)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
The line no 346 represents:
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("ok"),"ok");
IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();
String dialogText = "The email was successfully sent!";
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(
dialogText,controllerInfo.findInEventHandlers("ok"),"ok");
dialog.addChoice(controllerInfo.findInEventHandlers("newEmail"), "new email");
dialog.open();
i wrote this code but it's giving me "java.lang.NullPointerException " error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to have events with names ok and newEmail. Remember it should be exactly same. And in these event methods you can put your code what you want to do on click of ok and new mail.
I think you have not defined these methods.
Change the first line of the code to:
IWDControllerInfo cont = wdControllerAPI.getControllerInfo();
May be your controllerInfo is null.
Edited by: Manoj Kumar on Jan 22, 2008 5:17 PM
Hi Amit,
IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();
String dialogText = "The email was successfully sent!";
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(
dialogText,controllerInfo.findInEventHandlers("ok"),"ok");
dialog.addChoice(controllerInfo.findInEventHandlers("newEmail"), "new email");
dialog.open();
i wrote this code but it's giving me "java.lang.NullPointerException " error.
Have you created the event handlers for ok and newEmail
Regards
Ayyapparaj
This will be helpfull!!
http://help.sap.com/saphelp_nw04/helpdata/en/b0/184540631d6f13e10000000a1550b0/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. Create 2 eventhandlers named "Yes" and "No" under Methods tab.
String dialogtext = "Are you sure you want to delete?";
IWDEventHanlderInfo eventhandler = wdControllerAPI.getViewInfo().getViewController().findInEventhandlers("Yes");
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogtext,eventhandler,"Yes");
eventhandler = wdControllerAPI.getViewInfo().getViewController().findInEventhandlers("No");
dialog.addChoice(eventhandler,"No");
dialog.show();
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Below link contains the tutorial which will help you to create the dialog box dynamically.
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#23 [original link is broken]]
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Following is the usage
IWDConfirmationDialog dialog =wdComponentAPI.getWindowManager().createConfirmationWindow(confirmationText, action, label)
@param confirmationText - the text which is displayed inside of the dialog
@param action - the action which is fired, if the representing button is pressed in the dialog.
@param label - the label of the representing button
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 |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.