public JSONObject getOptions() { JSONObject json = new JSONObject(); json.put("fnRowCallback", new JSONLiteral(String.format("fnRowCallback()"))); return json; }
private void addModuleToConfig(JSONObject config, String name, JavaScriptModuleConfiguration module) { JSONObject shimConfig = config.in("shim"); boolean nestDependencies = false; String exports = module.getExports(); if (exports != null) { shimConfig.in(name).put("exports", exports); nestDependencies = true; } String initExpression = module.getInitExpression(); if (initExpression != null) { String function = String.format("function() { return %s; }", initExpression); shimConfig.in(name).put("init", new JSONLiteral(function)); nestDependencies = true; } List<String> dependencies = module.getDependencies(); if (dependencies != null) { JSONObject container = nestDependencies ? shimConfig.in(name) : shimConfig; String key = nestDependencies ? "deps" : name; for (String dep : dependencies) { container.append(key, dep); } } }
.put("aLengthMenu", new JSONLiteral("[[" + getRowsPerPage() + "," + (getRowsPerPage() * 2) + "," + (getRowsPerPage() * 4) + "],[" + getRowsPerPage()