Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ErrorStack Trace while creating DialogBoxes

Hi all,

I am trying to implement the pdf (Handling Transactions with BAPIs in Web Dynpro)It is giving an error while creating DialgBoxes

The error is

Error stacktrace:

java.lang.NullPointerException

at com.sap.tc.webdynpro.clientserver.window.ConfirmationDialogDelegate.<init>(ConfirmationDialogDelegate.java:58)

at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createConfirmationWindow(ClientComponent.java:926)

at com.sap.tut.webdynpro.tutorial.FlightBookingView.onActionBookFlight(FlightBookingView.java:169)

at com.sap.tut.webdynpro.tutorial.wdp.InternalFlightBookingView.wdInvokeEventHandler(InternalFlightBookingView.java:280)

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.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:100)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:299)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:635)

The code of BookFligh method is

 public void onActionBookFlight(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin onActionBookFlight(ServerEvent)
	wdContext.currentBapi_Flight_Checkavailibility_InputElement().setAirlineid(wdContext.currentBooking_DataElement().getAirlineid());
	wdContext.currentBapi_Flight_Checkavailibility_InputElement().setConnectionid( wdContext.currentBooking_DataElement().getConnectid());
	wdContext.currentBapi_Flight_Checkavailibility_InputElement().setFlightdate( wdContext.currentBooking_DataElement().getFlightdate());
    wdThis.wdGetFlightBookingCustController().executebapi_CheckAvailibility();
    if(wdContext.currentReturnElement().getType().equals("S"))
    {
		IWDConfirmationDialog dialog;
		String dialogText="The Flight Is available";
		dialog=wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,
		                 wdControllerAPI.getControllerInfo().findInEventHandlers("Reserve"),"Reserve Flight");
		dialog.addChoice(wdControllerAPI.getControllerInfo().findInEventHandlers("Book"),"Book Flight");
		dialog.addChoice(wdControllerAPI.getControllerInfo().findInEventHandlers("Cancel"),"Cancel Flight");
    	dialog.open();
    }
    else
    {
		wdComponentAPI.getMessageManager().reportSuccess("Type val is"+wdContext.currentReturnElement().getType());
		wdComponentAPI.getMessageManager().reportWarning("The Flight is not booked"+
		                                                 wdContext.currentReturnElement().getMessage());
    }
    
    //@@end
  }

Can anyone tell me where the error is???

Regards

Padma

Former Member
Former Member replied

Padma,

wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("<b>OnActionReserve</b>"),"Reserve Flight");

dialog.addChoice(wdControllerAPI.getControllerInfo().findInEventHandlers("<b>OnActionBook</b>"),"Book Flight");

dialog.addChoice(wdControllerAPI.getControllerInfo().findInEventHandlers("<b>OnActionCancel</b>"),"Cancel Flight");

dialog.open();

}

else

{

wdComponentAPI.getMessageManager().reportSuccess("Type val is"+wdContext.currentReturnElement().getType());

wdComponentAPI.getMessageManager().reportWarning("The Flight is not booked"+

wdContext.currentReturnElement().getMessage());

}

//@@end

}

Regards,

Murtuza

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question