on 04-25-2018 1:03 PM
Hi Experts,
I have requirement where on selecting the dropdown value from the combobox i have create a lable and button dynamically.
Below is the code which i have used to get the selected value but its working
onSelect:function(){
var item = sap.ui.getCore().byId("combo");
console.log("you have selcted"+item.getSelection());
}
Can somebody help me how to get the selected values and generate the fileds dynamically ?
KR,
Anil
Use the oEvent and you can get the key by var sSelectedKey = oEvent.getSource().getSelectedKey(), or the item by var sSelectedKey = oEvent.getSource().getSelectedItem().
I believe you can even look into the oEvent parameters and get the item from there directly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bind a method to event "change" for the select. WHen you bind a function, include a parameter in the function.
ex: change:onChange(oEvent)
onChange: function(oEVent){
oEvent - This variable will hold selected line/item and other details.
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use binding
never go to control to get the value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.