Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9730

Re: How to bind your service data to a ExactBrowser??

$
0
0

Hi Alex,

 

Find below example..

 

var oModel = new sap.ui.model.json.JSONModel();

oModel.setData(oTestData);

 

var oOutput2 = new sap.ui.commons.TextView();

var oExactBrowser2 = new sap.ui.ux3.ExactBrowser({

attributeSelected: function(oEvent) {

oOutput2.setText(getSelectionMessage(oEvent));

}

});

oExactBrowser2.setModel(oModel);

 

var oAttrTemplate = new sap.ui.ux3.ExactAttribute();

oAttrTemplate.bindProperty("text", "name");

oAttrTemplate.bindProperty("showSubAttributesIndicator", "subVals");

oAttrTemplate.bindProperty("selected", "selected");

oAttrTemplate.attachSupplyAttributes(function(oEvent){

oEvent.getParameter("attribute").bindAggregation("attributes", "attributes", oAttrTemplate);

});

 

oExactBrowser2.bindAggregation("attributes", "/attributes", oAttrTemplate);

 

 

oExactBrowser2.placeAt("sample2");

oOutput2.placeAt("sample2");

 

 

If you have any different data type, if you show that we can help better...


Viewing all articles
Browse latest Browse all 9730


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>