Hi,
we have a lot of input fields with suggestion functionality on one page.
The suggestion models (aggregations) are loaded on start (initial loading).
How is it possible to load the suggestions on typing or on focus?
I tried following:
<Input id="productInput" type="Text" value="anotherModel" placeholder="Enter Product ..." showSuggestion="true" suggest="handleSuggest"> </Input>
and:
handleSuggest: function(oEvent) { var sTerm = oEvent.getParameter("suggestValue"); var aFilters = []; if (sTerm) { aFilters.push(new Filter("Name", sap.ui.model.FilterOperator.StartsWith, sTerm)); var ObjectListItem.... oEvent.getSource().bindAggregation("suggestionItems", "myModel", oItemTemplate) } oEvent.getSource().getBinding("suggestionItems").filter(aFilters); }
If this is possible, the binding should only processed once.
Or binding should processed onFocus...
Thanks,
Martin