Skip to Content
1
Former Member
Oct 05, 2018 at 04:10 PM

How to get selected values from combobox in xml views from sapui5

12879 Views Last edit Oct 05, 2018 at 04:11 PM 2 rev

Hey,

i am using MultiComboBox of xml views. How can i get the selected items without the oEvent ?

This example works fine:

abc: function(oEvent) {

oEvent.getParameters("selected")
oEvent.getParameters("changedItem")

}

But i need to get the Parameters byId. Working with oEvent is for my application not possible. I try it with getSelectedItems.. getItems... getItemByKey...

this.byId("myComboBox").getSelectedItems();

The problem with getSelectedItem is, if i try this:

https://i.gyazo.com/c10e33ba58555f6ff272622fa5d406a1.mp4

.getSelectedItems() are triggered and the Result are 0. If i pick a second item, my change handler get fired and .getselecteditems() give me back one item, my first pick! (postbox1).


But i need like oEvent.getParameters(....) all selected items.

Thanks for your help guys !