Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <table id="table" summary="Department List" aria-label="Departments Table"
       data-bind="ojComponent: {component: 'ojTable', 
                                data: datasource, 
                                columnsDefault: {sortable: 'disabled'}, 
                                columns: [{headerText: 'Id', 
                                           field: 'DeptId',
                                           sortable: 'enabled'},
                                          {headerText: 'Name', 
                                           field: 'DeptName'},
                                          {headerText: 'Location Id', 
                                           field: 'LocationId'},


                @import url('//');


  // Path mappings for the logical module names
  paths: {
    'knockout': '//',
    'jquery': '//',
    "jqueryui": "//",
    "jqueryui-amd": "//",

    "promise": "//",
    "hammerjs": "//",
    "ojdnd": "//",
    "ojs": "//",
    "ojL10n": "//",
    "ojtranslations": "//",
    "text": "//",
    "signals": "//"

  // Shim configurations for modules that do not expose AMD
  shim: {
    'jqueryui-amd': {
      exports: "$",
      deps: ['jquery']
    'jquery': {
      exports: ['jQuery', '$']
  config: {
    ojL10n: {
      merge: {
        //'ojtranslations/nls/ojtranslations': 'resources/nls/menu'
        // The following addes en-US to the r.js bundle
        //'ojtranslations/nls/ojtranslations': '../../oj/resources/nls/en-US/localeElements'

 'ojs/ojtable', 'ojs/ojarraytabledatasource'
], function(ko, oj, $) {
  'use strict';

  var ViewModel = function() {
     var self = this;

    var deptArray = [{DeptId: 1001, DeptName: 'ADFPM 1001 neverending', LocationId: 300},
        {DeptId: 556, DeptName: 'BB', LocationId: 200}];
    self.datasource = new oj.ArrayTableDataSource(deptArray, {idAttribute: 'DeptId'});
             console.log("this is a test");
  ko.applyBindings(new ViewModel());