}
@Override
protected void fillInitParam(JSONObject initObject, TableStyles defaultStyles) throws JSONException {
TableStructure tableStructure = getParent(TableStructure.class);
TableStyles tableStyles = tableStructure.getTableStyles();
FacesContext context = FacesContext.getCurrentInstance();
UIComponent component = tableStructure.getComponent();
String sectionClass = Styles.getCSSClass(context, component,
isHeader ? tableStyles.getHeaderSectionStyle() : tableStyles.getFooterSectionStyle(),
isHeader ? tableStyles.getHeaderSectionClass() : tableStyles.getFooterSectionClass());
sectionClass = TableUtil.getClassWithDefaultStyleClass(
tableStyles.getApplyDefaultStyle(),
isHeader ? TableUtil.DEFAULT_HEADER_SECTION_CLASS : TableUtil.DEFAULT_FOOTER_SECTION_CLASS,
sectionClass);
if (!Rendering.isNullOrEmpty(sectionClass))
initObject.put("className", sectionClass);
if (tableStructure.getScrolling() != null)
initObject.put("rowCount", allRows.size());
if (commonHeaderRow != null)
initObject.put("commonHeader", getCommonHeaderParam(tableStructure));
if (hasSubHeader)
initObject.put("subHeader", getSubHeaderParam(tableStructure));
String headerClassName = Styles.getCSSClass(context, component,
isHeader ? tableStyles.getHeaderRowStyle() : tableStyles.getFooterRowStyle(),
isHeader ? tableStyles.getHeaderRowClass() : tableStyles.getFooterRowClass());
if (!Rendering.isNullOrEmpty(headerClassName))
initObject.put("headingsClassName", headerClassName);
}