添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hi,

I have an input with both value help and suggestion items. I'm applying filters when the suggest event triggers and getBinding("suggestionItems") returns undefined. Snippets of my code are listed below.

XML View

<Input id="search_TerrainLowerMID" suggest="onSuggestion" valueHelpRequest="onSelectf4" placeholder="" showSuggestion="true" showValueHelp="true" type="Text" suggestionItems="{d_TplnrFl>/}">
     <suggestionItems>
          <core:ListItem text="{d_TplnrFl>Key}" additionalText="{d_TplnrFl>Key} {d_TplnrFl>Value}" />
     </suggestionItems>
</Input>

Controller

onSuggestion: function(oEvent) {
                var value = oEvent.getParameter("suggestValue");
                var Filters = [];
                if (value) {
                    Filters.push(new sap.ui.model.Filter("Key", sap.ui.model.FilterOperator.StartsWith, value));
                oEvent.getSource().getBinding("suggestionItems").filter(Filters);

sap.ui.getCore().byId(oEvent.getSource().sId) works, but
oEvent.getSource().getBinding("suggestionItems") returns undefined. For some reason I am unable to get the binding of suggestionItems.

Value help and it's select dialog also work, just not suggestions.

Any help is appreciated, thank you!

Hi Abdul,

Have you found any solution to this one?

If not, are you pushing it under some aggregation? What version on UI5 library are you using?

Regards,

Swaroop

Unable to filter out nulls and zero from different keyfigures , Could you please suggest an approac in Technology Q&A How to get suggestions in Filter without using a Value Help in Technology Q&A Lines of Business (LoBs) and Value Drivers in SAP Signavio Process Insights, discovery edition in Technology Blogs by SAP OnResult change issue in SAP SAC in Technology Q&A Sorting and Filtering are not reliable since the number of hits is too large in Technology Q&A