on 07-12-2018 10:23 AM
Hi,
I wanted to filter the List of notification using the smartfilter bar with custom controls. We have used annotations here. But here i am not able to get the filters. Kindly suggest if anything is wrong while adding filters.
My View XML code:
<smartFilterBar:SmartFilterBar
id="smartFilterBar"
search="onSearch"
entityType="NotificationHeader"
enableBasicSearch="false">
<smartFilterBar:controlConfiguration>
<smartFilterBar:ControlConfiguration key="NotificationNum" label="Notification">
<smartFilterBar:customControl >
<Input id="Notification" placeholder="Notification"/>
</smartFilterBar:customControl>
</smartFilterBar:ControlConfiguration>
</smartFilterBar:controlConfiguration>
</smartFilterBar:SmartFilterBar>
<List items="{path: '/Notifications'}" id="notifList">
<CustomListItem>
<Panel expandable="true"
expanded="true"
expand="onPanelExpand">
<headerToolbar>
<Toolbar height="3rem">
<Title text="{NotificationNum} {Description}" />
</Toolbar>
</headerToolbar>
<content>
<HBox width="100%">
<HBox width="80%">
<Label text="{i18n>labelWorkOrder}" />
<Text text="{WorkOrder}" />
</HBox>
<FlexBox width="20%" direction="RowReverse" alignItems="End">
<Button text="Button2" />
<Button text="Button1" />
</FlexBox>
</HBox>
<!-- fragment planned tasks table -->
<core:Fragment fragmentName="com.bayer.ph.supercockpit.view.fragments.TasksTable" type="XML"/>
<!-- fragment executed activities table -->
</content>
</Panel>
</CustomListItem>
</List>
In My Controller i defined the method.
onSearch: function(oEvent) {
var aFilters = this.getView().byId("smartFilterBar").getFilters();
this.getView().byId("notifList").getBinding("items").filter(aFilters);
}
Please suggest
Hi Shrikant Naidu,
If you'r using custom control in SmartFilterBar, you also need to handle to build filter.
by default you won't get filter data in getFilters().
var aFilters = this.getView().byId("smartFilterBar").getFilters();
Build filter Change event of Input Control
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.