Author: nbelaevski
Date: 2010-02-21 18:15:30 -0500 (Sun, 21 Feb 2010)
New Revision: 16478
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
root/ui-sandbox/trunk/components/tables/ui/src/main/templates/org/richfaces/renderkit/html/toggle-control.template.xml
Log:
Replaced renderChild() method with encodeAll()
Replaced "cc" with "component"
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
---
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-02-19
17:35:31 UTC (rev 16477)
+++
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-02-21
23:15:30 UTC (rev 16478)
@@ -371,7 +371,7 @@
UIComponent facet = column.getFacet(facetName);
if (facet != null && facet.isRendered()) {
- renderChild(context, facet);
+ facet.encodeAll(context);
}
strategy.encodeEnd(context, writer, column, facetName);
@@ -401,7 +401,7 @@
writer.writeAttribute("scope", "colgroup", null);
}
- renderChild(context, footer);
+ footer.encodeAll(context);
if(!isColumnGroup){
writer.endElement(element);
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
---
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-02-19
17:35:31 UTC (rev 16477)
+++
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-02-21
23:15:30 UTC (rev 16478)
@@ -124,7 +124,7 @@
UIComponent child = components.next();
if (child instanceof Row) {
encodeTableBodyEnd(writer, context, (UIDataTable) row);
- renderChild(context, (UISubTable) child);
+ child.encodeAll(context);
if (components.hasNext()) {
encodeTableBodyStart(writer, context, (UIDataTable) row);
}
@@ -195,7 +195,7 @@
writer.writeAttribute(HTML.STYLE_ATTRIBUTE, captionStyle,
"captionStyle");
}
- renderChild(context, caption);
+ caption.encodeAll(context);
writer.endElement(HTML.CAPTION_ELEMENT);
}
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
===================================================================
---
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2010-02-19
17:35:31 UTC (rev 16477)
+++
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2010-02-21
23:15:30 UTC (rev 16478)
@@ -131,13 +131,13 @@
UIComponent caption = component.getFacet("caption");
if (caption != null && caption.isRendered()) {
writer.startElement(HTML.DIV_ELEM, component);
- renderChild(context, caption);
+ caption.encodeAll(context);
writer.endElement(HTML.DIV_ELEM);
}
UIComponent header = component.getFacet("header");
if (header != null && header.isRendered()) {
writer.startElement(HTML.DIV_ELEM, component);
- renderChild(context, header);
+ header.encodeAll(context);
writer.endElement(HTML.DIV_ELEM);
}
}
@@ -163,7 +163,7 @@
UIComponent facet = component.getFacet("footer");
if (facet != null && facet.isRendered()) {
writer.startElement(HTML.DIV_ELEM, component);
- renderChild(context, facet);
+ facet.encodeAll(context);
writer.endElement(HTML.DIV_ELEM);
}
writer.startElement(HTML.DIV_ELEM, component);
@@ -303,7 +303,7 @@
if (table.getRowCount() == 0) {
UIComponent facet = table.getFacet("noData");
if (facet != null && facet.isRendered()) {
- renderChild(context, facet);
+ facet.encodeAll(context);
} else {
Object noDataLabel = table.getAttributes().get("noDataLabel");
if (noDataLabel != null) {
@@ -369,7 +369,7 @@
null);
UIComponent facet = column.getFacet(facetName);
if (facet != null && facet.isRendered()) {
- renderChild(context, facet);
+ facet.encodeAll(context);
}
writer.endElement(HTML.DIV_ELEM);
writer.endElement(HTML.TD_ELEM);
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/templates/org/richfaces/renderkit/html/toggle-control.template.xml
===================================================================
---
root/ui-sandbox/trunk/components/tables/ui/src/main/templates/org/richfaces/renderkit/html/toggle-control.template.xml 2010-02-19
17:35:31 UTC (rev 16477)
+++
root/ui-sandbox/trunk/components/tables/ui/src/main/templates/org/richfaces/renderkit/html/toggle-control.template.xml 2010-02-21
23:15:30 UTC (rev 16478)
@@ -13,11 +13,11 @@
</cc:interface>
<cc:implementation>
- <cdk:call expression="getUtils().encodeBeginFormIfNessesary(facesContext,
cc);"/>
- <span id="#{clientId}"
class="#{cc.attributes['styleClass']}">
- <cdk:call expression="encodeControl(facesContext, cc);" />
+ <cdk:call expression="getUtils().encodeBeginFormIfNessesary(facesContext,
component);"/>
+ <span id="#{clientId}"
class="#{component.attributes['styleClass']}">
+ <cdk:call expression="encodeControl(facesContext, component);" />
</span>
- <cdk:call expression="getUtils().encodeEndFormIfNessesary(facesContext,
cc);"/>
+ <cdk:call expression="getUtils().encodeEndFormIfNessesary(facesContext,
component);"/>
</cc:implementation>
</cdk:root>
\ No newline at end of file