Skip to Content

UI5 - How get data from Model in cache

Hello experts,

Please could you help me to get data from a model?

Look, my model have data in cache but I can´t retrieve it to variable, looks my print:

I tried many differents forms to do it, but not sucess.

Thank you!

exemplo.jpg (39.5 kB)
exemplo.jpg (39.5 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jul 30, 2020 at 06:39 PM

    this.getOwnerComponent().getModel("yourModelName");

    Use this code piece to access your model defined in manifest.Json file.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 30, 2020 at 07:31 PM

    why want to manually get it?

    anyway if you still want to go.....

    it looks like odata model

    you can do this

    yourmodel.getObject("/TAKE THAT HIGHLIGHTED PART AS STRING ")

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.