无法使用过滤条字段进行搜索

时间:2017-01-12 09:41:46

标签: sapui5

我使用下面的代码在Value搜索帮助中使用三个输入组项过滤数据,如下所示,但是我无法获得这三个字段中给出的数据进行过滤。

        var oFilterBar = new sap.ui.comp.filterbar.FilterBar({
        advancedMode:  true,
        filterBarExpanded: true,
        showGoOnFB: !sap.ui.Device.system.phone,
        filterGroupItems: [new sap.ui.comp.filterbar.FilterGroupItem({ groupTitle: "foo", groupName: "gn1", name: "n1", label: "Orderid", control: new sap.m.Input()}),
                           new sap.ui.comp.filterbar.FilterGroupItem({ groupTitle: "foo", groupName: "gn1", name: "n2", label: "OrderType", control: new sap.m.Input()}),
                           new sap.ui.comp.filterbar.FilterGroupItem({ groupTitle: "foo", groupName: "gn1", name: "n3", label: "Planplant", control: new sap.m.Input()})],

    search: function() {
            // var iOrder = sap.ui.getCore().byId("oFilterBar");
            // sap.m.MessageToast.show("Search pressed '");
                        oTable.bindRows({path: "/OrderDataSet", filters:  [
    new sap.ui.model.Filter( "Orderid",sap.ui.model.FilterOperator.EQ, iOrder )]
    // new sap.ui.model.Filter("Planplant",sap.ui.model.FilterOperator.EQ, iPlan ),
    // new sap.ui.model.Filter("Description",sap.ui.model.FilterOperator.EQ, iDes)] 
      } );
        }

1 个答案:

答案 0 :(得分:0)

这是一个不同的案例,但是,可以帮助你得到你想要的东西

Table A 
id  name
1   raju
2   ramu
2   ramu
3   rakesh