for (int j = 0; j < rows.size(); j++) {
ModelData model = (ModelData) rows.get(j);
model = prepareData(model);
Record r = ds.hasRecord(model) ? ds.getRecord(model) : null;
int rowBodyColSpanCount = colCount;
if (enableRowBody) {
if (grid.getSelectionModel() instanceof CheckBoxSelectionModel<?>) {
CheckBoxSelectionModel<?> sm = (CheckBoxSelectionModel<?>) grid.getSelectionModel();
if (cm.getColumnById(sm.getColumn().getId()) != null) {
rowBodyColSpanCount--;
}
}
for (ColumnConfig c : cm.getColumns()) {
if (c instanceof RowExpander || c instanceof RowNumberer) {
rowBodyColSpanCount--;
}
}
}
int rowIndex = (j + startRow);
if (GXT.isAriaEnabled()) {
buf.append("<div role=\"row\" aria-level=\"2\" class=\"x-grid3-row ");
} else {
buf.append("<div class=\"x-grid3-row ");
}
if (stripe && ((rowIndex + 1) % 2 == 0)) {
buf.append(" x-grid3-row-alt");
}
if (!selectable) {
buf.append(" x-unselectable-single");
}
if (showDirtyCells && r != null && r.isDirty()) {
buf.append(" x-grid3-dirty-row");
}
if (viewConfig != null) {
buf.append(" ");
buf.append(viewConfig.getRowStyle(model, rowIndex, ds));
}
buf.append("\" style=\"");
buf.append(tstyle);
buf.append("\" id=\"");
buf.append(grid.getId());
buf.append("_");
buf.append(ds.getKeyProvider() != null ? ds.getKeyProvider().getKey(model) : XDOM.getUniqueId());
buf.append("\"><table class=x-grid3-row-table role=presentation border=0 cellspacing=0 cellpadding=0 style=\"");
buf.append(tstyle);
buf.append("\"><tbody role=presentation><tr role=presentation>");
widgetList.add(rowIndex, new ArrayList<Widget>());
for (int i = 0; i < colCount; i++) {
ColumnData c = cs.get(i);
c.css = c.css == null ? "" : c.css;
String rv = getRenderedValue(c, rowIndex, i, model, c.name);
String role = "gridcell";
if (GXT.isAriaEnabled()) {
ColumnConfig cc = cm.getColumn(i);
if (cc.isRowHeader()) {
role = "rowheader";
}
}
String attr = c.cellAttr != null ? c.cellAttr : "";
String cellAttr = c.cellAttr != null ? c.cellAttr : "";
buf.append("<td id=\"" + XDOM.getUniqueId() + "\" role=\"" + role
+ "\" class=\"x-grid3-col x-grid3-cell x-grid3-td-");
buf.append(c.id);
buf.append(" ");
buf.append(i == 0 ? "x-grid-cell-first " : (i == last ? "x-grid3-cell-last " : ""));
if (c.css != null) {
buf.append(c.css);
}
if (showInvalidCells && r != null && !r.isValid(c.id)) {
buf.append(" x-grid3-invalid-cell");
}
if (showDirtyCells && r != null && r.getChanges().containsKey(c.id)) {
buf.append(" x-grid3-dirty-cell");
}
buf.append("\" style=\"");
buf.append(c.style);