Get access or point to SAP UI5 control

SAP HANASAPSAP Basis

You are making a small mistake over here. Method addContent is a method available for UI5 controls not over normal DOM elements.

If you want to gain a reference to the button then you can try with the below snippet:

this.getView().byId("<id of the toolbar>").addContent(new sap.m.Button({
   <property>:<value>
}));
raja
Published on 18-Dec-2017 13:00:23
Advertisements