cancel
Showing results for 
Search instead for 
Did you mean: 

FlightBookin Example: problem with dialog window

MaryM
Participant
0 Kudos

Hi everyone,

I'm trying to run example project Flight Booking.

It shoulf open a pop-up dialog window.

i enter following code to onActionBookFligth:

<.....>

if(wdContext.currentReturn_AvailibilityElement().getType().equals("S"))

{

IWDConfirmationDialog dialog;

String dialogText = "This 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");

dialog.open();

I'm getting a warning with dialog.open

and java.lang.NullPointerException.

Does anybody know what the problem could be?

Thank you!

MaryM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

you have declared the following eventhandlers or not ?

1.Reserve

2.Book

3.Cancel

if not maintain these with the above names...

Regards,

ramesh.

Former Member
0 Kudos

Hi Mary,

Create Event handler name "Reserve" as you mentioned,

Go to Methods tab, click New button, Select the Event Handler then click Next, type "Reserve" and click finish.

similiar to You need to create Book,Cancel Event handler.

That's it

Regards,

P.Manivannan

MaryM
Participant
0 Kudos

Thanks, that helped!

I created the event handlers and it's working.

Regards,

MaryM

Former Member
0 Kudos

Hi Mary,

Did you taken Exactly the Event Handler Names as "Reserve","Book" & "Cancel" ? Check it once.

Did u taken all the 3 Windows in the same Component Controller that you are using for the example project Flight Booking?

With Regards,

Roop Kumar.

Edited by: Roop kumar Annavarapu on Sep 4, 2008 3:30 PM