/**
 * 
 */
package it.mice.voila.runtime.jasper.view;

import it.mice.voila.runtime.jasper.view.helpers.JasperReportsHtmlViewJasper;
import it.mice.voila.runtime.springmvc.util.SpringMvcUtil;
import javax.servlet.http.HttpServletResponse;

import java.util.HashMap;
import java.util.Map;

import net.sf.jasperreports.engine.JasperPrint;

/**
 *
 */
public class JasperReportsHtmlView
		extends JasperReportsHtmlViewJasper {

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.springframework.web.servlet.view.jasperreports.
	 * AbstractJasperReportsSingleFormatView
	 * #renderReport(net.sf.jasperreports.engine.JasperPrint, java.util.Map,
	 * javax.servlet.http.HttpServletResponse)
	 */
	@Override
	protected void renderReport(JasperPrint populatedReport,
			Map<String, Object> model, HttpServletResponse response)
			throws Exception {

		SpringMvcUtil.getSession().setAttribute(
							net.sf.jasperreports.j2ee.servlets.ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE,
							populatedReport);
		SpringMvcUtil.getSession().setAttribute("IMAGES_MAP", new HashMap());

		super.renderReport(populatedReport, model, response);
	}
}
