Skip to Content

get selection of List Items


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!


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    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")); }
    Add comment
    10|10000 characters needed characters exceeded