Reputation: 11
How can i make (Text Field + three buttons) as default child controls for my custom ui5 control.Whenever my custom control loads, it should render (text field + three buttons) inside my custom control by default.
Regards, Karthik S
Upvotes: 0
Views: 530
Reputation: 1
in events: onholdevent": {},
in agrredation:
"button": {
type: "sap.m.Button",
multiple: false
},
in onIt:
this.setAggregation("button", new sap.m.Button({
text: "On Press",
press: function() {
that.fireOnholdevent(this);
}
}));
in render : oControl.getAggregation("button");
main thing is the this refrence , through 'this' you can get in controller which button is clicked .In the view just give the event name and refrence it in controller.
Upvotes: 0