IDEMPIERE-5280 : Avoid Msg.getMsg: NOT found log when confirming an a… (#1308)

* IDEMPIERE-5280 : Avoid Msg.getMsg: NOT found log when confirming an action on a document

* IDEMPIERE-5280 : Avoid Msg.getMsg: NOT found log when confirming an action on a document - fix suggested by hengsin

fix windowNo

Co-Authored-By: hengsin <152246+hengsin@users.noreply.github.com>

* IDEMPIERE-5280 : Avoid Msg.getMsg: NOT found log when confirming an action on a document - Fix vertical alignment of message

Also fix it in another method

Co-Authored-By: hengsin <152246+hengsin@users.noreply.github.com>

Co-authored-by: hengsin <152246+hengsin@users.noreply.github.com>
This commit is contained in:
Nicolas Micoud 2022-04-29 17:22:01 +02:00 committed by GitHub
parent 10db6177d0
commit eaaa26774c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -379,7 +379,7 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
String docAction = lstDocAction.getSelectedItem().getLabel();
MessageFormat mf = new MessageFormat(Msg.getMsg(Env.getAD_Language(Env.getCtx()), "ConfirmOnDocAction"));
Object[] arguments = new Object[]{docAction};
FDialog.ask(0, this, mf.format(arguments), new Callback<Boolean>() {
FDialog.ask(gridTab.getWindowNo(), this, "", mf.format(arguments), new Callback<Boolean>() {
@Override
public void onCallback(Boolean result) {
if(result)

View File

@ -315,7 +315,11 @@ public class FDialog
if (adMessage != null && !adMessage.equals(""))
out.append(Msg.getMsg(Env.getCtx(), adMessage));
if (msg != null && msg.length() > 0)
out.append("\n").append(msg);
{
if (out.length() > 0)
out.append("\n");
out.append(msg);
}
String s = out.toString().replace("\n", "<br>");
Callback<Integer> msgCallback = null;
@ -579,7 +583,11 @@ public class FDialog
if (adMessage != null && !adMessage.equals(""))
out.append(Msg.getMsg(Env.getCtx(), adMessage));
if (msg != null && msg.length() > 0)
out.append("\n").append(msg);
{
if (out.length() > 0)
out.append("\n");
out.append(msg);
}
String s = out.toString().replace("\n", "<br>");
int response = Messagebox.showDialog(s, title, Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION, msgCallback, (msgCallback == null));