Print button while creating a new document

- there is a problem with the previous fix, should use context classloader to load zk class
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2858657
This commit is contained in:
Heng Sin Low 2010-03-06 00:02:16 +00:00
parent 305a239f1a
commit cc75d21efe
1 changed files with 3 additions and 1 deletions

View File

@ -267,7 +267,9 @@ public class ReportCtl
{ {
try try
{ {
ClassLoader loader = ReportCtl.class.getClassLoader(); ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader == null)
loader = ReportCtl.class.getClassLoader();
Class<?> clazz = loader.loadClass("org.adempiere.webui.window.FDialog"); Class<?> clazz = loader.loadClass("org.adempiere.webui.window.FDialog");
Method m = clazz.getMethod("error", Integer.TYPE, String.class); Method m = clazz.getMethod("error", Integer.TYPE, String.class);
m.invoke(null, 0, "NoDocPrintFormat"); m.invoke(null, 0, "NoDocPrintFormat");