Forum Stats

  • 3,837,252 Users
  • 2,262,243 Discussions


oj-table not rendering on UI

Manikanta_Rendla Member Posts: 9 Green Ribbon

Hi all,

I am unable to display oj-table on UI in oracle JET. Please refer my code.



 Copyright (c) 2014, 2022, Oracle and/or its affiliates.

 Licensed under The Universal Permissive License (UPL), Version 1.0

 as shown at


<div class="oj-hybrid-padding">

  <oj-table id="table" aria-label="Employee Table" data="[[datasource]]" columns='[{"headerText": "Employee Number", "field": "empno"},

                      {"headerText": "Employee Name","field": "ename"},

                      {"headerText": "Job","field": "job"},

                      {"headerText": "Manager","field": "mgr"},

                      {"headerText": "Hire Date","field": "hiredate"},

                      {"headerText": "Salary","field": "sal"},

                      {"headerText": "Commission","field": "comm"},

                      {"headerText": "Dept No","field": "deptno"}]' class="demo-table-container">





 * @license

 * Copyright (c) 2014, 2022, Oracle and/or its affiliates.

 * Licensed under The Universal Permissive License (UPL), Version 1.0

 * as shown at

 * @ignore



 * Your customer ViewModel code goes here


define(['ojs/ojcore','jquery', 'knockout','ojs/ojtable','ojs/ojarraytabledatasource'],

 function(oj,$, ko) {

    function CustomerViewModel() {

    var employeeArray=[{empno:1001,ename:'Test',job:'test job',mgr:123,hiredate:'12-JAN-2003',sal:100,comm:123,deptno:10}];


        this.datasource= new ArrayTableDataSource(







     * Returns an instance of the ViewModel providing one instance of the ViewModel. If needed,

     * return a constructor for the ViewModel so that the ViewModel is constructed

     * each time the view is displayed.


    return CustomerViewModel;



Here I am trying to display static array table data on UI. Output is not getting on UI.

Could any one help me with this.

Thanks in advance




  • You don't say which version of JET you are using, but it appears that you have not provided an argument for the ArrayDataProvider in the callback function of your define block.


    define(['ojs/ojcore','jquery', 'knockout','ojs/ojtable','ojs/ojarraytabledatasource'],
     function(oj,$, ko) {
      function CustomerViewModel() {  ....  }

    Should be

    define(['ojs/ojcore','jquery', 'knockout','ojs/ojarraydataprovider','ojs/ojtable'],
     function(oj,$, ko, ArrayDataProvider) {
      function CustomerViewModel() {  ...  }

    Notice that I have changed the order of the array elements in the first argument of the define block. The order of the array elements must match the order of the callback function arguments. I have also changed you library reference from "ojarraytabledatasource" to "ojarraydataprovider". The DataSource based libraries have been deprecated for over 3 years now and should no longer be used.