Skip to Content
0
Oct 18, 2019 at 06:49 PM

Issues with Custom Control in SAPUI5

478 Views Last edit Oct 18, 2019 at 07:33 PM 3 rev

Hi, I am extending a standard button control by adding an event, which is not working. I get error 'Control did not return a class definition from sap.ui.define. - XMLTemplateProcessor'.

Below is the code.

sap.ui.define([],
	function(){
		sap.m.Button.extend("com.xyz.ui5.abc.util.customDate",{
		metaData:{
			properties: {},
			aggregations: {},
			events: {
			          donald: {}
				}
                      },
			"onmousehover": function(){
				this.fireDonald();
			},
		renderer: function(oRm, oControl){
                }
	});
    }
);

and below is what I added in my fragment. But I do not even see the button, forget about the event triggering. May I know what could be wrong with this

<xmlns:paul = "com.xyz.ui5.abc.util">

<paul:customDate text = "Custom Button" donald = "showMessageOnHover"></paul:customDate>