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

Data binding working ... now a question about the variables

$
0
0

I wrote a small app based on the example (below) from sapui5.hana.ondemand.com.

 

My question pertains to anyone else that has data binding working and has tried to do something like the text in red.

 

When stringing together "variables" like the ones highlighted in below ... if I do something similar all I get on the screen is the actual text, ie {Width} instead of the value that should replace that.  If I get rid of the extra text and just have the variable in " " I get the correct value displayed for the "variable"

 

Anyone else ran across this?

 

-Mike

 

var header = new sap.m.ObjectHeader({
  title : "{Name}",
  number : "{Price}",
  numberUnit : "{CurrencyCode}",
  statuses : [
  new sap.m.ObjectStatus({
  text : "Some Damaged",
  state : "Error"
  }),
  new sap.m.ObjectStatus({
  text : "In Stock",
  state : "Success"
  })
  ],
  attributes : [
  new sap.m.ObjectAttribute({
  text : "{WeightMeasure} {WeightUnit}"
  }),
  new sap.m.ObjectAttribute({
  text : "{Width} x {Depth} X {Height} {DimUnit}"
  }),
  new sap.m.ObjectAttribute({
  text : "{Description}"
  }),
  new sap.m.ObjectAttribute({
  text : "www.sap.com",
  active : true,
  press : function () {
  sap.m.URLHelper.redirect("http://www.sap.com", true);
  }
  })
  ]
  });
  


Viewing all articles
Browse latest Browse all 8902

Trending Articles



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