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

Got a problem while using event of radiobutton in controller

$
0
0

Hi ,

Actually i am learner of UI5,While creating a radio button in MVC architecture i got some problem.

I am trying to get an alert message with the text for which the selected the Radio button.Actualy i am getting an error in conroller

 

Pleae find the code i created

 

view.js

 

var male = new sap.m.RadioButton({

  text : "Hii",

  tooltip :'hii',

  group : "gender",

  select : function(oEvent)

  {

  oController.alere();

  }

  });

 

  var female = new sap.m.RadioButton({

  text : "fem",

  tooltip :'hii',

  group : "gender",

  select : function(oEvent)

  {

  //alert ("hii"+female.getText());

  oController.alere();

  }

  });

 

  var hox = new sap.m.HBox({

  items : [male,female]

  });

 

 

  return hox;

 

=========================================================

 

controller.js

 

alere : function  (oEvent)

  {

  alert (oEvent.getSource.getText());

 

  //alert (oEvent

  // );

  }


Viewing all articles
Browse latest Browse all 9760

Trending Articles



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