IDEMPIERE-5925: Method Dialog.info with callback (#2100)
* IDEMPIERE-5925: Method Dialog.info with callback https://idempiere.atlassian.net/browse/IDEMPIERE-5925 * IDEMPIERE-5925: Method Dialog.info with callback various fixes suggested by @hengsin
This commit is contained in:
parent
9794357e84
commit
14bff68342
|
@ -591,17 +591,26 @@ public final class Dialog {
|
|||
*/
|
||||
|
||||
public static void info(int windowNo, String adMessage, String additionalMessage, String title) {
|
||||
if (logger.isLoggable(Level.INFO)) logger.info(adMessage + " - " + additionalMessage);
|
||||
info(windowNo, adMessage, additionalMessage, title, null);
|
||||
}
|
||||
|
||||
if (CLogMgt.isLevelFinest()) {
|
||||
Trace.printStack();
|
||||
}
|
||||
|
||||
String dialogTitle = getDialogTitle(title, windowNo);
|
||||
/**
|
||||
* Display dialog with information icon.
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional message
|
||||
* @param title If none then one will be generated
|
||||
* @param callback (optional)
|
||||
*/
|
||||
public static void info(int windowNo, String adMessage, String additionalMessage, String title, Callback<Integer> callback) {
|
||||
if (logger.isLoggable(Level.INFO)) logger.info(adMessage + " - " + additionalMessage);
|
||||
|
||||
String dialogTitle = getDialogTitle(title, windowNo);
|
||||
String message = constructMessage(adMessage, additionalMessage);
|
||||
message = formatDialogMessage(message);
|
||||
|
||||
Messagebox.showDialog(message, dialogTitle, Messagebox.OK, Messagebox.INFORMATION);
|
||||
|
||||
Messagebox.showDialog(message, dialogTitle, Messagebox.OK, Messagebox.INFORMATION, callback);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue