on 2024 Nov 05 4:28 PM
Hi experts,
I'm a bit lost in the methodology of Fiori elements applications using the RAP model with an OData v4 service.
Backend-wise, I have a full CDS model (with parent/child entities) that are exposed as an OData v4 service. Frontend-wise, I have a Fiori elements application with a controller extension.
What I am looking to do, is to have the labels of a my child attributes be determined dynamically based on the value of another attribute in the OData entity. Question is: how can I access the value of the attributes in my controller extension?
I figured out that in the events that can be overwritten (onInit, onBeforeRendering, onAfterRendering), the OData call hasn't occurred yet, so I attached function _onDataReceived to the dataReceived event of the Model (oModel.attachEventOnce("dataReceived", this._onDataReceived.bind(this)); ) in the onBeforeRendering function.
This method is being called and I can see that the OData call is performed before it. I am expecting the actual data in aResults (code below), but it is empty.
Request clarification before answering.
User | Count |
---|---|
75 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.