fixed JasperReports exporter parameter initialization for multi-format views
This commit is contained in:
@@ -255,6 +255,13 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
|
||||
return this.exporterParameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows subclasses to populate the converted exporter parameters.
|
||||
*/
|
||||
protected void setConvertedExporterParameters(Map<JRExporterParameter, Object> convertedExporterParameters) {
|
||||
this.convertedExporterParameters = convertedExporterParameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows subclasses to retrieve the converted exporter parameters.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -183,13 +183,10 @@ public class JasperReportsMultiFormatView extends AbstractJasperReportsView {
|
||||
}
|
||||
|
||||
AbstractJasperReportsView view = (AbstractJasperReportsView) BeanUtils.instantiateClass(viewClass);
|
||||
|
||||
// Copy appropriate properties across.
|
||||
view.setExporterParameters(getExporterParameters());
|
||||
|
||||
// Can skip most initialization since all relevant URL processing
|
||||
// has been done - just need to convert parameters on the sub view.
|
||||
view.convertExporterParameters();
|
||||
view.setExporterParameters(getExporterParameters());
|
||||
view.setConvertedExporterParameters(getConvertedExporterParameters());
|
||||
|
||||
// Prepare response and render report.
|
||||
populateContentDispositionIfNecessary(response, format);
|
||||
|
||||
Reference in New Issue
Block a user