Bài đăng

Hiển thị các bài đăng có nhãn filter

[sapui5] [model] Set Operation of Odata model to client side

Hình ảnh
Hello, You can use the  operation mode  parameter for the v2.ODataModel. This parameter can be set at the model level  (see the constructor defaultOperationMode parameter) or at  binding level  (see the constructor operationMode parameter). Based on this parameter, the model fetches data differently: Server mode : data is fetched as needed (paging, sorting and filtering is done on the server side; each sorting, filtering or paging operation triggers a request). Client mode : the whole collection is requested initially. All sorting, filtering and paging operations are done on the client. Auto : a combination (based on other model settings). To read more about the operation mode, check out the corresponding documentation:  OperationMode . If you want to use this only on one list, then you should you the binding variant: <List items = "{path: '/Collection', parameters: {operationMode: 'Client'}}" > <StandardListItem title = ...

[sapui5] List binding remove application filter

Hi, I've search sapui5 API can find the function to remove all existing filter from sapui5 List Binding . Hence I need to find a workaround to reset the list binding (used in resetting search field). We have no function yet, so we need to empty the filter array by manual assignment: oListBinding.aApplicationFilters = []; oListBinding.sFilterParams = undefined; oListBinding.refresh(); We have some more method to empty an array, you can find here . p/s: Update on 02 Nov, 2017: to remove the filters, you just need to pass an empty array to the function: oListBinding.filter([]); This worked in SAPUI5 1.44 ---V---

Implement Search field with case-INSENSITIVE by SAP UI5

Hello guys, Continue to read if you're sapui5 developer, or you work closely with UI development. At the time I write this post, SAP UI5 and Odata does not support filter with case sensitivity. Odata provide some filter parameter that help you to filter with case-INSENSITIVe. However, you hardly modify the URI of ODATA service in your font end SAP UI5 code. Most of us use API provided from SAP , we only provide the parameter to API function, then let the API from SAPUI5 library handle the ODATA service URL. In short, I mean we cannot, or hardly, modifying the odata GET request as we want, but use the standard API instead. Return to the main topic, we need to write a function to filter the ODATA get request so that we get the returned data filtered as the way we want (filter with case-INSENSITIVE). For example: you type " test " in the search field, then you should get the results with all the entries containing "test", or "Test", or "TES...