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
Former Member replied

HI

Would this help?

Example

Please let us know if you need some explanation

-D

0 View this answer in context

Helpful Answer

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