Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3353

Re: Change/Enhance Generated Gateway Metadata

$
0
0

Hello Janev;

 

Make sure when you get the metadata of your service you don't see the attribute sap-filterable=false for the field that you want to do a filter on.  Although when I first tried this smartfilterbar was not working for me without the value sap-filterable = true, but it seems to now work as expected without this attribute.  We're using 1.28.8 of the UI5 library.

 

Here is my code that I use for the filter bar control - I use the control configuration for the controls so I can exactly control how the data I want to be displayed for each help.  My recommendation is to play with local metadata values in WebIde and exclude all other entity sets until you've this functional then compare what has changed.  I did spend a lot of time on it, but now everything seems to work as documented.

 

<sfb:SmartFilterBar id="sfbProductMgr"

               entityType="ProductManager"

               filterBarExpanded="true"

               showClearButton="true"

               search="onSearch">

               <sfb:controlConfiguration> 

                   <sfb:ControlConfiguration

                       groupId="_BASIC"

                       index="0"

                       key="SalesOrg"

                       visibleInAdvancedArea="true"

                       controlType="input"       

                       filterType="single"

                       preventInitialDataFetchInValueHelpDialog="false">       

                       <!-- controlType = auto,input,dropDownList,date

                            filterType = auto,single,multiple, interval

                       -->

                   </sfb:ControlConfiguration>

                   <sfb:ControlConfiguration

                       groupId="_BASIC"

                       index="1"

                       key="ProductHierarchy"

                       visibleInAdvancedArea="true"

                       controlType="auto"       

                       filterType="auto"

                       preventInitialDataFetchInValueHelpDialog="false">       

                       <!--<sfb:customControl> - uses the annotation - keep for record

                             <Select items="{/ProductHierarchies}" selectedKey="{lclData>/Prodh}">

                               <core:Item key="{Prodh}" text="{Vtext}"></core:Item>

                                      </Select>

                       </sfb:customControl>-->

                   </sfb:ControlConfiguration>

                   <sfb:ControlConfiguration

                       groupId="_BASIC"

                       index="2"

                       key="MaterialGroup"

                       controlType="auto"

                       filterType="auto"

                       visibleInAdvancedArea="true">

                   </sfb:ControlConfiguration>

                   <sfb:ControlConfiguration

                       groupId="_BASIC"

                       index="3"

                       key="ManagerFirstName"

                       controlType="auto"

                       filterType="auto"

                       visibleInAdvancedArea="true">

                   </sfb:ControlConfiguration>

                   <sfb:ControlConfiguration

                       groupId="_BASIC"

                       index="4"

                       key="ManagerUsername"

                       controlType="auto"

                       filterType="auto"

                       visibleInAdvancedArea="true">

                   </sfb:ControlConfiguration>

               </sfb:controlConfiguration>

           </sfb:SmartFilterBar>


Viewing all articles
Browse latest Browse all 3353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>