cancel
Showing results for 
Search instead for 
Did you mean: 

problem creating a confirmationdialog window

Former Member
0 Kudos

hi

i am trying to create a confirmation dialog window

where i need to should a message if the

particular details has not been selected

and i have gone through some of the article

for creating confirmation dialog window

that had not helped , when i trying to

createConfirmationDialogWIn() its giving error

on that particular line where i have declared

createconfirmationwin().

can any one help me ?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();

String dialogText = "Give the message here";

IWDConfirmationDialog dialog =

wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("OK (event name)"),"OK");

dialog.show();

Regards,

Rohan Henry

Former Member
0 Kudos

hi

i have a two tables and if i doesnot select

the first table and just select the second table data

it should shown a confirmation dialog window

as please select the first table for refinement

and so i have created the event handler

but is there need to be any code written there

any suggestions plz .

Former Member
0 Kudos

HI,

Check the first table's lead selection.. and in event of

OnleadSelect of second table write any of the above codes

to display dialogue..

in onLeadSelect action of second table write

ie.. if(wdContext.node<Table1>().getLeadSelection()<0)

{

Write confirmation dialogue code.

}

Regards

LN

Former Member
0 Kudos

Hi Murali,

You have to check for lead selection of first table in second tables onLeadSelection event like wdContext.nodeFirstTableNode().getLeadSelection()==-1 then you have to display the confirmation dialog message.

You need to create a event handler and write the above code in that. You will be calling this event handler in onLeadSelection events of second table.

Revert back for any clarifications.

Regards,

Rajesh A

Former Member
0 Kudos

hi

i have requirement where

i need to get a confitrmation window with two button

YES and NO

if i click YES it should return to the same page

from the confirmationdialog was opened

if i click NO it should call a RFC

iam trying to create confirmation dialog window

but this giving error on that respective line

i have created two event handler

with name YES and NO

can any one help me .

Former Member
0 Kudos

hai Murali,

IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager()

.createConfirmationWindow(dialogText,

IPrivateEmailView.WD_EVENTHANDLER_NO, "NO");

dialog.addChoice(IPrivateEmailView.WD_EVENTHANDLER_YES,

"Yes");

dialog.show();

also refer to the link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/903fed0d-7be4-2a10-cd96-91367073...

Any issues plase let me know

Regards

Sharanya.R

Former Member
0 Kudos

Hi Murali,

For the code what I have given earlier, just add following line after 2nd line i.e. before confirmDialog1.setTitle("Enter dialog box title here");


confirmDialog1.addChoice(controllerInfo.findInEventHandlers("No"),"No");

Your requirement will be solved.

Note: One more event handler of the name u201CNou201D has to be created

Regards,

Rajesh A

Former Member
0 Kudos

Hi Murali,

I think you have not created the corresponding event handler.

Place the following code where you want to call the confirmation dialog.

You need to just edit the confirmation dialog message and title. Also you have to create a event handler what you are giving in the 2nd line i.e. findInEventHandlers("xyz").


IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();

IWDConfirmationDialog confirmDialog1 = wdComponentAPI.getWindowManager().createConfirmationWindow("Enter the dialog box message here.", controllerInfo.findInEventHandlers("xyz"), "ok");
confirmDialog1.setTitle("Enter dialog box title here");

confirmDialog1.open();

Note: In Methods, an event handler of the name u201Cxyzu201D has to be created.

This will solve you problem. Revert back if you have any doubts.

Regards,

Rajesh A

Former Member
0 Kudos

Hi,

Following is a sample code to create confirmation window


	 //Usage: wdComponentAPI.getWindowManager().createConfirmationWindow(confirmationText, action, label)
	  
	  IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();
	  String dialogText = "Your message Goes Here";
	  //controllerInfo.findInEventHandlers("Close") Close event handler should be existing , its case sensitive
	  IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(
	  dialogText,controllerInfo.findInEventHandlers("Close"),"Close");
	  dialog.show();

Regards

Ayyapparaj