Skip to Content

get selection of List Items

Dec 01, 2016 at 09:16 AM


avatar image


i create a list with static content and want to get the selected item, but never the event handler was called. I hope you can tell what i do wrong.

The code of the list:

<List headerText="Individualisierung" id="colorSelection" selectionChange="onselectionChange">
  <InputListItem label="Giftgrün" id="x1">
	<RadioButton groupName="GroupInputListItem" class="colorLime"/>
  <InputListItem label="Waldgrün" id="x2">
	<RadioButton groupName="GroupInputListItem" class="colorGreen"/>
  <InputListItem label="Dunkelblau" id="x3">
	<RadioButton groupName="GroupInputListItem" class="colorBlue"/>
  <InputListItem label="Türkis" id="x4">
	<RadioButton groupName="GroupInputListItem" class="colorAqua"/>
  <InputListItem label="Orange" id="x5">
	<RadioButton groupName="GroupInputListItem" class="colorOrange"/>

The code of the method:

onSelectionChange : function() {

Thanks in advance!


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Manne Prasad Dec 05, 2016 at 09:23 AM

Hello Tim,

For selectionChange Event set mode to "singleSelectMaster" in the list tag.

<List headerText="Individualisierung"  id="colorSelection" selectionChange="onselectionChange" mode="SingleSelectMaster">

now the event selectionChange gets triggered. Inside the event handler you can get the selected item by Event parameters.

onselectionChange: function(oEvent){ console.log(oEvent.getParameters("selectedItem")); }
10 |10000 characters needed characters left characters exceeded