public class ConfigurableJasperReportsView extends AbstractJasperReportsSingleFormatView
This class is compatible with classic JasperReports releases back until 2.x.
As a consequence, it keeps using the JRExporter
API which got deprecated as of JasperReports 5.5.2 (early 2014).
JasperReportsCsvView
,
JasperReportsHtmlView
,
JasperReportsPdfView
,
JasperReportsXlsView
CONTENT_DISPOSITION_INLINE, HEADER_CONTENT_DISPOSITION
DEFAULT_CONTENT_TYPE
logger
PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE
Constructor and Description |
---|
ConfigurableJasperReportsView() |
Modifier and Type | Method and Description |
---|---|
protected net.sf.jasperreports.engine.JRExporter |
createExporter()
Returns a new instance of the specified
JRExporter class. |
protected void |
onInit()
Checks that the
exporterClass property is specified. |
void |
setExporterClass(java.lang.Class<? extends net.sf.jasperreports.engine.JRExporter> exporterClass)
Set the
JRExporter implementation Class to use. |
void |
setUseWriter(boolean useWriter)
Specifies whether or not the
JRExporter writes to the PrintWriter
of the associated with the request (true ) or whether it writes directly to the
InputStream of the request (false ). |
protected boolean |
useWriter()
Indicates how the
JRExporter should render its data. |
generatesDownloadContent, renderReport, renderReportUsingOutputStream, renderReportUsingWriter
convertExporterParameters, convertParameterValue, convertReportData, convertToExporterParameter, createReport, exposeLocalizationContext, fillReport, getConvertedExporterParameters, getExporterParameter, getExporterParameters, getJdbcDataSource, getReport, getReportData, getReportDataTypes, initApplicationContext, isUrlRequired, loadReport, loadReport, postProcessReport, renderMergedOutputModel, setConvertedExporterParameters, setExporterParameters, setHeaders, setJdbcDataSource, setReportDataKey, setSubReportDataKeys, setSubReportUrls
afterPropertiesSet, checkResource, getUrl, setUrl, toString
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponse
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
public void setExporterClass(java.lang.Class<? extends net.sf.jasperreports.engine.JRExporter> exporterClass)
JRExporter
implementation Class
to use. Throws
IllegalArgumentException
if the Class
doesn't implement
JRExporter
. Required setting, as it does not have a default.public void setUseWriter(boolean useWriter)
JRExporter
writes to the PrintWriter
of the associated with the request (true
) or whether it writes directly to the
InputStream
of the request (false
). Default is true
.protected void onInit()
exporterClass
property is specified.onInit
in class AbstractJasperReportsView
AbstractJasperReportsView.initApplicationContext()
protected net.sf.jasperreports.engine.JRExporter createExporter()
JRExporter
class.createExporter
in class AbstractJasperReportsSingleFormatView
setExporterClass(Class)
,
BeanUtils.instantiateClass(Class)
protected boolean useWriter()
JRExporter
should render its data.useWriter
in class AbstractJasperReportsSingleFormatView
setUseWriter(boolean)