Author: tmorgner
Date: 2009-06-30 14:30:04 -0500 (Tue, 30 Jun 2009)
New Revision: 9273
Modified:
engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/modules/misc/bsf/BSFReportPreProcessor.java
engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/modules/parser/bundle/writer/elements/ReportDefinitionWriteHandler.java
engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/states/process/ProcessState.java
Log:
PreProcessors with parameters were not written
Modified: engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/modules/misc/bsf/BSFReportPreProcessor.java
===================================================================
--- engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/modules/misc/bsf/BSFReportPreProcessor.java 2009-06-30 19:27:04 UTC (rev 9272)
+++ engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/modules/misc/bsf/BSFReportPreProcessor.java 2009-06-30 19:30:04 UTC (rev 9273)
@@ -63,7 +63,7 @@
{
final BSFManager interpreter = new BSFManager();
interpreter.declareBean("definition", definition, MasterReport.class); //$NON-NLS-1$
- interpreter.declareBean("flowController", definition, DefaultFlowController.class); //$NON-NLS-1$
+ interpreter.declareBean("flowController", flowController, DefaultFlowController.class); //$NON-NLS-1$
final Object o = interpreter.eval(getLanguage(), "expression", 1, 1, script);
if (o instanceof MasterReport == false)
{
@@ -90,7 +90,7 @@
{
final BSFManager interpreter = new BSFManager();
interpreter.declareBean("definition", definition, SubReport.class); //$NON-NLS-1$
- interpreter.declareBean("flowController", definition, DefaultFlowController.class); //$NON-NLS-1$
+ interpreter.declareBean("flowController", flowController, DefaultFlowController.class); //$NON-NLS-1$
final Object o = interpreter.eval(getLanguage(), "expression", 1, 1, script);
if (o instanceof SubReport == false)
{
Modified: engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/modules/parser/bundle/writer/elements/ReportDefinitionWriteHandler.java
===================================================================
--- engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/modules/parser/bundle/writer/elements/ReportDefinitionWriteHandler.java 2009-06-30 19:27:04 UTC (rev 9272)
+++ engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/modules/parser/bundle/writer/elements/ReportDefinitionWriteHandler.java 2009-06-30 19:30:04 UTC (rev 9273)
@@ -13,7 +13,6 @@
import org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer.BundleWriterException;
import org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer.BundleWriterState;
import org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer.ExpressionWriterUtility;
-import org.pentaho.reporting.engine.classic.core.modules.parser.ext.ExtParserModule;
import org.pentaho.reporting.engine.classic.core.util.beans.BeanException;
import org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility;
import org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle;
@@ -153,12 +152,12 @@
if (value != null && property != null)
{
final AttributeList attList = new AttributeList();
- attList.setAttribute(ExtParserModule.NAMESPACE, "name", key);
+ attList.setAttribute(BundleNamespaces.LAYOUT, "name", key);
if (propertyType.equals(property.getClass()) == false)
{
- attList.setAttribute(ExtParserModule.NAMESPACE, "class", property.getClass().getName());
+ attList.setAttribute(BundleNamespaces.LAYOUT, "class", property.getClass().getName());
}
- writer.writeTag(ExtParserModule.NAMESPACE, "property", attList, XmlWriterSupport.OPEN);
+ writer.writeTag(BundleNamespaces.LAYOUT, "property", attList, XmlWriterSupport.OPEN);
writer.writeTextNormalized(value, false);
writer.writeCloseTag();
}
Modified: engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/states/process/ProcessState.java
===================================================================
--- engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/states/process/ProcessState.java 2009-06-30 19:27:04 UTC (rev 9272)
+++ engines/classic/trunk/core/source/org/pentaho/reporting/engine/classic/core/states/process/ProcessState.java 2009-06-30 19:30:04 UTC (rev 9273)
@@ -310,8 +310,6 @@
{
final ReportPreProcessor[] processors = reportDefinition.getPreProcessors();
final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
- final Iterator keys = configuration.findPropertyKeys
- ("org.pentaho.reporting.engine.classic.core.auto-report-preprocessors.");
final ArrayList preProcessors = new ArrayList();
for (int i = 0; i < processors.length; i++)
{
@@ -322,6 +320,8 @@
}
}
+ final Iterator keys = configuration.findPropertyKeys
+ ("org.pentaho.reporting.engine.classic.core.auto-report-preprocessors.");
while (keys.hasNext())
{
final String key = (String) keys.next();
|