Author: konstantin.mishin
Date: 2007-07-05 13:35:23 -0400 (Thu, 05 Jul 2007)
New Revision: 1490
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java
Log:
small fix
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java
===================================================================
---
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java 2007-07-05
17:35:07 UTC (rev 1489)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java 2007-07-05
17:35:23 UTC (rev 1490)
@@ -35,11 +35,11 @@
private HashSet ids = new HashSet();
- private Object rowClasses[];
+ private String rowClasses[];
private int rowClassesSize;
- private Object columnClasses[];
+ private String columnClasses[];
private int columnClassesSize;
@@ -112,8 +112,8 @@
}
GridRendererState oldState = getRendererState(context);
GridRendererState state = new GridRendererState(context,oldState,grid);
- state.setColumnClasses(AjaxRendererUtils.asSet(grid.getAttributes().get("columnClasses")));
- state.setRowClasses(AjaxRendererUtils.asSet(grid.getAttributes().get("rowClasses")));
+ state.setColumnClasses(((String)grid.getAttributes().get("columnClasses")).split(","));
+ state.setRowClasses(((String)grid.getAttributes().get("rowClasses")).split(","));
context.getExternalContext().getRequestMap().put(DATA_GRID_RENDERER_STATE,state);
return state;
}
@@ -394,30 +394,30 @@
public String getColumnClass(int index) {
if(columnClasses != null) {
- return (String)columnClasses[index % columnClassesSize];
+ return columnClasses[index % columnClassesSize];
} else {
return "";
}
}
- public void setColumnClasses(Set columnClasses) {
+ public void setColumnClasses(String columnClasses[]) {
if(columnClasses != null) {
- this.columnClasses = columnClasses.toArray();
+ this.columnClasses = columnClasses;
columnClassesSize = this.columnClasses.length;
}
}
public String getRowClass(int index) {
if(rowClasses != null) {
- return (String)rowClasses[index % rowClassesSize];
+ return rowClasses[index % rowClassesSize];
} else {
return "";
}
}
- public void setRowClasses(Set rowClasses) {
+ public void setRowClasses(String rowClasses[]) {
if(rowClasses != null) {
- this.rowClasses = rowClasses.toArray();
+ this.rowClasses = rowClasses;
rowClassesSize = this.rowClasses.length;
}
}
Show replies by date