*
* @return SKIP_BODY, as it is intended to be a single tag.
*/
public int doStartTag() throws JspException
{
RunData data = (RunData)pageContext
.getAttribute(JspService.RUNDATA, PageContext.REQUEST_SCOPE);
String module = null;
String template = null;
Boolean flag = (Boolean)pageContext
.getAttribute(FLAG, PageContext.REQUEST_SCOPE);
JspService jsp = (JspService) TurbineServices.getInstance()
.getService(JspService.SERVICE_NAME);
try
{
pageContext.getOut().flush();
template = data.getTemplateInfo().getScreenTemplate();
if ( staticContent || (flag != null && flag.booleanValue()) )
{
jsp.handleRequest(data, "/screens/" + template, false);
}
else
{
module = ((TemplateService)TurbineServices.getInstance().getService(
TemplateService.SERVICE_NAME)).getScreenName(template);
ScreenLoader.getInstance().exec(data, module);
pageContext.setAttribute(FLAG,
Boolean.TRUE, PageContext.REQUEST_SCOPE);
}
}
catch (Exception e)
{
String message = "Error processing screen template:" +
template + " using module: " + module;
Log.error(message, e);
try
{
data.getOut().print("Error processing screen template: "
+ template + " using module: " + module);
}
catch(java.io.IOException ioe) {}
}
return SKIP_BODY;