title: SAPUI5 - MVC CRUD Table No data
body: <p>Created a sapui5 MVC CRUD application i need your help.</p>
  
  <ol>
  <li><strong>Why is there No Data in the view?</strong></li>
  <li><strong>Is it a binding problem?</strong></li>
  <li><strong>Is my CRUD.view.xml correct?</strong></li>
  <li><strong>How can i call JSON data on seperate file? sap.ui.resource() or jQuery.sap.getModulePath()</strong></li>
  <li><strong>What are the solutions?</strong></li>
  </ol>
  
  <p><em>CRUD.controller.js onInit function</em> </p>
  
  <pre><code>  onInit: function () {
  
      // JSON data normally on a seperate file
      var oData = {
              ApplicationCollection : [
          {
            "applicationId" : "0001",
            "name" : "John Doe",
            "connectionPath" : "index.html",
            "imagePath" : "Image Path",
            "subApplicationId": "Sub ID",
            "status": "active"
          },
          {
            "applicationId" : "0002",
            "name" : "Jane Doe",
            "connectionPath" : "index.html",
            "imagePath" : "Image Path",
            "subApplicationId": "Sub ID",
            "status": "active"
          },
          {
            "applicationId" : "0003",
            "name" : "Mary Jane",
            "connectionPath" : "index.html",
            "imagePath" : "Image Path",
            "subApplicationId": "Sub ID",
            "status": "active"
          },
          {
            "applicationId" : "0004",
            "name" : "Bob Foo",
            "connectionPath" : "index.html",
            "imagePath" : "Image Path",
            "subApplicationId": "Sub ID",
            "status": "active"
          }
        ]
      };
  
      var oModel = new sap.ui.model.json.JSONModel();
      oModel.setData(oData);
      this.getView().setModel(oModel);
    }
  </code></pre>
  
  <p><em>CRUD.view.xml</em></p>
  
  <pre><code>&lt;mvc:View
     controllerName="sap.ui.crud.view.CRUD"
     xmlns:mvc="sap.ui.core.mvc"
     xmlns="sap.m"&gt;
      &lt;Table
        id="idProductsTable"
        inset="false"
        items="{
          path: '/ApplicationCollection'      
        }"&gt;
       &lt;headerToolbar&gt;
         ...
       &lt;/headerToolbar&gt;
       &lt;columns&gt; &lt;!-- Columns Header --&gt;
         ...
       &lt;/columns&gt; &lt;!-- End of Columns Header --&gt;
       &lt;items&gt; &lt;!-- Column List --&gt;
         &lt;ColumnListItem&gt;
          &lt;cells&gt;
            &lt;Text
              text="{applicationId}" /&gt;
            &lt;Text
              text="{name}" /&gt;
            &lt;Text
              text="{connectionPath}" /&gt;
            &lt;Text
              text="{imagePath}" /&gt;
            &lt;Text
              text="{subApplicationId}" /&gt;  
            &lt;Text 
              text="{status}" /&gt;            
          &lt;/cells&gt;
        &lt;/ColumnListItem&gt;
       &lt;/items&gt; &lt;!-- End of Column List --&gt;
     &lt;/Table&gt;
  
  &lt;/mvc:View&gt;
  </code></pre>