Skip to Content
Former Member
Jul 04, 2014 at 07:13 AM

Getting extra copies of list item in a drop-down box.


I have created a drop-down box in a fragment and on after rendering event i have inserted a list item "select" using the below code in the fragment file.


onAfterRendering : function() {

myDropDownBox.insertItem(new sap.ui.core.ListItem({text: "-Select-", key: "None"}),0);




In my scenario I have a button and a panel in my view and on each button click i am calling the fragment and add it to the panel content but the issue I am facing is the list item "select" is getting duplicated on each drop down boxes incrementally with the button click.(Kindly Refer the Screen shot that i have attached).Can anyone suggest me a solution to avoid or remove this extra copies?


Amala Suganya


er1.png (22.3 kB)
er2.png (25.3 kB)
er3.png (25.4 kB)