function parseDatacolumn(DATACOLUMN) {
  return {
    title: DATACOLUMN.getAttribute('title'),
    data: DATACOLUMN.getAttribute('value'),
    type: DATACOLUMN.getAttribute('type'),
    checkedTemplate: DATACOLUMN.getAttribute('checkedTemplate'),
    uncheckedTemplate: DATACOLUMN.getAttribute('uncheckedTemplate'),
    readOnly: DATACOLUMN.getAttribute('readOnly'),
    source: DATACOLUMN.getAttribute('source') ? window[DATACOLUMN.getAttribute('source')] : void 0
  }
}

Toolkit.register(this, {
  instance: null,
  ready: function () {
    var DATACOLUMNs = this.querySelectorAll('datacolumn');
    var columns = [];
    for (var i = 0, ilen = DATACOLUMNs.length; i < ilen; i++) {
      columns.push(parseDatacolumn(DATACOLUMNs[i]));
    }

    var options = {
      data: window[this.datarows],
      columns: columns,
      minRows: 5,
      minCols: 6,
      minSpareRows: 1,
      autoWrapRow: true,
      colHeaders: true,
      contextMenu: true
    };

    jQuery(this.$.htContainer).handsontable(options);

    this.instance = jQuery(this.$.htContainer).data('handsontable');
  },
  publish: {
    getData: function () {
      return this.instance.getData();
    }
  }
});
@@ -38,27 +38,47 @@
 %7B%0A  
-return %7B%0A    title:
+var obj = %7B%7D;%0A%0A  for (var i = 0, ilen =
  DAT
@@ -85,28 +85,25 @@
 ACOLUMN.
-getA
+a
 ttribute
 ('title'
@@ -98,29 +98,43 @@
 bute
-('title'),%0A    data: 
+s.length; i %3C ilen; i++) %7B%0A    obj%5B
 DATA
@@ -140,28 +140,25 @@
 ACOLUMN.
-getA
+a
 ttribute
 ('value'
@@ -153,28 +153,20 @@
 bute
-('value'),%0A    type:
+s%5Bi%5D.name%5D =
  DAT
@@ -173,28 +173,25 @@
 ACOLUMN.
-getA
+a
 ttribute
 ('type')
@@ -186,87 +186,215 @@
 bute
-('type'),%0A    checkedTemplate: DATACOLUMN.getAttribute('
+s%5Bi%5D.value %7C%7C true;%0A  %7D%0A%0A  obj.data = obj.value;%0A  delete obj.value;%0A%0A  obj.readOnly = obj.readonly;%0A  delete obj.readonly;%0A%0A  obj.checkedTemplate = obj.checkedtemplate;%0A  delete obj.
 checked
-T
+t
 emplate
-'),%0A    
+;%0A%0A  obj.
 unch
@@ -410,35 +410,15 @@
 late
-: DATACOLUMN.getAttribute('
+ = obj.
 unch
@@ -426,173 +426,64 @@
 cked
-T
+t
 emplate
-'),%0A    readOnly: DATACOLUMN.getAttribute('readOnly'),%0A    source: DATACOLUMN.getAttribute('source') ? window%5BDATACOLUMN.getAttribute('source')%5D : void 0%0A  %7D
+;%0A  delete obj.uncheckedtemplate;%0A%0A  return obj;
 %0A%7D%0A%0A

read all the datacolumn attributes