diff --git a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsView.java b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsView.java index f95a308cdb2..8cab5f293d6 100644 --- a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsView.java +++ b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsView.java @@ -518,11 +518,10 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView { /** * Finds the report data to use for rendering the report and then invokes the - * renderReport method that should be implemented by the subclass. + * {@link #renderReport} method that should be implemented by the subclass. * @param model the model map, as passed in for view rendering. Must contain * a report data value that can be converted to a JRDataSource, - * acccording to the getReportData method. - * @see #getReportData + * acccording to the rules of the {@link #fillReport} method. */ @Override protected void renderMergedOutputModel( @@ -579,9 +578,11 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView { /** * Create a populated JasperPrint instance from the configured * JasperReport instance. - *

By default, thois method will use any JRDataSource instance - * (or wrappable Object) that can be located using {@link #getReportData}. - * If no JRDataSource can be found, this method will use a JDBC + *

By default, this method will use any JRDataSource instance + * (or wrappable Object) that can be located using {@link #setReportDataKey}, + * a lookup for type JRDataSource in the model Map, or a special value + * retrieved via {@link #getReportData}. + *

If no JRDataSource can be found, this method will use a JDBC * Connection obtained from the configured javax.sql.DataSource * (or a DataSource attribute in the model). If no JDBC DataSource can be found * either, the JasperReports engine will be invoked with plain model Map, @@ -709,17 +710,14 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView { } /** - * Find an instance of JRDataSource in the given model map or create an - * appropriate JRDataSource for passed-in report data. - *

The default implementation checks for a model object under the - * specified "reportDataKey" first, then falls back to looking for a value - * of type JRDataSource, java.util.Collection, - * object array (in that order). + * Create an appropriate JRDataSource for passed-in report data. + * Called by {@link #fillReport} when its own lookup steps were not successful. + *

The default implementation looks for a value of type java.util.Collection + * or object array (in that order). Can be overridden in subclasses. * @param model the model map, as passed in for view rendering * @return the JRDataSource or null if the data source is not found - * @see #setReportDataKey - * @see #convertReportData * @see #getReportDataTypes + * @see #convertReportData */ protected JRDataSource getReportData(Map model) { // Try to find matching attribute, of given prioritized types.