Skip to Content

Add Custom Footer Button To sap.m.TableSelectDialog

Anyone know of a way to add a custom button in the footer of a sap.m.TableSelectDialog object?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 18, 2017 at 05:56 PM

    Answer..

    valueTableSelectDialog._oDialog.mAggregations.beginButton.oParent.addButton(new sap.m.Button({
    				text: 'New',
    				press: function() {
    					alert("1");
    				}
    			}));
    
    
    valueTableSelectDialog._oDialog.mAggregations.beginButton.oParent.addButton(new sap.m.Button({
    				text: 'New2',
    				press: function() {
    					alert("2");
    				}
    			}));
    
    
    
    Add comment
    10|10000 characters needed characters exceeded

  • Aug 18, 2017 at 02:56 AM

    Try to manually add the buttons to the footer toolbar aggregation.

    When I looked into the dialog which opens the toolbar, it provides options to add the toolbar buttons. You need to ensure that agrregation binding for the dialog toolbar is done. Check in the controller to add it through the code.

    Refer to the dialog code on how to add buttons to the dialog:

    https://sapui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.DialogConfirm/preview

    Check how button submit is added to dialog.

    Add comment
    10|10000 characters needed characters exceeded