public void renderView(ServletRequest request, ServletResponse response, ServletContext servletContext)
throws IOException
{
ResponseRenderAppender appender = new ResponseRenderAppender(response);
ScriptTag.State state = new ScriptTag.State();
ScriptTag br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, request);
state.suppressComments = false;
br.doStartTag(appender, state);
appender.append(ScriptRequestState.getString("popupReturn_begin", null));
assert request instanceof HttpServletRequest : request.getClass().getName();
HttpServletRequest httpRequest = (HttpServletRequest) request;
if (_retrieveMap != null) {
for (Iterator/*<Map.Entry>*/ i = _retrieveMap.entrySet().iterator(); i.hasNext();) {
Map.Entry entry = (Map.Entry) i.next();
String fieldID = (String) entry.getKey();
String expressionToRetrieve = "${" + (String) entry.getValue() + '}';
try {
String value =
InternalExpressionUtils.evaluateMessage(expressionToRetrieve, null, httpRequest, servletContext);
String item =
ScriptRequestState.getString("popupReturn_item", new Object[]{fieldID, value});
appender.append(item);
}
catch (ELException e) {
_log.error("Error evaluating expression " + expressionToRetrieve, e);
}
}
}
appender.append(ScriptRequestState.getString("popupReturn_end", new Object[]{_callbackFunc}));
br.doEndTag(appender, false);
}