Author: doogie
Date: Sat Aug 2 14:40:01 2008
New Revision: 682061
URL:
http://svn.apache.org/viewvc?rev=682061&view=revLog:
More generics.
Modified:
ofbiz/trunk/framework/example/src/org/ofbiz/example/ExamplePrintServices.java
Modified: ofbiz/trunk/framework/example/src/org/ofbiz/example/ExamplePrintServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/src/org/ofbiz/example/ExamplePrintServices.java?rev=682061&r1=682060&r2=682061&view=diff==============================================================================
--- ofbiz/trunk/framework/example/src/org/ofbiz/example/ExamplePrintServices.java (original)
+++ ofbiz/trunk/framework/example/src/org/ofbiz/example/ExamplePrintServices.java Sat Aug 2 14:40:01 2008
@@ -18,6 +18,8 @@
*******************************************************************************/
package org.ofbiz.example;
+import javolution.util.FastMap;
+
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.MimeConstants;
@@ -57,14 +59,16 @@
private static HtmlScreenRenderer htmlScreenRenderer = new HtmlScreenRenderer();
- public static Map printReportPdf(DispatchContext dctx, Map context) {
+ public static Map<String, Object> printReportPdf(DispatchContext dctx, Map<String, ? extends Object> context) {
String screenLocation = "component://example/widget/example/ExampleReportScreens.xml";
String reportScreenName = "ExampleReport";
+ Map<String, Object> workContext = FastMap.newInstance();
+ workContext.putAll(context);
// render a screen to get the XML document
Writer reportWriter = new StringWriter();
ScreenRenderer reportScreenRenderer = new ScreenRenderer(reportWriter, null, htmlScreenRenderer);
- reportScreenRenderer.populateContextForService(dctx, context);
+ reportScreenRenderer.populateContextForService(dctx, workContext);
// put the exampleId in the screen context, is a parameter coming into the service
//reportScreenRenderer.getContext().put("exampleId", context.get("exampleId"));