Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

getCustomData

$
0
0

I added one customData to my Button:

 var customData = new sap.ui.core.CustomData({  key : id
 });
 customData.bindProperty("value", "example/id");
 var button = new sap.ui.commons.Button({  lite : true,  customData : customData,  press : function() {   do_something(this, oController);  }
 });

What's the best way to get this customData in my controller with the help of key? My coding works but isn't nice:

var id = button.getCustomData()[0].getValue();

Thanks for your help.


Viewing all articles
Browse latest Browse all 6178

Trending Articles