Filtering just a sap.m.List in Client Side SAPUI5

后端 未结 2 1328
南笙
南笙 2021-01-16 19:51

I\'m looking for filtering just a List in Client Side and let other like table etc etc filtering in server side Is there any options to add to the list to filter in clien

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-16 20:12

    Serban is correct. I just add one sample code so that you can refer when you want to change all your operation on model to client mode. I looks like this:

    var oModel = models.createODataModel({
            urlParametersForEveryRequest: [
                "sap-server",
                "sap-client",
                "sap-language"
            ],
            url: this.getMetadata().getConfig().serviceUrl,
            config: {
                metadataUrlParams: {
                    "sap-documentation": "heading"
                },
                defaultOperationMode: sap.ui.model.odata.OperationMode.Client
            }
    

    Pay attention to the property defaultOperationMode; you can change the mode by the property.

    Cheer!

提交回复
热议问题