Author: abelevich
Date: 2010-05-20 10:37:49 -0400 (Thu, 20 May 2010)
New Revision: 17161
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
Log:
encode script inside hidden <tbody>/<tr>
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
---
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-05-20
14:19:33 UTC (rev 17160)
+++
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-05-20
14:37:49 UTC (rev 17161)
@@ -134,7 +134,18 @@
}
public void encodeTableEnd(ResponseWriter writer, FacesContext context,
UIDataTableBase component) throws IOException {
+ writer.startElement(HTML.TBOBY_ELEMENT, component);
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, "visibility: hidden",
null);
+
+ writer.startElement(HTML.TR_ELEMENT, component);
+ writer.startElement(HTML.TD_ELEM, component);
+
encodeClientScript(writer, context, component);
+
+ writer.endElement(HTML.TD_ELEM);
+ writer.endElement(HTML.TR_ELEMENT);
+ writer.endElement(HTML.TBOBY_ELEMENT);
+
writer.endElement(HTML.TABLE_ELEMENT);
}
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
===================================================================
---
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-05-20
14:19:33 UTC (rev 17160)
+++
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-05-20
14:37:49 UTC (rev 17161)
@@ -119,8 +119,17 @@
UISubTable subTable = (UISubTable)component;
encodeFooterFacet(writer, facesContext, subTable, false);
+
+ writer.startElement(HTML.TR_ELEMENT, component);
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, "visibility: hidden",
null);
+ writer.startElement(HTML.TD_ELEM, component);
+
encodeStateInput(writer, facesContext, subTable);
encodeClientScript(writer, facesContext, subTable);
+
+ writer.endElement(HTML.TD_ELEM);
+ writer.endElement(HTML.TR_ELEMENT);
+
encodeTableBodyEnd(writer, facesContext, subTable);
}