if (!obj.isNull(PROPERTY_COLUMNS)) {
JSONArray columns = obj.getJSONArray(PROPERTY_COLUMNS);
for (int i = 0; i < columns.length(); i++) {
JSONObject column = columns.getJSONObject(i);
DataListColumn dataListColumn = new DataListColumn();
if (column.has(PROPERTY_NAME) && !column.isNull(PROPERTY_NAME)) {
dataListColumn.setName(column.getString(PROPERTY_NAME));
}
if (column.has(PROPERTY_LABEL) && !column.isNull(PROPERTY_LABEL)) {
dataListColumn.setLabel(column.getString(PROPERTY_LABEL));
}
if (column.has(PROPERTY_SORTABLE) && !column.isNull(PROPERTY_SORTABLE)) {
dataListColumn.setSortable(column.getBoolean(PROPERTY_SORTABLE));
}
if (column.has(PROPERTY_HIDDEN) && !column.isNull(PROPERTY_HIDDEN)) {
dataListColumn.setHidden(column.getBoolean(PROPERTY_HIDDEN));
}
if (column.has(PROPERTY_ACTION) && !column.isNull(PROPERTY_ACTION)) {
DataListAction action = parseActionFromJsonObject(column);
dataListColumn.setAction(action);
}
if (column.has(PROPERTY_FORMAT) && !column.isNull(PROPERTY_FORMAT)) {
Collection<DataListColumnFormat> formatCollection = new ArrayList<DataListColumnFormat>();
DataListColumnFormat format = parseFormatterFromJsonObject(column);
formatCollection.add(format);
dataListColumn.setFormats(formatCollection);
}
if (column.has(PROPERTY_RENDER_HTML) && !column.isNull(PROPERTY_RENDER_HTML)) {
dataListColumn.setRenderHtml(column.getBoolean(PROPERTY_RENDER_HTML));
}
property.add(dataListColumn);
}
}
return property;