protected String getRenderedValue(ColumnData data, int rowIndex, int colIndex, ModelData m, String property) { GridCellRenderer<ModelData> r = cm.getRenderer(colIndex); List<Widget> rowMap = widgetList.get(rowIndex); rowMap.add(colIndex, null); if (r != null) { Object o = r.render(ds.getAt(rowIndex), property, data, rowIndex, colIndex, ds, grid); if (o instanceof Widget) { Widget w = (Widget) o; rowMap.set(colIndex, w); return ""; } else if (o != null) { return o.toString(); } } Object val = m.get(property); ColumnConfig c = cm.getColumn(colIndex); if (val != null && val instanceof Number && c.getNumberFormat() != null) { Number n = (Number) val; val = c.getNumberFormat().format(n.doubleValue()); } else if (val != null && val instanceof Date && c.getDateTimeFormat() != null) { DateTimeFormat dtf = c.getDateTimeFormat(); val = dtf.format((Date) val); } String text = null; if (val != null) { text = val.toString(); } return Util.isEmptyString(text) ? " " : text; }
NumberFormat nf = cm.getColumn(colIndex).getNumberFormat(); val = nf.format(n.doubleValue()); } else if (val != null && c.getDateTimeFormat() != null) { DateTimeFormat dtf = c.getDateTimeFormat(); val = dtf.format((Date) val);