Skip to Content
avatar image
Former Member

parameter passing

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();

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 30, 2007 at 09:10 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Aug 30, 2007 at 06:41 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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