public class

JasperReportsViewResolver

extends UrlBasedViewResolver
java.lang.Object
   ↳ org.springframework.context.support.ApplicationObjectSupport
     ↳ org.springframework.web.context.support.WebApplicationObjectSupport
       ↳ org.springframework.web.servlet.view.AbstractCachingViewResolver
         ↳ org.springframework.web.servlet.view.UrlBasedViewResolver
           ↳ org.springframework.web.servlet.view.jasperreports.JasperReportsViewResolver

Class Overview

ViewResolver implementation that resolves instances of AbstractJasperReportsView by translating the supplied view name into the URL of the report file.

Summary

[Expand]
Inherited Constants
From class org.springframework.web.servlet.view.UrlBasedViewResolver
From interface org.springframework.core.Ordered
[Expand]
Inherited Fields
From class org.springframework.context.support.ApplicationObjectSupport
Public Constructors
JasperReportsViewResolver()
Public Methods
void setExporterParameters(Map<StringObject> exporterParameters)
Set the exporterParameters the view class should use.
void setHeaders(Properties headers)
Set the headers the view class should use.
void setJdbcDataSource(DataSource jdbcDataSource)
Set the DataSource the view class should use.
void setReportDataKey(String reportDataKey)
Set the reportDataKey the view class should use.
void setSubReportDataKeys(String[] subReportDataKeys)
Set the subReportDataKeys the view class should use.
void setSubReportUrls(Properties subReportUrls)
Set the subReportUrls the view class should use.
Protected Methods
AbstractUrlBasedView buildView(String viewName)
Creates a new View instance of the specified view class and configures it.
Class requiredViewClass()
Requires the view class to be a subclass of AbstractJasperReportsView.
[Expand]
Inherited Methods
From class org.springframework.web.servlet.view.UrlBasedViewResolver
From class org.springframework.web.servlet.view.AbstractCachingViewResolver
From class org.springframework.web.context.support.WebApplicationObjectSupport
From class org.springframework.context.support.ApplicationObjectSupport
From class java.lang.Object
From interface org.springframework.context.ApplicationContextAware
From interface org.springframework.core.Ordered
From interface org.springframework.web.context.ServletContextAware
From interface org.springframework.web.servlet.ViewResolver

Public Constructors

public JasperReportsViewResolver ()

Public Methods

public void setExporterParameters (Map<StringObject> exporterParameters)

Set the exporterParameters the view class should use.

public void setHeaders (Properties headers)

Set the headers the view class should use.

public void setJdbcDataSource (DataSource jdbcDataSource)

Set the DataSource the view class should use.

public void setReportDataKey (String reportDataKey)

Set the reportDataKey the view class should use.

public void setSubReportDataKeys (String[] subReportDataKeys)

Set the subReportDataKeys the view class should use.

public void setSubReportUrls (Properties subReportUrls)

Set the subReportUrls the view class should use.

Protected Methods

protected AbstractUrlBasedView buildView (String viewName)

Creates a new View instance of the specified view class and configures it. Does not perform any lookup for pre-defined View instances.

Spring lifecycle methods as defined by the bean container do not have to be called here; those will be applied by the loadView method after this method returns.

Subclasses will typically call super.buildView(viewName) first, before setting further properties themselves. loadView will then apply Spring lifecycle methods at the end of this process.

Parameters
viewName the name of the view to build
Returns
  • the View instance
Throws
Exception

protected Class requiredViewClass ()

Requires the view class to be a subclass of AbstractJasperReportsView.