//Note when use cache, do not use setRowfreeze/setColumnfreeze (cause invalidate)
_rowFreeze = rowfreeze;
_colFreeze = colfreeze;
}
Worksheet sheet = _selectedSheet;
String css = getDynamicMediaURI(this, _cssVersion++, "ss_" + this.getUuid() + "_" + getSelectedSheetId(), "css");
smartUpdate("scss", css);
if (!cacheInClient) {
smartUpdate("rowFreeze", getRowfreeze());
smartUpdate("columnFreeze", getColumnfreeze());
//handle AutoFilter
Map afmap = convertAutoFilterToJSON(sheet.getAutoFilter());
if (afmap != null) {
smartUpdate("_autoFilter", afmap);
} else {
smartUpdate("_autoFilter", (String) null);
}
smartUpdate("rowHeight", getRowheight());
smartUpdate("columnWidth", getColumnwidth());
smartUpdate("displayGridlines", !_hideGridlines);
smartUpdate("protect", _protectSheet);
// generate customized row & column information
HeaderPositionHelper colHelper = getColumnPositionHelper(sheet);
HeaderPositionHelper rowHelper = getRowPositionHelper(sheet);
smartUpdate("csc", getSizeHelperStr(colHelper));
smartUpdate("csr", getSizeHelperStr(rowHelper));
// generate merge range information
MergeMatrixHelper mmhelper = getMergeMatrixHelper(sheet);
Iterator iter = mmhelper.getRanges().iterator();
StringBuffer merr = new StringBuffer();
while (iter.hasNext()) {
MergedRect block = (MergedRect) iter.next();
int left = block.getLeft();
int top = block.getTop();
int right = block.getRight();
int bottom = block.getBottom();
int id = block.getId();
merr.append(left).append(",").append(top).append(",").append(right).append(",").append(bottom).append(",").append(id);
if (iter.hasNext()) {
merr.append(";");
}
}
smartUpdate("mergeRange", merr.toString());
final SpreadsheetCtrl spreadsheetCtrl = ((SpreadsheetCtrl) this.getExtraCtrl());
smartUpdate("activeRange",
spreadsheetCtrl.getRangeAttrs(sheet, SpreadsheetCtrl.Header.BOTH, SpreadsheetCtrl.CellAttribute.ALL, 0, 0,
getInitColumnSize() , getInitRowSize()));
//handle Validation, must after render("activeRange"
List<Map> dvs = convertDataValidationToJSON(sheet.getDataValidations());
if (dvs != null) {
smartUpdate("dataValidations", dvs);
} else {
smartUpdate("dataValidations", (String) null);
}