public int doStartTag() throws JspException {
// Find the custom view.
JspView view = getJspView();
// Find the point.
DataPointVO dataPointVO = getDataPointVO(view, xid);
// Write the value into the page.
JspWriter out = pageContext.getOut();
HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
DataPointRT dataPointRT = Common.runtimeManager.getDataPoint(dataPointVO.getId());
if (dataPointRT == null)
write(out, 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);
write(out, BaseDwr.generateContent(request, "imageValueThumbnail.jsp", model));
}
else {
int hint = raw ? TextRenderer.HINT_RAW : TextRenderer.HINT_FULL;
write(out, dataPointVO.getTextRenderer().getText(pvt, hint));
}
}
return EVAL_BODY_INCLUDE;
}