In View I use List with items, aber my OData entity not support $top, $skip and $cout params. During request I have error "Not Implemented" and see reques with dafault params: "MessageProcessingLogs('xxxxx')/Attachments?$skip=0&$top=100"
In tag List I use attribut growing="false", but it doesn't help.
I was able to disable the $count parameter using the "defaultCountMode": "None" for model.
How can I disable (change / delete) the $top and $skip parameters?
Request clarification before answering.
Hi Andrey,
Basically, OData models are made to work with such operations like sorting or paging server-side. So many controls (like lists) rely on exactly that -- the model will handle that, and odata model handles this serverside. Imagine a List with Millions of Items => you wouldn't want to get them all from the server if your screen will only fit 20 items.
So "correct" way would be to fix your odata service to support top/skip (count is less important in your situation, as it is merely a hint for the binding, to know how many pages to expect)
assuming, you use this service: https://api.sap.com/api/MessageProcessingLogs/resource you should check with SAP to implement top/skip/count
That being said, there are situations, in which you may not have the possibility to fix the service (or not quickly), and would like to work around it. In your situation, I assume, you only have a relatively small list of attachments (not millions), you could (just as idea, I didn't check syntax or anything)
var oAttachmentModel = new sap.ui.model.json.JSONModel(
"/full/path/to/service/MessageProcessingLogs('xxxxx')/Attachments"
)
yourView.setModel(oAttachmentModel,"attachments")then you bind the lit against the attachment model, which is a json model, and will handle all the paging (if needed) clientside.
<m:List items="{attachments>/} > ... </m:List>Hope, this helps,
Sergei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joseph,
the service is not dumping, it is returning the 501 not implemented error. I think it is quite ok for the service to tell the consumer, that top/skip are not supported rather than silently ignoring them. Returning more than the requested $top elements would probably violate the odata specification (though I didnt check it right now) And ignoring $skip would be semantically wrong: imagine you ask for $top=10,$skip=100 and get the elements 1...10 from server rather than the expected 101..110.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.