Skip to Content
avatar image
Former Member

SAPUI5 methods

Hi,

Where I can find documentation about methods like getBindingContext(), setView() or getModel(). When I'm reading API Reference I can't find information about this.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Dec 03, 2016 at 05:22 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Dec 03, 2016 at 12:55 PM

    Please look for the SAPUI5 Community Topic Page for your first choice. Community on the black header bar, Browse the Community, then put SAPUI5 in the text box to search. I recommend you bookmark the CTP for future reference. You should also be aware that the appropriate Primary Tag for SAPUI5 questions is "UI development toolkit for HTML5". A change to that tag to change it to SAPUI5 has been approved, but not yet implemented, but for now use the tag I changed in your question.

    Regards, Mike (Moderator)
    SAP Technology RIG

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 11, 2017 at 05:32 AM

    Hello Kacper Borkowski,

    Please go through the SAPUI5 demo kit documentation.It has detailed information on the model methods.

    getBindingContext() - method is used to find out what is binded to the control element.For example if you have binded an odata model to a list,using this method, you can find out the details of what data is binded (if it is even binded or not).

    setView() - method is used to set a particular view to the controller or for the model.

    getModel() - method is used for getting the previously set model for the view or the control element.

    Hope this helps,

    Regards.Arjun Biswas

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 19, 2017 at 01:36 PM

    Best approach for this is to debug your application with Chrome or FF. The debugger's inspect feature will display a selected object's methods and properties and you can play around with it. However, I understand that there are times when API documentation is not enough and you need to rely on coding by example. Have a look at SAP projects on GitHub. If you cannot not figure out your ways around SAPUI5, your last resort is to analyse the source codes. Download the SAPUI5 SDK and look for each object's source you are interested under the resources folder for a file with the same name and sufix dbg.js. That file will be in uncompressed format which will be human readable. I have found at times some useful comments and code using the methods I was looking for.

    Add comment
    10|10000 characters needed characters exceeded