diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java
index ed49be70a5..ea272aecdd 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java
@@ -199,20 +199,26 @@ public class FDialog
error(windowNo, null, adMessage, msg);
}
- /**
+ public static void error(int windowNo, Component comp, String adMessage, String message)
+ {
+ error(windowNo, comp, adMessage, message, null);
+ }
+
+ /**
* Display error with error icon.
*
* @param windowNo Number of Window
* @param comp Component (unused)
* @param adMessage Message to be translated
* @param message Additional message
+ * @param title If none then one will be generated
*
* @see #error(int, String)
* @see #error(int, Component, String)
* @see #error(int, String, String)
*/
- public static void error(int windowNo, Component comp, String adMessage, String message)
+ public static void error(int windowNo, Component comp, String adMessage, String message, String title)
{
Properties ctx = Env.getCtx();
StringBuffer out = new StringBuffer();
@@ -226,8 +232,19 @@ public class FDialog
out = constructMessage(adMessage, message);
+ String newTitle;
+
+ if (title == null)
+ {
+ newTitle = AEnv.getDialogHeader(ctx, windowNo);
+ }
+ else
+ {
+ newTitle = title;
+ }
+
String s = out.toString().replace("\n", "
");
- Messagebox.showDialog(s, AEnv.getDialogHeader(ctx, windowNo), Messagebox.OK, Messagebox.ERROR);
+ Messagebox.showDialog(s, newTitle, Messagebox.OK, Messagebox.ERROR);
return;
}
@@ -330,7 +347,11 @@ public class FDialog
return;
}
-
+ public static void info(int windowNo, Component comp, String adMessage, String message)
+ {
+ info(windowNo, comp, adMessage, message, null);
+ }
+
/**
* Display information with information icon.
*
@@ -338,11 +359,12 @@ public class FDialog
* @param comp Component (unused)
* @param adMessage Message to be translated
* @param message Additional message
+ * @param title If none then one will be generated
*
* @see #info(int, Component, String)
*/
- public static void info(int windowNo, Component comp, String adMessage, String message)
+ public static void info(int windowNo, Component comp, String adMessage, String message, String title)
{
Properties ctx = Env.getCtx();
@@ -357,8 +379,19 @@ public class FDialog
out = constructMessage(adMessage, message);
+ String newTitle;
+
+ if (title == null)
+ {
+ newTitle = AEnv.getDialogHeader(ctx, windowNo);
+ }
+ else
+ {
+ newTitle = title;
+ }
+
String s = out.toString().replace("\n", "
");
- Messagebox.showDialog(s, AEnv.getDialogHeader(ctx, windowNo), Messagebox.OK, Messagebox.INFORMATION);
+ Messagebox.showDialog(s, newTitle, Messagebox.OK, Messagebox.INFORMATION);
return;
}