Author: dmorozov
Date: 2007-07-11 10:46:55 -0400 (Wed, 11 Jul 2007)
New Revision: 1597
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
Log:
1. Move columnClass attribute to COL tag
2. add style attribute for COL tag
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
---
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-07-11
13:58:47 UTC (rev 1596)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-07-11
14:46:55 UTC (rev 1597)
@@ -85,6 +85,11 @@
public void renderContent(FacesContext context, UIScrollableGridColumn column,
ResponseWriter writer, GridRendererState state) throws IOException {
writer.startElement("col", column);
getUtils().writeAttribute(writer, "width",
column.getAttributes().get("width"));
+ getUtils().writeAttribute(writer, "style",
column.getAttributes().get("style"));
+ int cell_index = state.getCellIndex();
+ Object columnClass = state.getColumnClass(cell_index);
+ if(columnClass!=null) getUtils().writeAttribute(writer, "class",
columnClass);
+
writer.endElement("col");
}
};
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
===================================================================
---
branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-07-11
13:58:47 UTC (rev 1596)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-07-11
14:46:55 UTC (rev 1597)
@@ -11,7 +11,7 @@
component="javax.faces.component.UIComponent"
- <td class="ClientUI_Grid_BC Idg-column-cell #{columnClass}
#{component.attributes['styleClass']}"
id="#{client_id}:c_#{cell_id}">
+ <td class="ClientUI_Grid_BC Idg-column-cell
#{component.attributes['styleClass']}"
id="#{client_id}:c_#{cell_id}">
<div id="#{client_id}:bc_#{cell_id}" class="ClientUI_Grid_BCBody
#{component.attributes['cellClass']}"
style="#{component.attributes['cellStyle']}">
<vcp:body/>
</div>