Author: abelevich
Date: 2007-06-01 11:00:36 -0400 (Fri, 01 Jun 2007)
New Revision: 978
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-01
15:00:26 UTC (rev 977)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-01
15:00:36 UTC (rev 978)
@@ -69,6 +69,15 @@
}
};
+ private final ColumnVisitor colsRenderer = new ExtendedColumnVisitor(){
+
+ 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"));
+ writer.endElement("col");
+ }
+ };
+
private final ColumnVisitor headerCellRenderer = new ExtendedColumnVisitor(){
public void renderContent(FacesContext context, UIScrollableGridColumn column,
ResponseWriter writer, GridRendererState state) throws IOException {
@@ -321,6 +330,24 @@
ColumnWalker.iterateOverColumns(context, grid, headerCellRenderer, writer, state);
}
+ public void renderCols(FacesContext context, UIScrollableGrid grid, boolean isFrozen)
throws IOException{
+
+ ResponseWriter writer = context.getResponseWriter();
+ final GridRendererState state = GridRendererState.getRendererState(context);
+
+ if(isFrozen){
+ state.setColumType(COLUMN_FROZEN_TYPE);
+ }else{
+ state.setColumType(COLUMN_NORMAL_TYPE);
+ }
+
+ state.setClientId(grid.getClientId(context));
+ state.setFrozenColumnCount(((Integer)grid.getAttributes().get("frozenColCount")).intValue());
+ state.setFrozenPart(isFrozen);
+ ColumnWalker.iterateOverColumns(context, grid, colsRenderer, writer, state);
+ }
+
+
public void renderFooters(FacesContext context, UIScrollableGrid grid, boolean isFrozen)
throws IOException{
ResponseWriter writer = context.getResponseWriter();
Show replies by date