String value;
DataPointRT dataPointRT = rtm.getDataPoint(dataPointVO.getId());
if (dataPointRT == null)
value = disabledValue;
else {
PointValueTime pvt = dataPointRT.getPointValue();
if (pvt != null && pvt.getValue() instanceof ImageValue) {
// Text renderers don't help here. Create a thumbnail.
Map<String, Object> model = new HashMap<String, Object>();
model.put("point", dataPointVO);
model.put("pointValue", pvt);
value = BaseDwr.generateContent(request, "imageValueThumbnail.jsp", model);
}
else {
int hint = raw ? TextRenderer.HINT_RAW : TextRenderer.HINT_FULL;
value = dataPointVO.getTextRenderer().getText(pvt, hint);
if (pvt != null && time)
state.setTime(pvt.getTime());
}
}
state.setValue(value);
}