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

Re: How dynamically create UI element in front-end or back-end

$
0
0

Thanks! Radio button successfully dynamically bind to radio button group now.

 

 

Now i am facing an additional problem.

Before binding radio button I need to judge whether the binging proerty is empty or not.

I tried follwoing way to retrieve the property but faield. 

 

 

1. var oQuality = this.getModel().getProperty

2. var oQuality = this.getView().getProerty

 

 

could you please take look below snippet and give me some hints ?  thanks alot!

 

 

 

 

  onProductSelected: function(oEvent) {

  var oKey = oEvent.getParameter("selectedItem").mProperties.key;

  var oKeys = oKey.split("_");

  var oView = this.getView();

  oView.unbindElement();

  oView.bindElement({

  path: "/QIEItemSet(InboundDeliveryUUID=guid'"

  + oKeys[0] "')",

  events: {

  dataRequested: function(oEvent) {

  oView.setBusy(true);

  },

  dataReceived: function(oEvent) {

  oView.setBusy(false);

  }

  }

  });

  this.byId("ProductInputNum").setValue(0);

/****dynamically binding radio button*/

     var oData = this.getModel().getProperty("/" + "QualityDescription1"); 

 

  var rdb1 = new sap.m.RadioButton({

  text : "{QualityDescription1}",

  selected : false

  });

  this.getView().byId("radiobuttongroup").removeAllButtons();

  this.getView().byId("radiobuttongroup").addButton(rdb1);

/****dynamically binding radio button*/

  },


Viewing all articles
Browse latest Browse all 8572

Trending Articles



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