Author: abelevich
Date: 2007-07-05 14:13:07 -0400 (Thu, 05 Jul 2007)
New Revision: 1493
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java
Log:
fix NPE during creating gridRenderState
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:43:52 UTC (rev 1492)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java 2007-07-05
18:13:07 UTC (rev 1493)
@@ -112,8 +112,14 @@
}
GridRendererState oldState = getRendererState(context);
GridRendererState state = new GridRendererState(context,oldState,grid);
- state.setColumnClasses(((String)grid.getAttributes().get("columnClasses")).split(","));
- state.setRowClasses(((String)grid.getAttributes().get("rowClasses")).split(","));
+ if(grid.getAttributes().get("columnClasses") != null){
+ String columnClasses = (String)grid.getAttributes().get("columnClasses");
+ state.setColumnClasses(columnClasses.split(","));
+ }
+ if(grid.getAttributes().get("rowClasses") != null){
+ String rowClasses = (String)grid.getAttributes().get("rowClasses");
+ state.setRowClasses(rowClasses.split(","));
+ }
context.getExternalContext().getRequestMap().put(DATA_GRID_RENDERER_STATE,state);
return state;
}
Show replies by date