Author: piotr.buda
Date: 2008-10-10 05:59:27 -0400 (Fri, 10 Oct 2008)
New Revision: 10707
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
Log:
Fixed passing of attributes from rich:column to EDT renderer (style, styleClass) and EDT
columnClasses attribute.
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
---
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-10-10
09:51:57 UTC (rev 10706)
+++
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-10-10
09:59:27 UTC (rev 10707)
@@ -594,6 +594,7 @@
encodeGroupRow(context, table, holder);
}
holder.setFirstRow(false);
+
while (iter.hasNext()) {
column = iter.next();
// Start new row for first column - expect a case of the detail
@@ -605,41 +606,44 @@
}
// TODO PKA CHANGE COLUMN RENDERER TO GET RID OF && false
- if (false && (column instanceof Column)) {
- boolean breakBefore = ((Column) column).isBreakBefore()
- || isRow;
- if (breakBefore && !first) {
- // close current row
- writer.endElement(HTML.TR_ELEMENT);
- // reset columns counter.
- currentColumn = 0;
- // Start new row, expect a case of the detail table, wich
- // will be insert own row.
- if (!isRow) {
- holder.nextRow();
- encodeRowStart(context, holder.getRowClass(), table,
- holder, writer);
- }
- }
- encodeCellChildren(context, column,
- first ? getFirstRowSkinClass() : null,
- getRowSkinClass(), holder.getRowClass(),
- getCellSkinClass(), holder
- .getColumnClass(currentColumn));
- // renderChild(context, column);
- if (isRow && iter.hasNext()) {
- // Start new row for remained columns.
- holder.nextRow();
- encodeRowStart(context, holder.getRowClass(), table,
- holder, writer);
- // reset columns counter.
- currentColumn = -1;
- }
- } else if (column.isRendered()) {
+// if (false && (column instanceof Column)) {
+// boolean breakBefore = ((Column) column).isBreakBefore()
+// || isRow;
+// if (breakBefore && !first) {
+// // close current row
+// writer.endElement(HTML.TR_ELEMENT);
+// // reset columns counter.
+// currentColumn = 0;
+// // Start new row, expect a case of the detail table, wich
+// // will be insert own row.
+// if (!isRow) {
+// holder.nextRow();
+// encodeRowStart(context, holder.getRowClass(), table,
+// holder, writer);
+// }
+// }
+// encodeCellChildren(context, column,
+// first ? getFirstRowSkinClass() : null,
+// getRowSkinClass(), holder.getRowClass(),
+// getCellSkinClass(), holder
+// .getColumnClass(currentColumn));
+// // renderChild(context, column);
+// if (isRow && iter.hasNext()) {
+// // Start new row for remained columns.
+// holder.nextRow();
+// encodeRowStart(context, holder.getRowClass(), table,
+// holder, writer);
+// // reset columns counter.
+// currentColumn = -1;
+// }
+// } else
+ if (column.isRendered()) {
// UIColumn don't have own renderer
writer.startElement(HTML.td_ELEM, table);
getUtils().encodeId(context, column);
- encodeStyleClass(writer, null, getCellSkinClass(), null, null);
+ encodeStyleClass(writer, null, getCellSkinClass(),
holder.getColumnClass(currentColumn),
+ column.getAttributes().get("styleClass"));
+ encodeStyle(writer, null, null, null,
column.getAttributes().get("style"));
// TODO - encode column attributes.
writer.startElement(HTML.DIV_ELEM, table);
writer.writeAttribute("class", "extdt-cell-div",
null);