Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

bind check-box text

I want to implement data binding checkb-ox but instead of putting value for true or false

to put text in the json file,how should I do that ?

for example insead of using it like following

var config = {

  cb1: true,

  rb1: false,



  if the checkbox is true put the following text on it (aaa) and also when I open the UI if I have value "aaa" the textbox should be selected and if I've

  "bbb" the checkbox should be unselect.


  var config = {

  cb1: "aaa",

  rb1: false,



  the binding is:



   var oCB = new sap.ui.commons.CheckBox({

  text : 'I want ',

  tooltip : 'Newsletter ',

  checked : "{/cb1}",

  change : handleCheckBoxChange


  Example will be very helpful

Former Member


Would this help?


Please let us know if you need some explanation


0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question