Skip to Content
avatar image
Former Member

Trigger button event in Dialog

Hello Experts,

I have placed a fragment with a button inside a dialog.

I am having problems triggering the button event inside the dialog.

Calling the event in the controller isnt being triggered. Just want to know how can i trigger the button event in the dialog.

Note: This isnt about the BeginButton and EndButton.

Thank you.

capture.jpg (52.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 24, 2017 at 07:30 AM

    Hey Justin

    Try this:

    if (!oDialog) { //lazy load/create

    var oDialog = sap.ui.xmlfragment("<project>.<fragmentfolder>.<fragmentname>",<controller to use for the events called from the dialog fragment>);

    this.getView().addDependent(oDialog);

    }

    oDialog.open();

    Hope this helps

    Antonette

    Add comment
    10|10000 characters needed characters exceeded