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

Support more then one checkbox

$
0
0

I've checkbox with binding that I need to update ,currenlty I use the following function

but I need to add additional check-boxes,how should I write it better to support more then one CB

 

 

 

 

  handleCheckBoxChange: function(oEvent) {

  var cb = oEvent.getParameter("checked");

  var model = oEvent.getSource().getModel();

  //currently now it support just cb1

  model.setProperty("/cb1", (cb) ? "with" : "without");

 

  },

 

 

  assume that this is my json and I need to update them in the same function

 

 

  var data ={

  cb1 : "with",

  cb2 : "test2",

  cb3 : "test3"

 

  }


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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