Fixed: massPrintOrders service does not work

(OFBIZ-11049)

This problem was similar to what was resolved by r1806237 for OFBIZ-9138.

This fixes it by using the same solution than in r1806237. If the visual theme 
is unknown in the the service  context  get the default theme from 
general.properties using ThemeFactory::resolveTheme.

sendPrintFromScreen, createFileFromScreen, sendBirtMail, getXslFo and 
printReportPdf (in example) were concerned


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1859735 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2019-05-22 16:41:04 +00:00
parent 94c278ed63
commit b5adaeee94
2 changed files with 7 additions and 1 deletions
@@ -69,6 +69,9 @@ public class ExamplePrintServices {
String screenLocation = "component://example/widget/example/ExampleReportScreens.xml";
String reportScreenName = "ExampleReport";
VisualTheme visualTheme = (VisualTheme) context.get("visualTheme");
if (visualTheme == null) {
visualTheme = ThemeFactory.resolveVisualTheme(null);
}
if (visualTheme == null) visualTheme = ThemeFactory.resolveVisualTheme(null);
Map<String, Object> workContext = new HashMap<String, Object>();
workContext.putAll(context);