"Applied fix from plugins for revision: 1859735 "

------------------------------------------------------------------------
r1859735 | jleroux | 2019-05-22 18:41:04 +0200 (mer. 22 mai 2019) | 12 lignes

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/branches/release17.12@1859739 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2019-05-22 16:42:53 +00:00
parent 11d158ad7f
commit 40514d73e0
2 changed files with 7 additions and 1 deletions
@@ -70,6 +70,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);