Author: abelevich
Date: 2010-07-12 11:37:03 -0400 (Mon, 12 Jul 2010)
New Revision: 17963
Modified:
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
Log:
fix th rendering in the tfoot elements
Modified:
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
---
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-07-12
15:22:08 UTC (rev 17962)
+++
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-07-12
15:37:03 UTC (rev 17963)
@@ -137,6 +137,7 @@
setupTableStartElement(context, dataTable);
encodeHeaderFacet(writer, context, dataTable, false);
+ setupTableStartElement(context, dataTable, HTML.TD_ELEM);
encodeFooterFacet(writer, context, dataTable, false);
dataTable.setRowKey(context, key);
dataTable.restoreOrigValue(context);
@@ -569,19 +570,25 @@
public abstract String getNoDataClass();
protected abstract void setupTableStartElement(FacesContext context, UIComponent
component);
+
+ protected void setupTableStartElement(FacesContext context, UIComponent component,
String elementName) {
+ put(context, component.getClientId(context) + CELL_ELEMENT_KEY, elementName);
+ }
public void encodeMetaComponent(FacesContext context, UIComponent component, String
metaComponentId)
throws IOException {
UIDataTableBase table = (UIDataTableBase) component;
- setupTableStartElement(context, component);
if (UIDataTableBase.HEADER.equals(metaComponentId)) {
+ setupTableStartElement(context, component);
encodeHeaderFacet(context.getResponseWriter(), context, table, true);
} else if (UIDataTableBase.FOOTER.equals(metaComponentId)) {
+ setupTableStartElement(context, component, HTML.TD_ELEM);
encodeFooterFacet(context.getResponseWriter(), context, table, true);
} else if(UIDataTableBase.BODY.equals(metaComponentId)) {
+ setupTableStartElement(context, component, HTML.TD_ELEM);
encodeTableRows(context.getResponseWriter(), context, table, true);
} else {
throw new IllegalArgumentException("Unsupported metaComponentIdentifier:
" + metaComponentId);
Modified:
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
---
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-07-12
15:22:08 UTC (rev 17962)
+++
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-07-12
15:37:03 UTC (rev 17963)
@@ -379,9 +379,9 @@
}
protected void setupTableStartElement(FacesContext context, UIComponent component) {
- put(context, component.getClientId(context) + CELL_ELEMENT_KEY, HTML.TH_ELEM);
+ setupTableStartElement(context, component, HTML.TH_ELEM);
}
-
+
public EncodeStrategy getHiddenContainerStrategy(UIDataTableBase dataTableBase) {
return new DataTableHiddenEncodeStrategy();
}
Modified:
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
===================================================================
---
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-07-12
15:22:08 UTC (rev 17962)
+++
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-07-12
15:37:03 UTC (rev 17963)
@@ -383,9 +383,9 @@
}
protected void setupTableStartElement(FacesContext context, UIComponent component) {
- put(context, component.getClientId(context) + CELL_ELEMENT_KEY, HTML.TD_ELEM);
+ setupTableStartElement(context, component, HTML.TD_ELEM);
}
-
+
protected UIDataTableBase findParent(UISubTable subTable) {
UIComponent parent = subTable.getParent();