I try to use the api method loadData (data: Array).
The handsontable has two text columns.
I get the JSObject calling:
JSObject jsTable = (JSObject) webView.getEngine().
executeScript("$('#example').handsontable('getInstance')");
I construct the data array like this:
Object[] data = new Object[]{
new Object[]{"s1", "s2"},
new Object[]{"s3", "s4"}};
And call:
jsTable.call("loadData", data);
But get a *netscape.javascript.JSException: RangeError: Range error* exception.
What am I missing?
Later edit: The following, which sets the content of a single cell, works.
Object[] params = {0, 0, "s1"};
jsTable.call("setDataAtCell", params)
Try setting
datato followig instead:For more details on datasources see here:
http://handsontable.com/demo/datasources.html