Skip to Content
avatar image
Former Member

why i can't get local json data? always error :Uncaught #<Object>

i start learning SAPUI5, and i just follow the tutorials of Demo Kit ( data binding), till step12, the same code ,but console an error Uncaught #<Object>,why?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Apr 15, 2016 at 09:49 AM

    Hey Sennia

    try this:

    getQuestionLink: function() { var sRootPath = jQuery.sap.getModulePath("YourAppName/ID/namespace"); return sRootPath + "/content/Question.json"; }, createNewQuestionModel: function(){ this.oQuestions = new JSONModel(this.getQuestionLink()); } ,

    My folder structure:

    Regards,

    Samuel


    Add comment
    10|10000 characters needed characters exceeded

  • Apr 15, 2016 at 10:12 AM

    Hi Sennia,

    In all probability there would be error in the view. Can you please check the view for parsing errors in WebIDE or in any other xml validator tool.

    BR.

    Add comment
    10|10000 characters needed characters exceeded