Author: abelevich
Date: 2010-09-01 10:18:00 -0400 (Wed, 01 Sep 2010)
New Revision: 19074
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ColumnGroupRenderer.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
Log:
https://jira.jboss.org/browse/RF-9145
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java 2010-09-01
14:06:56 UTC (rev 19073)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java 2010-09-01
14:18:00 UTC (rev 19074)
@@ -50,7 +50,6 @@
public static final String COMPONENT_FAMILY = "org.richfaces.Column";
-
@Attribute
public abstract boolean isBreakRowBefore();
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ColumnGroupRenderer.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ColumnGroupRenderer.java 2010-09-01
14:06:56 UTC (rev 19073)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ColumnGroupRenderer.java 2010-09-01
14:18:00 UTC (rev 19074)
@@ -52,7 +52,10 @@
Iterator<UIComponent> components = row.columns();
while(components.hasNext()){
- encodeColumn(facesContext, writer, (UIColumn)components.next(),rowHolder);
+ UIColumn column = (UIColumn)components.next();
+ if(column.isRendered()) {
+ encodeColumn(facesContext, writer, column,rowHolder);
+ }
}
encodeRowEnd(writer);
}
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-09-01
14:06:56 UTC (rev 19073)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-09-01
14:18:00 UTC (rev 19074)
@@ -149,72 +149,73 @@
RowHolder rowHolder = (RowHolder) holder;
Row row = rowHolder.getRow();
- AbstractDataTable dataTable = (AbstractDataTable)row;
-
- boolean partialUpdate = rowHolder.isUpdatePartial();
+ AbstractDataTable dataTable = (AbstractDataTable) row;
+
+ boolean partialUpdate = rowHolder.isUpdatePartial();
boolean parentTbodyStart = rowHolder.isEncodeParentTBody();
boolean tbodyStart = parentTbodyStart;
-
+
rowHolder.setRowStart(true);
Iterator<UIComponent> components = row.columns();
while (components.hasNext()) {
-
UIComponent child = components.next();
- if(child instanceof Row) {
- boolean isSubtable = (child instanceof AbstractSubTable);
- //new row -> close </tr>
- if (rowHolder.getProcessCell() != 0) {
- encodeRowEnd(writer);
+ if (child.isRendered()) {
+ if (child instanceof Row) {
+ boolean isSubtable = (child instanceof AbstractSubTable);
+ // new row -> close </tr>
+ if (rowHolder.getProcessCell() != 0) {
+ encodeRowEnd(writer);
- if(isSubtable) {
- encodeTableBodyEnd(writer);
- tbodyStart = false;
-
- if (partialUpdate) {
- partialEnd(facesContext);
+ if (isSubtable) {
+ encodeTableBodyEnd(writer);
+ tbodyStart = false;
+
+ if (partialUpdate) {
+ partialEnd(facesContext);
+ }
}
}
- }
-
- rowHolder.nextCell();
-
- if(isSubtable && partialUpdate){
- String id = dataTable.getRelativeClientId(facesContext) +
":"+ child.getId() +":c";
- partialStart(facesContext, id);
- }
-
- child.encodeAll(facesContext);
-
- if (isSubtable && partialUpdate) {
- partialEnd(facesContext);
- }
-
- } else if(child instanceof UIColumn) {
-
- if(!parentTbodyStart && !tbodyStart) {
- if (partialUpdate) {
- partialStart(facesContext,
dataTable.getRelativeClientId(facesContext) + ":tb");
+
+ rowHolder.nextCell();
+
+ if (isSubtable && partialUpdate) {
+ String id = dataTable.getRelativeClientId(facesContext) +
":" + child.getId() + ":c";
+ partialStart(facesContext, id);
}
-
- encodeTableBodyStart(writer, facesContext, dataTable);
- rowHolder.setRowStart(true);
- tbodyStart = true;
- }
-
- encodeColumn(facesContext, writer, (UIColumn)child, rowHolder);
-
- if(!components.hasNext()) {
- encodeRowEnd(writer);
-
- if(!parentTbodyStart && tbodyStart) {
- encodeTableBodyEnd(writer);
- tbodyStart = false;
-
- if(partialUpdate) {
- partialEnd(facesContext);
+
+ child.encodeAll(facesContext);
+
+ if (isSubtable && partialUpdate) {
+ partialEnd(facesContext);
+ }
+
+ } else if (child instanceof UIColumn) {
+
+ if (!parentTbodyStart && !tbodyStart) {
+ if (partialUpdate) {
+ partialStart(facesContext,
dataTable.getRelativeClientId(facesContext) + ":tb");
}
+
+ encodeTableBodyStart(writer, facesContext, dataTable);
+ rowHolder.setRowStart(true);
+ tbodyStart = true;
}
+
+ encodeColumn(facesContext, writer, (UIColumn) child, rowHolder);
+
+ if (!components.hasNext()) {
+ encodeRowEnd(writer);
+
+ if (!parentTbodyStart && tbodyStart) {
+ encodeTableBodyEnd(writer);
+ tbodyStart = false;
+
+ if (partialUpdate) {
+ partialEnd(facesContext);
+ }
+ }
+ }
}
}
}
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-09-01
14:06:56 UTC (rev 19073)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-09-01
14:18:00 UTC (rev 19074)
@@ -194,18 +194,19 @@
while (components.hasNext()) {
UIComponent component = components.next();
-
- if(component instanceof UIColumn) {
- encodeColumn(facesContext, writer, (UIColumn)component , rowHolder);
-
- } else if (component instanceof AbstractSubTable) {
- if(component.isRendered()) {
- encodeRowEnd(writer);
+ if(component.isRendered()) {
+ if(component instanceof UIColumn ) {
+ encodeColumn(facesContext, writer, (UIColumn)component , rowHolder);
+
+ } else if (component instanceof AbstractSubTable) {
+ if(component.isRendered()) {
+ encodeRowEnd(writer);
+ }
+
+ component.encodeAll(facesContext);
+ rowHolder.setRowStart(true);
}
-
- component.encodeAll(facesContext);
- rowHolder.setRowStart(true);
- }
+ }
}
encodeRowEnd(writer);