Author: konstantin.mishin
Date: 2007-10-25 14:31:45 -0400 (Thu, 25 Oct 2007)
New Revision: 3548
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
Log:
RF-989
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
---
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2007-10-25
17:33:52 UTC (rev 3547)
+++
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2007-10-25
18:31:45 UTC (rev 3548)
@@ -327,15 +327,14 @@
String row_id = null;
+ String baseClientId = grid.getBaseClientId(context);
for (Iterator iter = grid.getChildren().iterator(); iter.hasNext(); ) {
UIComponent kid = (UIComponent) iter.next();
if (kid.isRendered()) {
- if (kid instanceof Column){
- String baseClientId = grid.getBaseClientId(context);
-
+ if (kid instanceof Column){
if(state.isFrozenColumn() && !frozenTRRendered){
state.setFrozenPart(true);
@@ -350,19 +349,9 @@
}else if(!state.isFrozenColumn() && !normalTRRendered){
- if(frozenTRRendered){
- writer.endElement("tr");
- }
-
- state.setFrozenPart(false);
- row_id = baseClientId + ":n:" + state.getRowIndex();
-
- writer.startElement("tr", grid);
- getUtils().writeAttribute(writer,"id",row_id);
- getUtils().writeAttribute(writer, "class","dr-sdt-rb
rich-sdt-row" + state.getRowClass(state.getRowIndex()));
- addRowJavascriptEvents(writer, grid);
+ writeNormalTr(frozenTRRendered, state, grid, collection,
+ writer, baseClientId);
normalTRRendered = true;
- collection.add(row_id);
}
@@ -379,17 +368,39 @@
}
}
-
-// if(!state.isFrozenPart()){
-// writer.startElement("td", grid);
-// getUtils().writeAttribute(writer, "class","dr-sdt-bc " +
state.getColumnClass(state.getCellIndex()));
-// writer.endElement("td");
-// }
-
+ if(!normalTRRendered){
+ writeNormalTr(frozenTRRendered, state, grid, collection,
+ writer, baseClientId);
+ }
+ writer.startElement("td", grid);
+ getUtils().writeAttribute(writer, "class","dr-sdt-bc
rich-sdt-column-cell " + state.getColumnClass(state.getCellIndex()));
+ writer.startElement(HTML.DIV_ELEM, grid);
+ getUtils().writeAttribute(writer, "class","dr-sdt-bcbody");
+ writer.endElement(HTML.DIV_ELEM);
+ writer.endElement("td");
writer.endElement("tr");
state.setCellIndex(0);
state.nextRow();
}
+
+ private void writeNormalTr(boolean frozenTRRendered,
+ ScrollableDataTableRendererState state,
+ UIScrollableDataTable grid, Collection collection,
+ ResponseWriter writer, String baseClientId) throws IOException {
+ String row_id;
+ if(frozenTRRendered){
+ writer.endElement("tr");
+ }
+
+ state.setFrozenPart(false);
+ row_id = baseClientId + ":n:" + state.getRowIndex();
+
+ writer.startElement("tr", grid);
+ getUtils().writeAttribute(writer,"id",row_id);
+ getUtils().writeAttribute(writer, "class","dr-sdt-rb rich-sdt-row"
+ state.getRowClass(state.getRowIndex()));
+ addRowJavascriptEvents(writer, grid);
+ collection.add(row_id);
+ }
};
// temporary solution RF-957
Show replies by date