站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

ConfigurableJasperReportsView (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.web.servlet.view.jasperreports
Class ConfigurableJasperReportsView

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.view.AbstractView
              extended by org.springframework.web.servlet.view.AbstractUrlBasedView
                  extended by org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView
                      extended by org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsSingleFormatView
                          extended by org.springframework.web.servlet.view.jasperreports.ConfigurableJasperReportsView
All Implemented Interfaces:
BeanNameAware, InitializingBean, ApplicationContextAware, ServletContextAware, View

public class ConfigurableJasperReportsView
extends AbstractJasperReportsSingleFormatView

Configurable JasperReports View, allowing to specify the JasperReports exporter to be specified through bean properties rather than through the view class name.

Since:
2.0
Author:
Rob Harrop
See Also:
JasperReportsCsvView, JasperReportsHtmlView, JasperReportsPdfView, JasperReportsXlsView

Field Summary
 
Fields inherited from class org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView
CONTENT_DISPOSITION_INLINE, HEADER_CONTENT_DISPOSITION
 
Fields inherited from class org.springframework.web.servlet.view.AbstractView
DEFAULT_CONTENT_TYPE
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
ConfigurableJasperReportsView()
           
 
Method Summary
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(Class 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.
 
Methods inherited from class org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsSingleFormatView
mergeExporterParameters, renderReport
 
Methods inherited from class org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView
convertExporterParameters, convertParameterValue, convertReportData, convertToExporterParameter, exposeLocalizationContext, fillReport, getConvertedExporterParameters, getExporterParameter, getExporterParameters, getJdbcDataSource, getReport, getReportCompiler, getReportData, getReportDataTypes, initApplicationContext, postProcessReport, renderMergedOutputModel, setExporterParameters, setHeaders, setJdbcDataSource, setReportCompiler, setReportDataKey, setSubReportDataKeys, setSubReportUrls
 
Methods inherited from class org.springframework.web.servlet.view.AbstractUrlBasedView
afterPropertiesSet, getUrl, setUrl, toString
 
Methods inherited from class org.springframework.web.servlet.view.AbstractView
addStaticAttribute, createRequestContext, exposeModelAsRequestAttributes, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setRequestContextAttribute
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigurableJasperReportsView

public ConfigurableJasperReportsView()
Method Detail

setExporterClass

public void setExporterClass(Class exporterClass)
Set the JRExporter implementation Class to use. Throws IllegalArgumentException if the Class doesn't implement JRExporter. Required setting, as it does not have a default.


setUseWriter

public 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). Default is true.


onInit

protected void onInit()
Checks that the exporterClass property is specified.

Overrides:
onInit in class AbstractJasperReportsView
See Also:
AbstractJasperReportsView.initApplicationContext()

createExporter

protected net.sf.jasperreports.engine.JRExporter createExporter()
Returns a new instance of the specified JRExporter class.

Specified by:
createExporter in class AbstractJasperReportsSingleFormatView
See Also:
setExporterClass(Class), BeanUtils.instantiateClass(Class)

useWriter

protected boolean useWriter()
Indicates how the JRExporter should render its data.

Specified by:
useWriter in class AbstractJasperReportsSingleFormatView
See Also:
setUseWriter(boolean)

The Spring Framework

Copyright © 2002-2007 The Spring Framework.