Skip to Content

sap.m.input suggestItem suggestionItemSelected event is problem

Hi Experts,

To build the Fiori application of SAPUI 5,
I am trying to realize a suggestion function using suggestItem of sap.m.input.

Therefore, when implementing and executing the suggestionItemSelected event,
I succeed in choosing the first suggestion list,
I have encountered an obstacle in which selectedItem is set to null for the second time.

	<Input id="itxtVkorg" 
		suggestionItems="{ path: '/ZTVKO01Set', sorter: { path: 'Vkorg' } }" 
			<core:ListItem key="{Vkorg}" text="{Vkorg}" additionalText="{Vtext}"/>
	<Text id="txtVkorg" text=""/>

	onSelectItemVkorg: function(oEvent) {
		// var ctl = sap.ui.getCore().byId("itxtVkorg");
		var item  = oEvent.getParameter("selectedItem");
		// var key = item.getKey();
		var text = item.getAdditionalText();
		// sap.ui.getCore().byId("itxtVkorg").setValue(key);

Do you know anything, workaround?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 27, 2017 at 08:04 AM

    Hi Akitaka Shimizu,

    Are you saying when you select your second Item from the suggestion list , the selected value is coming null or you want to null the selected Item .. please can you elaborate your problem



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Viplove

      sorry for the late reply.

      To the contents taught, plus Without using suggestionItems, By using suggestionRows,

      I confirmed that a null value will not be returned.

      Thank you, I was rescued by my reply.