cancel
Showing results for 
Search instead for 
Did you mean: 

parameter passing

Former Member
0 Kudos

Hi All,

I need to open a confirmation dialog with user.

In the simplest style, a confirm event is triggered.

I've now change the event somewhat and it needs to takes in some parameters.

So, when opening up the dialog, how do one pass in the parameters in this case.

I've my dialog opening function listed below.

Thanks,

yung siu wai

public void openDialogWindow( com.sap.tc.webdynpro.progmodel.repository.IWDControllerInfo controllerInfo, java.lang.String dialogText, java.lang.String confirmEventName, java.lang.String confirmText, java.lang.String abortEventName, java.lang.String abortText )

{

//@@begin openDialogWindow()

IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow( dialogText, controllerInfo.findInEventHandlers(confirmEventName),confirmText);

if (abortEventName != null) dialog.addChoice(controllerInfo.findInEventHandlers(abortEventName), abortText);

dialog.show();

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Try this

IWDEventHandlerInfo handler = wdComponentAPI.getControllerInfo().findInEventHandlers("evtHandler");
    handler.setAttributeValue("param_name",value);
    
	IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow( dialogText,handler ,confirmText);
	if (abortEventName != null) dialog.addChoice(controllerInfo.findInEventHandlers(abortEventName), abortText);
	dialog.show();
	

Regards

Chaitanya.A

Former Member
0 Kudos

Hi Chaitanya,

I did tried that when I inspected the handler api.

May be I did something wrong , it complaint I didn't have the attributes when I try to use setAttribute.

Anyway, I moved my parameters to the onPlug.

Thanks,

Yung siu wai

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi! Siu,

From your post it's not clear, what exactly you wanted to do with the Confirmation Dialog Box?Could you please give us your requirement ?

Regards,

Mithileshwar

Former Member
0 Kudos

Hi Mithileshwar ,

Ususally with a dialog you attach a handler to a button and there is no where you specify parameters for that handler.

So far so good as all my handlers take in no parameters.

Now that I've one handler with two parameters, so do you know where in my existing function can I add these two parameters to my handler.

Thanks and Regards,

Yung siu wai