Author: jleroux
Date: Wed May 22 16:42:53 2019 New Revision: 1859739 URL: http://svn.apache.org/viewvc?rev=1859739&view=rev Log: "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 ------------------------------------------------------------------------ Modified: ofbiz/ofbiz-plugins/branches/release17.12/ (props changed) ofbiz/ofbiz-plugins/branches/release17.12/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java ofbiz/ofbiz-plugins/branches/release17.12/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java Propchange: ofbiz/ofbiz-plugins/branches/release17.12/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed May 22 16:42:53 2019 @@ -11,4 +11,4 @@ /ofbiz/branches/multitenant20100310/plugins:921280-927264 /ofbiz/branches/release13.07/plugins:1547657 /ofbiz/ofbiz-framework/trunk:1836107 -/ofbiz/ofbiz-plugins/trunk:1819576,1819580,1819582,1819589,1820962,1820973,1821045,1821049,1821051,1822129,1822133,1822139,1822143,1822145,1822389,1822391,1822395,1824646,1824648,1824650,1824654,1828569,1830856,1831084,1832727,1832800,1837796,1837845,1837857,1838249,1838381,1838816,1841650,1845558,1847272,1847346,1847398,1847528,1847530,1848009,1848396,1848398,1848921,1849119,1851002,1851068,1851135,1851185,1852988,1855082,1856802,1856917,1857120,1857173,1858141,1858244,1858285,1858312,1859012 +/ofbiz/ofbiz-plugins/trunk:1819576,1819580,1819582,1819589,1820962,1820973,1821045,1821049,1821051,1822129,1822133,1822139,1822143,1822145,1822389,1822391,1822395,1824646,1824648,1824650,1824654,1828569,1830856,1831084,1832727,1832800,1837796,1837845,1837857,1838249,1838381,1838816,1841650,1845558,1847272,1847346,1847398,1847528,1847530,1848009,1848396,1848398,1848921,1849119,1851002,1851068,1851135,1851185,1852988,1855082,1856802,1856917,1857120,1857173,1858141,1858244,1858285,1858312,1859012,1859735 Modified: ofbiz/ofbiz-plugins/branches/release17.12/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/branches/release17.12/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java?rev=1859739&r1=1859738&r2=1859739&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/branches/release17.12/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java (original) +++ ofbiz/ofbiz-plugins/branches/release17.12/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java Wed May 22 16:42:53 2019 @@ -47,8 +47,8 @@ import org.apache.ofbiz.entity.Delegator import org.apache.ofbiz.entity.util.EntityUtilProperties; import org.apache.ofbiz.security.Security; import org.apache.ofbiz.service.DispatchContext; -import org.apache.ofbiz.service.LocalDispatcher; import org.apache.ofbiz.service.GenericServiceException; +import org.apache.ofbiz.service.LocalDispatcher; import org.apache.ofbiz.service.ServiceUtil; import org.apache.ofbiz.widget.model.ThemeFactory; import org.apache.ofbiz.widget.renderer.ScreenRenderer; @@ -91,6 +91,9 @@ public class BirtEmailServices { String birtImageDirectory = (String) serviceContext.remove(BirtWorker.getBirtImageDirectory()); String birtContentType = (String) serviceContext.remove(BirtWorker.getBirtContentType()); VisualTheme visualTheme = (VisualTheme) context.get("visualTheme"); + if (visualTheme == null) { + visualTheme = ThemeFactory.resolveVisualTheme(null); + } if (visualTheme == null) visualTheme = ThemeFactory.resolveVisualTheme(null); if (bodyParameters == null) { bodyParameters = MapStack.create(); Modified: ofbiz/ofbiz-plugins/branches/release17.12/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/branches/release17.12/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java?rev=1859739&r1=1859738&r2=1859739&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/branches/release17.12/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java (original) +++ ofbiz/ofbiz-plugins/branches/release17.12/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java Wed May 22 16:42:53 2019 @@ -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); |
Free forum by Nabble | Edit this page |