IDEMPIERE-955 Report Wizard to reflect proper English

This commit is contained in:
Juliana Corredor 2013-05-29 09:11:15 -05:00
parent 4ca2592057
commit 949a6f400a
1 changed files with 39 additions and 6 deletions

View File

@ -199,6 +199,11 @@ 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.
*
@ -206,13 +211,14 @@ 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 #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", "<br>");
Messagebox.showDialog(s, AEnv.getDialogHeader(ctx, windowNo), Messagebox.OK, Messagebox.ERROR);
Messagebox.showDialog(s, newTitle, Messagebox.OK, Messagebox.ERROR);
return;
}
@ -330,6 +347,10 @@ 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", "<br>");
Messagebox.showDialog(s, AEnv.getDialogHeader(ctx, windowNo), Messagebox.OK, Messagebox.INFORMATION);
Messagebox.showDialog(s, newTitle, Messagebox.OK, Messagebox.INFORMATION);
return;
}