IDEMPIERE-4723 - Deprecate and replace FDialog (#1421)

* IDEMPIERE-4723 - Replace FDialog class

* IDEMPIERE-4723 - Refactor Dialog code

* IDEMPIERE-4723 - Deprecate FDialog

* IDEMPIERE-4723 - Add deprecated message in the FDialog class. Make Dialog final and add a private constructor

* IDEMPIERE-4723 - Remove unused imports
This commit is contained in:
Diego Ruiz 2022-08-09 09:06:21 +02:00 committed by GitHub
parent 5f8e7be3c5
commit da37cf8871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 808 additions and 311 deletions

View File

@ -37,7 +37,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.component.ZkCssHelper; import org.adempiere.webui.component.ZkCssHelper;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridField; import org.compiere.model.GridField;
import org.compiere.model.MRole; import org.compiere.model.MRole;
import org.compiere.util.CLogMgt; import org.compiere.util.CLogMgt;
@ -491,9 +491,9 @@ public class ValuePreference extends Window implements EventListener<Event>
{ {
int no = delete(); int no = delete();
if (no == 0) if (no == 0)
FDialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotFound"); Dialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotFound");
else else
FDialog.info(m_WindowNo, this, "ValuePreferenceDeleted", String.valueOf(no)); Dialog.info(m_WindowNo, "ValuePreferenceDeleted", String.valueOf(no));
detach(); detach();
} }
else else
@ -672,7 +672,7 @@ public class ValuePreference extends Window implements EventListener<Event>
m_Value = " "; m_Value = " ";
else else
{ {
FDialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotInserted"); Dialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotInserted");
return; return;
} }
} }
@ -733,10 +733,10 @@ public class ValuePreference extends Window implements EventListener<Event>
if (no == 1) if (no == 1)
{ {
Env.setContext(m_ctx, getContextKey(), m_Value); Env.setContext(m_ctx, getContextKey(), m_Value);
FDialog.info(m_WindowNo, this, "ValuePreferenceInserted"); Dialog.info(m_WindowNo, "ValuePreferenceInserted");
} }
else else
FDialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotInserted"); Dialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotInserted");
} // insert } // insert

View File

@ -52,7 +52,7 @@ import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.MAcctSchema; import org.compiere.model.MAcctSchema;
import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MAcctSchemaElement;
import org.compiere.model.MColumn; import org.compiere.model.MColumn;
@ -1311,11 +1311,11 @@ public class WAcctViewer extends Window implements EventListener<Event>
{ {
// IDEMPIERE-2392 // IDEMPIERE-2392
if (! MPeriod.isOpen(Env.getCtx(), m_data.AD_Table_ID, m_data.Record_ID, null)) { if (! MPeriod.isOpen(Env.getCtx(), m_data.AD_Table_ID, m_data.Record_ID, null)) {
FDialog.error(0, WAcctViewer.this, "Error", Msg.getMsg(Env.getCtx(), "PeriodClosed")); Dialog.error(0, "Error", Msg.getMsg(Env.getCtx(), "PeriodClosed"));
return; return;
} }
FDialog.ask(m_data.WindowNo, this, "PostImmediate?", new Callback<Boolean>() { Dialog.ask(m_data.WindowNo, "PostImmediate?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -1328,7 +1328,7 @@ public class WAcctViewer extends Window implements EventListener<Event>
m_data.AD_Table_ID, m_data.Record_ID, force); m_data.AD_Table_ID, m_data.Record_ID, force);
//setCursor(Cursor.getDefaultCursor()); //setCursor(Cursor.getDefaultCursor());
if (error != null) if (error != null)
FDialog.error(0, WAcctViewer.this, "PostingError-N", error); Dialog.error(0, "PostingError-N", error);
actionQuery(); actionQuery();
} }

View File

@ -38,7 +38,7 @@ import org.adempiere.webui.component.SimpleListModel;
import org.adempiere.webui.factory.ButtonFactory; import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MRole; import org.compiere.model.MRole;
import org.compiere.model.MSysConfig; import org.compiere.model.MSysConfig;
@ -749,7 +749,7 @@ public class ADSortTab extends Panel implements IADTabpanel
setIsChanged(false); setIsChanged(false);
} }
else { else {
FDialog.error(m_WindowNo, null, "SaveError", info.toString()); Dialog.error(m_WindowNo, "SaveError", info.toString());
} }
} // saveData } // saveData

View File

@ -65,7 +65,7 @@ import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.GridTabDataBinder; import org.adempiere.webui.util.GridTabDataBinder;
import org.adempiere.webui.util.TreeUtils; import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.DataStatusEvent; import org.compiere.model.DataStatusEvent;
import org.compiere.model.DataStatusListener; import org.compiere.model.DataStatusListener;
import org.compiere.model.GridField; import org.compiere.model.GridField;
@ -118,9 +118,9 @@ import org.zkoss.zul.Separator;
import org.zkoss.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Space; import org.zkoss.zul.Space;
import org.zkoss.zul.Style; import org.zkoss.zul.Style;
import org.zkoss.zul.Toolbar;
import org.zkoss.zul.Tabpanels; import org.zkoss.zul.Tabpanels;
import org.zkoss.zul.Tabs; import org.zkoss.zul.Tabs;
import org.zkoss.zul.Toolbar;
import org.zkoss.zul.TreeModel; import org.zkoss.zul.TreeModel;
import org.zkoss.zul.Treeitem; import org.zkoss.zul.Treeitem;
import org.zkoss.zul.Vlayout; import org.zkoss.zul.Vlayout;
@ -1339,7 +1339,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
} }
else else
{ {
FDialog.error(windowNo, e.getMessage()); Dialog.error(windowNo, e.getMessage());
} }
} }
} }
@ -1656,7 +1656,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
String msg = gridTab.processFieldChange(mField); // Dependencies & Callout String msg = gridTab.processFieldChange(mField); // Dependencies & Callout
if (msg.length() > 0) if (msg.length() > 0)
{ {
FDialog.error(windowNo, this, msg); Dialog.error(windowNo, msg);
} }
} }
//if (col >= 0) //if (col >= 0)

View File

@ -41,7 +41,7 @@ import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ITheme;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MRole; import org.compiere.model.MRole;
import org.compiere.model.MSysConfig; import org.compiere.model.MSysConfig;
@ -583,7 +583,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
if (msg == null) { if (msg == null) {
msg = "Could not invoke Toolbar listener method: " + methodName + "()"; msg = "Could not invoke Toolbar listener method: " + methodName + "()";
} }
FDialog.error(windowNo, this, "Error", msg); Dialog.error(windowNo, "Error", msg);
log.log(Level.SEVERE, msg, e); log.log(Level.SEVERE, msg, e);
} }
} }

View File

@ -81,7 +81,7 @@ import org.adempiere.webui.part.ITabOnSelectHandler;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.CustomizeGridViewDialog; import org.adempiere.webui.window.CustomizeGridViewDialog;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.FindWindow; import org.adempiere.webui.window.FindWindow;
import org.adempiere.webui.window.LabelAction; import org.adempiere.webui.window.LabelAction;
import org.adempiere.webui.window.WChat; import org.adempiere.webui.window.WChat;
@ -192,8 +192,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
private int m_onlyCurrentDays = 0; private int m_onlyCurrentDays = 0;
private Component parent;
private boolean m_findCancelled; private boolean m_findCancelled;
private boolean m_findCreateNew; private boolean m_findCreateNew;
@ -241,9 +239,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
*/ */
public Component createPart(Object parent) public Component createPart(Object parent)
{ {
if (parent instanceof Component)
this.parent = (Component) parent;
adTabbox = createADTab(); adTabbox = createADTab();
adTabbox.setSelectionEventListener(this); adTabbox.setSelectionEventListener(this);
adTabbox.setADWindowPanel(this); adTabbox.setADWindowPanel(this);
@ -699,7 +694,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
initFirstTabpanel(); initFirstTabpanel();
} catch (Exception e) { } catch (Exception e) {
if (DBException.isTimeout(e)) { if (DBException.isTimeout(e)) {
FDialog.error(curWindowNo, GridTable.LOAD_TIMEOUT_ERROR_MESSAGE); Dialog.error(curWindowNo, GridTable.LOAD_TIMEOUT_ERROR_MESSAGE);
} }
} }
} }
@ -1164,7 +1159,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
if (isPendingChanges()) if (isPendingChanges())
{ {
showingOnExitDialog = true; showingOnExitDialog = true;
FDialog.ask(curWindowNo, null, "CloseUnSave?", b -> { Dialog.ask(curWindowNo, "CloseUnSave?", b -> {
showingOnExitDialog = false; showingOnExitDialog = false;
callback.onCallback(b); callback.onCallback(b);
if (!b) if (!b)
@ -1447,7 +1442,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
if (!adTabbox.updateSelectedIndex(oldTabIndex, newTabIndex)) if (!adTabbox.updateSelectedIndex(oldTabIndex, newTabIndex))
{ {
FDialog.warn(curWindowNo, "TabSwitchJumpGo", title); Dialog.warn(curWindowNo, "TabSwitchJumpGo", title);
if (callback != null) if (callback != null)
callback.onCallback(false); callback.onCallback(false);
return; return;
@ -1794,7 +1789,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
isImporting = gridTable.isImporting(); isImporting = gridTable.isImporting();
} }
if (!isImporting) { if (!isImporting) {
FDialog.warn(curWindowNo, null, e.getAD_Message(), e.getInfo()); Dialog.warn(curWindowNo, e.getAD_Message(), e.getInfo());
e.setConfirmed(true); // show just once - if MTable.setCurrentRow is involved the status event is re-issued e.setConfirmed(true); // show just once - if MTable.setCurrentRow is involved the status event is re-issued
} }
} }
@ -2070,9 +2065,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
adTabbox.getSelectedGridTab().dataRefreshAll(fireEvent, true); adTabbox.getSelectedGridTab().dataRefreshAll(fireEvent, true);
} catch (Exception e) { } catch (Exception e) {
if (DBException.isTimeout(e)) { if (DBException.isTimeout(e)) {
FDialog.error(getWindowNo(), "GridTabLoadTimeoutError"); Dialog.error(getWindowNo(), "GridTabLoadTimeoutError");
} else { } else {
FDialog.error(getWindowNo(), "Error", e.getMessage()); Dialog.error(getWindowNo(), "Error", e.getMessage());
logger.log(Level.SEVERE, e.getMessage(), e); logger.log(Level.SEVERE, e.getMessage(), e);
} }
adTabbox.getSelectedGridTab().reset(); adTabbox.getSelectedGridTab().reset();
@ -2573,7 +2568,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
if (!Util.isEmpty(dirtyTabpanel.getGridTab().getCommitWarning()) || if (!Util.isEmpty(dirtyTabpanel.getGridTab().getCommitWarning()) ||
(!Env.isAutoCommit(ctx, curWindowNo) && onNavigationEvent)) (!Env.isAutoCommit(ctx, curWindowNo) && onNavigationEvent))
{ {
FDialog.ask(curWindowNo, this.getComponent(), "SaveChanges?", dirtyTabpanel.getGridTab().getCommitWarning(), new Callback<Boolean>() { Dialog.ask(curWindowNo, "SaveChanges?", dirtyTabpanel.getGridTab().getCommitWarning(), new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -2789,7 +2784,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
deleteConfirmationLogic = adTabbox.getSelectedGridTab().getDeleteConfirmationLogic(); deleteConfirmationLogic = adTabbox.getSelectedGridTab().getDeleteConfirmationLogic();
if(Util.isEmpty(deleteConfirmationLogic)) { if(Util.isEmpty(deleteConfirmationLogic)) {
FDialog.ask(curWindowNo, null, "DeleteRecord?", new Callback<Boolean>() { Dialog.ask(curWindowNo, "DeleteRecord?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
{ {
@ -2821,7 +2816,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
editor.fillHorizontal(); editor.fillHorizontal();
editor.setValidInput(deleteConfirmationLogic); editor.setValidInput(deleteConfirmationLogic);
FDialog.askForInputTextConfirmation(curWindowNo, editor, "DeleteRecordWithConfirm?", new Object[] {deleteConfirmationLogic}, null, Dialog.askForInputTextConfirmation(curWindowNo, editor, "DeleteRecordWithConfirm?", new Object[] {deleteConfirmationLogic}, null,
new Callback<Map.Entry<Boolean, String>>() { new Callback<Map.Entry<Boolean, String>>() {
@Override @Override
public void onCallback(Map.Entry<Boolean, String> result) public void onCallback(Map.Entry<Boolean, String> result)
@ -2864,7 +2859,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
sb.append(Env.getContext(ctx, curWindowNo, "_WinInfo_WindowName", false)).append(" - ") sb.append(Env.getContext(ctx, curWindowNo, "_WinInfo_WindowName", false)).append(" - ")
.append(indices.length).append(" ").append(Msg.getMsg(Env.getCtx(), "Selected")); .append(indices.length).append(" ").append(Msg.getMsg(Env.getCtx(), "Selected"));
if(Util.isEmpty(deleteConfirmationLogic)) { if(Util.isEmpty(deleteConfirmationLogic)) {
FDialog.ask(sb.toString(), curWindowNo, null,"DeleteSelection", new Callback<Boolean>() { Dialog.ask(sb.toString(), curWindowNo,"DeleteSelection", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if(result){ if(result){
@ -2906,7 +2901,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
editor.fillHorizontal(); editor.fillHorizontal();
editor.setValidInput(deleteConfirmationLogic); editor.setValidInput(deleteConfirmationLogic);
FDialog.askForInputTextConfirmation(curWindowNo, editor, "DeleteSelectionWithConfirm?", new String[] {Integer.toString(indices.length), deleteConfirmationLogic}, null, Dialog.askForInputTextConfirmation(curWindowNo, editor, "DeleteSelectionWithConfirm?", new String[] {Integer.toString(indices.length), deleteConfirmationLogic}, null,
new Callback<Map.Entry<Boolean, String>>() { new Callback<Map.Entry<Boolean, String>>() {
@Override @Override
public void onCallback(Map.Entry<Boolean, String> result) public void onCallback(Map.Entry<Boolean, String> result)
@ -3039,7 +3034,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
public void onReport() { public void onReport() {
if (!MRole.getDefault().isCanReport(adTabbox.getSelectedGridTab().getAD_Table_ID())) if (!MRole.getDefault().isCanReport(adTabbox.getSelectedGridTab().getAD_Table_ID()))
{ {
FDialog.error(curWindowNo, parent, "AccessCannotReport"); Dialog.error(curWindowNo, "AccessCannotReport");
return; return;
} }
@ -3178,7 +3173,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
int AD_Table_ID=getActiveGridTab().getAD_Table_ID(); int AD_Table_ID=getActiveGridTab().getAD_Table_ID();
final boolean isCanExport=MRole.getDefault().isCanExport(AD_Table_ID); final boolean isCanExport=MRole.getDefault().isCanExport(AD_Table_ID);
if (!isCanExport) { if (!isCanExport) {
FDialog.error(curWindowNo, parent, "AccessCannotExport"); Dialog.error(curWindowNo, "AccessCannotExport");
return; return;
} else { } else {
ExportAction action = new ExportAction(this); ExportAction action = new ExportAction(this);
@ -3267,7 +3262,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{ {
if (adTabbox.getSelectedGridTab().hasChangedCurrentTabAndParents()) { if (adTabbox.getSelectedGridTab().hasChangedCurrentTabAndParents()) {
String msg = CLogger.retrieveErrorString("Please ReQuery Window"); String msg = CLogger.retrieveErrorString("Please ReQuery Window");
FDialog.error(curWindowNo, parent, null, msg); Dialog.error(curWindowNo, null, msg);
return; return;
} }
@ -3363,7 +3358,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
if (record_ID == -1 && adtabPanel.getGridTab().getKeyColumnName().endsWith("_ID")) if (record_ID == -1 && adtabPanel.getGridTab().getKeyColumnName().endsWith("_ID"))
{ {
FDialog.error(curWindowNo, parent, "SaveErrorRowNotFound"); Dialog.error(curWindowNo, "SaveErrorRowNotFound");
return; return;
} }
@ -3457,7 +3452,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
; ;
else else
{ {
FDialog.error(curWindowNo, parent, "PostDocNotComplete"); Dialog.error(curWindowNo, "PostDocNotComplete");
return; return;
} }
} }
@ -3484,7 +3479,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{ {
final int tableIdRef = tableId; final int tableIdRef = tableId;
final int recordIdRef = recordId; final int recordIdRef = recordId;
FDialog.ask(curWindowNo, null, "PostImmediate?", new Callback<Boolean>() { Dialog.ask(curWindowNo, "PostImmediate?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -3607,7 +3602,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{ {
if (isProcessMandatory) if (isProcessMandatory)
{ {
FDialog.error(curWindowNo, null, null, Msg.parseTranslation(ctx, "@NotFound@ @AD_Process_ID@")); Dialog.error(curWindowNo, null, Msg.parseTranslation(ctx, "@NotFound@ @AD_Process_ID@"));
} }
return; return;
} }
@ -3978,7 +3973,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
setupEmbeddedFindwindow(findWindow); setupEmbeddedFindwindow(findWindow);
if (!findWindow.initialize()) { if (!findWindow.initialize()) {
if (findWindow.getTotalRecords() == 0) { if (findWindow.getTotalRecords() == 0) {
FDialog.info(curWindowNo, getComponent(), "NoRecordsFound"); Dialog.info(curWindowNo, "NoRecordsFound");
} }
return false; return false;
} }

View File

@ -28,7 +28,7 @@ import org.adempiere.webui.adwindow.DetailPane.Tabpanel;
import org.adempiere.webui.component.ADTabListModel; import org.adempiere.webui.component.ADTabListModel;
import org.adempiere.webui.component.ADTabListModel.ADTabLabel; import org.adempiere.webui.component.ADTabListModel.ADTabLabel;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.DataStatusEvent; import org.compiere.model.DataStatusEvent;
import org.compiere.model.DataStatusListener; import org.compiere.model.DataStatusListener;
import org.compiere.model.GridField; import org.compiere.model.GridField;
@ -225,7 +225,7 @@ public class CompositeADTabbox extends AbstractADTabbox
} }
else if (tabPanel != null && tabPanel.getGridTab().getRowCount() > 0 else if (tabPanel != null && tabPanel.getGridTab().getRowCount() > 0
&& tabPanel.getGridTab().getCurrentRow() >= 0) { && tabPanel.getGridTab().getCurrentRow() >= 0) {
FDialog.ask(tabPanel.getGridTab().getWindowNo(), null, "DeleteRecord?", new Callback<Boolean>() { Dialog.ask(tabPanel.getGridTab().getWindowNo(), "DeleteRecord?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
@ -248,7 +248,7 @@ public class CompositeADTabbox extends AbstractADTabbox
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(Env.getContext(Env.getCtx(), tabPanel.getGridTab().getWindowNo(), "_WinInfo_WindowName", false)).append(" - ") sb.append(Env.getContext(Env.getCtx(), tabPanel.getGridTab().getWindowNo(), "_WinInfo_WindowName", false)).append(" - ")
.append(indices.length).append(" ").append(Msg.getMsg(Env.getCtx(), "Selected")); .append(indices.length).append(" ").append(Msg.getMsg(Env.getCtx(), "Selected"));
FDialog.ask(sb.toString(), tabPanel.getGridTab().getWindowNo(), null,"DeleteSelection", new Callback<Boolean>() { Dialog.ask(sb.toString(), tabPanel.getGridTab().getWindowNo(),"DeleteSelection", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if(result){ if(result){

View File

@ -50,7 +50,7 @@ import org.adempiere.webui.info.InfoWindow;
import org.adempiere.webui.process.WProcessInfo; import org.adempiere.webui.process.WProcessInfo;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.MultiFileDownloadDialog; import org.adempiere.webui.window.MultiFileDownloadDialog;
import org.adempiere.webui.window.SimplePDFViewer; import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.Adempiere; import org.compiere.Adempiere;
@ -810,7 +810,7 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
return; return;
if (m_pi.isProcessRunning(parameterPanel.getParameters())) { if (m_pi.isProcessRunning(parameterPanel.getParameters())) {
FDialog.error(getWindowNo(), "ProcessAlreadyRunning"); Dialog.error(getWindowNo(), "ProcessAlreadyRunning");
log.log(Level.WARNING, "Abort process " + m_AD_Process_ID + " because it is already running"); log.log(Level.WARNING, "Abort process " + m_AD_Process_ID + " because it is already running");
return; return;
} }
@ -1029,7 +1029,7 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
Executions.schedule(getDesktop(), new EventListener<Event>() { Executions.schedule(getDesktop(), new EventListener<Event>() {
@Override @Override
public void onEvent(Event event) throws Exception { public void onEvent(Event event) throws Exception {
FDialog.ask(getWindowNo(), null, message, callback); Dialog.ask(getWindowNo(), message, callback);
} }
}, new Event("onAsk")); }, new Event("onAsk"));
} }
@ -1269,14 +1269,14 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
Executions.schedule(getDesktop(), new EventListener<Event>() { Executions.schedule(getDesktop(), new EventListener<Event>() {
@Override @Override
public void onEvent(Event event) throws Exception { public void onEvent(Event event) throws Exception {
FDialog.askForInput(m_WindowNo, null, message, callback); Dialog.askForInput(m_WindowNo, message, callback);
} }
}, new Event("onAskForInput")); }, new Event("onAskForInput"));
} }
@Override @Override
public void askForInput(final String message, MLookup lookup, int editorType, final Callback<Object> callback) { public void askForInput(final String message, MLookup lookup, int editorType, final Callback<Object> callback) {
FDialog.askForInput(message, lookup, editorType, callback, getDesktop(), m_WindowNo); Dialog.askForInput(message, lookup, editorType, callback, getDesktop(), m_WindowNo);
} }
@Override @Override

View File

@ -16,7 +16,7 @@ package org.adempiere.webui.apps;
import org.adempiere.util.Callback; import org.adempiere.util.Callback;
import org.adempiere.util.ICalloutUI; import org.adempiere.util.ICalloutUI;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.MLookup; import org.compiere.model.MLookup;
import org.zkoss.zk.ui.Desktop; import org.zkoss.zk.ui.Desktop;
@ -38,7 +38,7 @@ public class CalloutDialog implements ICalloutUI {
@Override @Override
public void askForInput(final String message, MLookup lookup, int editorType, final Callback<Object> callback) { public void askForInput(final String message, MLookup lookup, int editorType, final Callback<Object> callback) {
FDialog.askForInput(message, lookup, editorType, callback, desktop, m_windowNo); Dialog.askForInput(message, lookup, editorType, callback, desktop, m_windowNo);
} }
@Override @Override

View File

@ -37,7 +37,7 @@ import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.FeedbackManager; import org.adempiere.webui.util.FeedbackManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.compiere.model.MAttachment; import org.compiere.model.MAttachment;
import org.compiere.model.MColumn; import org.compiere.model.MColumn;
@ -303,12 +303,12 @@ public class FeedbackRequestWindow extends Window implements EventListener<Event
if (success) if (success)
{ {
FDialog.info(0, null, Msg.getMsg(Env.getCtx(), "Saved")); Dialog.info(0, Msg.getMsg(Env.getCtx(), "Saved"));
} }
else else
{ {
trx.rollback(); trx.rollback();
FDialog.error(0, this, Msg.getMsg(Env.getCtx(), "SaveError")); Dialog.error(0, Msg.getMsg(Env.getCtx(), "SaveError"));
} }
} finally { } finally {
trx.close(); trx.close();

View File

@ -38,7 +38,7 @@ import org.adempiere.webui.process.WProcessInfo;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.SimplePDFViewer; import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.model.MProcess; import org.compiere.model.MProcess;
import org.compiere.model.X_AD_CtxHelp; import org.compiere.model.X_AD_CtxHelp;
@ -545,7 +545,7 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
{ {
if (m_ids == null) if (m_ids == null)
return; return;
FDialog.ask(getWindowNo(), this, "PrintShipments", new Callback<Boolean>() { Dialog.ask(getWindowNo(), "PrintShipments", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if (result) { if (result) {
@ -628,7 +628,7 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
{ {
if (m_ids == null) if (m_ids == null)
return; return;
FDialog.ask(getWindowNo(), this, "PrintInvoices", new Callback<Boolean>() { Dialog.ask(getWindowNo(), "PrintInvoices", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
{ {

View File

@ -49,7 +49,7 @@ import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener; import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.apps.IProcessParameter; import org.compiere.apps.IProcessParameter;
import org.compiere.model.GridField; import org.compiere.model.GridField;
import org.compiere.model.GridFieldVO; import org.compiere.model.GridFieldVO;
@ -536,7 +536,7 @@ public class ProcessParameterPanel extends Panel implements
} // field loop } // field loop
if (sb.length() != 0) { if (sb.length() != 0) {
FDialog.error(m_WindowNo, this, "FillMandatory", sb.toString()); Dialog.error(m_WindowNo, "FillMandatory", sb.toString());
return false; return false;
} }
@ -546,7 +546,7 @@ public class ProcessParameterPanel extends Panel implements
for(IProcessParameterListener listener : listeners) { for(IProcessParameterListener listener : listeners) {
String error = listener.validate(this); String error = listener.validate(this);
if (!Util.isEmpty(error)) { if (!Util.isEmpty(error)) {
FDialog.error(m_WindowNo, this, error); Dialog.error(m_WindowNo, error);
return false; return false;
} }
} }

View File

@ -19,7 +19,8 @@ package org.adempiere.webui.apps;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.Dialog;
import org.compiere.model.MQuery; import org.compiere.model.MQuery;
import org.compiere.model.MRole; import org.compiere.model.MRole;
import org.compiere.model.MTable; import org.compiere.model.MTable;
@ -85,7 +86,7 @@ public class WReport implements EventListener<Event> {
if (log.isLoggable(Level.CONFIG)) log.config("AD_Table_ID=" + AD_Table_ID + " " + query); if (log.isLoggable(Level.CONFIG)) log.config("AD_Table_ID=" + AD_Table_ID + " " + query);
if (!MRole.getDefault().isCanReport(AD_Table_ID)) if (!MRole.getDefault().isCanReport(AD_Table_ID))
{ {
FDialog.error(0, "AccessCannotReport", query.getTableName()); Dialog.error(0, "AccessCannotReport", query.getTableName());
return; return;
} }

View File

@ -16,6 +16,9 @@
*****************************************************************************/ *****************************************************************************/
package org.adempiere.webui.apps.form; package org.adempiere.webui.apps.form;
import static org.adempiere.webui.ClientInfo.MEDIUM_WIDTH;
import static org.adempiere.webui.ClientInfo.SMALL_WIDTH;
import static org.adempiere.webui.ClientInfo.maxWidth;
import static org.compiere.model.SystemIDs.COLUMN_C_INVOICE_C_BPARTNER_ID; import static org.compiere.model.SystemIDs.COLUMN_C_INVOICE_C_BPARTNER_ID;
import static org.compiere.model.SystemIDs.COLUMN_C_INVOICE_C_CURRENCY_ID; import static org.compiere.model.SystemIDs.COLUMN_C_INVOICE_C_CURRENCY_ID;
import static org.compiere.model.SystemIDs.COLUMN_C_PERIOD_AD_ORG_ID; import static org.compiere.model.SystemIDs.COLUMN_C_PERIOD_AD_ORG_ID;
@ -53,7 +56,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm; import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.apps.form.Allocation; import org.compiere.apps.form.Allocation;
import org.compiere.model.MAllocationHdr; import org.compiere.model.MAllocationHdr;
import org.compiere.model.MLookup; import org.compiere.model.MLookup;
@ -75,8 +78,6 @@ import org.zkoss.zul.Hlayout;
import org.zkoss.zul.North; import org.zkoss.zul.North;
import org.zkoss.zul.South; import org.zkoss.zul.South;
import static org.adempiere.webui.ClientInfo.*;
/** /**
* Allocation Form * Allocation Form
* *
@ -572,7 +573,7 @@ public class WAllocation extends Allocation
model.updateComponent(row); model.updateComponent(row);
if(msg != null && msg.length() > 0) if(msg != null && msg.length() > 0)
FDialog.warn(form.getWindowNo(), "AllocationWriteOffWarn"); Dialog.warn(form.getWindowNo(), "AllocationWriteOffWarn");
calculate(); calculate();
} // tableChanged } // tableChanged
@ -743,7 +744,7 @@ public class WAllocation extends Allocation
} }
catch (Exception e) catch (Exception e)
{ {
FDialog.error(form.getWindowNo(), form, "Error", e.getLocalizedMessage()); Dialog.error(form.getWindowNo(), "Error", e.getLocalizedMessage());
return null; return null;
} }
} // saveData } // saveData

View File

@ -64,7 +64,7 @@ import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.WEMailDialog; import org.adempiere.webui.window.WEMailDialog;
import org.compiere.apps.form.Archive; import org.compiere.apps.form.Archive;
import org.compiere.model.MArchive; import org.compiere.model.MArchive;
@ -670,7 +670,7 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
} // updateQDisplay } // updateQDisplay
public void cmd_deleteArchive(){ public void cmd_deleteArchive(){
FDialog.ask(m_WindowNo, this.form, "DeleteRecord?", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "DeleteRecord?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)

View File

@ -38,7 +38,7 @@ import org.adempiere.webui.component.Tabpanels;
import org.adempiere.webui.component.Tabs; import org.adempiere.webui.component.Tabs;
import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.MAttribute; import org.compiere.model.MAttribute;
import org.compiere.model.MAttributeValue; import org.compiere.model.MAttributeValue;
import org.compiere.model.MProduct; import org.compiere.model.MProduct;
@ -376,7 +376,7 @@ public class WAttributeGrid extends ADForm implements EventListener<Event>
if (attr1.equals(attr2)) if (attr1.equals(attr2))
{ {
FDialog.warn(m_WindowNo, "Same Attribute Selected", getTitle()); Dialog.warn(m_WindowNo, "Same Attribute Selected", getTitle());
log.warning("Same Attribute Selected"); log.warning("Same Attribute Selected");
tabbox.setSelectedIndex(0); tabbox.setSelectedIndex(0);
return; return;

View File

@ -42,7 +42,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.apps.form.Charge; import org.compiere.apps.form.Charge;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.Env; import org.compiere.util.Env;
@ -55,8 +55,8 @@ import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zul.North; import org.zkoss.zul.North;
import org.zkoss.zul.South;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
import org.zkoss.zul.South;
/** /**
* This class represents the Custom Form for generating charges * This class represents the Custom Form for generating charges
@ -349,17 +349,17 @@ public class WCharge extends Charge implements IFormController, EventListener<Ev
int elementValueId = createElementValue (value, name, m_chbIsExpense.isChecked()); int elementValueId = createElementValue (value, name, m_chbIsExpense.isChecked());
if (elementValueId == 0) if (elementValueId == 0)
{ {
FDialog.error(form.getWindowNo(), form, "ChargeNotCreated", name); Dialog.error(form.getWindowNo(), "ChargeNotCreated", name);
return; return;
} }
// Create Charge // Create Charge
int chargeId = createCharge(name, elementValueId); int chargeId = createCharge(name, elementValueId);
if (chargeId == 0) if (chargeId == 0)
{ {
FDialog.error(form.getWindowNo(), form, "ChargeNotCreated", name); Dialog.error(form.getWindowNo(), "ChargeNotCreated", name);
return; return;
} }
FDialog.info(form.getWindowNo(), form, "ChargeCreated", name); Dialog.info(form.getWindowNo(), "ChargeCreated", name);
} // createNew } // createNew
/** /**
@ -372,11 +372,11 @@ public class WCharge extends Charge implements IFormController, EventListener<Ev
createAccount(m_tblData); createAccount(m_tblData);
if (listCreated.length() > 0) if (listCreated.length() > 0)
{ {
FDialog.info(form.getWindowNo(), form, "ChargeCreated", listCreated.toString()); Dialog.info(form.getWindowNo(), "ChargeCreated", listCreated.toString());
} }
if (listRejected.length() > 0) if (listRejected.length() > 0)
{ {
FDialog.error(form.getWindowNo(), form, "ChargeNotCreated", listRejected.toString()); Dialog.error(form.getWindowNo(), "ChargeNotCreated", listRejected.toString());
} }
m_selectedCount = 0; m_selectedCount = 0;

View File

@ -38,7 +38,7 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.editor.WStringEditor; import org.adempiere.webui.editor.WStringEditor;
import org.adempiere.webui.editor.WTableDirEditor; import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.grid.CreateFromDepositBatch; import org.compiere.grid.CreateFromDepositBatch;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MBankStatement; import org.compiere.model.MBankStatement;
@ -143,7 +143,7 @@ public class WCreateFromDepositBatchUI extends CreateFromDepositBatch implements
if (getGridTab().getValue("C_DepositBatch_ID") == null) if (getGridTab().getValue("C_DepositBatch_ID") == null)
{ {
FDialog.error(0, window, "SaveErrorRowNotFound"); Dialog.error(0, "SaveErrorRowNotFound");
return false; return false;
} }

View File

@ -28,7 +28,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.StatusBarPanel; import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.apps.form.CreateFromForm; import org.compiere.apps.form.CreateFromForm;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
@ -169,7 +169,7 @@ public class WCreateFromForm extends ADForm implements EventListener<Event>, WTa
} }
catch (Exception ex) catch (Exception ex)
{ {
FDialog.error(getWindowNo(), this, "Error", ex.getLocalizedMessage()); Dialog.error(getWindowNo(), "Error", ex.getLocalizedMessage());
} }
} }
// Cancel // Cancel

View File

@ -40,7 +40,7 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.editor.WStringEditor; import org.adempiere.webui.editor.WStringEditor;
import org.adempiere.webui.editor.WTableDirEditor; import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.grid.CreateFromStatement; import org.compiere.grid.CreateFromStatement;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MBankStatement; import org.compiere.model.MBankStatement;
@ -144,7 +144,7 @@ public class WCreateFromStatementUI extends CreateFromStatement implements Event
if (getGridTab().getValue("C_BankStatement_ID") == null) if (getGridTab().getValue("C_BankStatement_ID") == null)
{ {
FDialog.error(0, window, "SaveErrorRowNotFound"); Dialog.error(0, "SaveErrorRowNotFound");
return false; return false;
} }

View File

@ -28,7 +28,7 @@ import org.adempiere.webui.event.WTableModelListener;
import org.adempiere.webui.panel.StatusBarPanel; import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.grid.CreateFrom; import org.compiere.grid.CreateFrom;
import org.compiere.util.Trx; import org.compiere.util.Trx;
import org.compiere.util.TrxRunnable; import org.compiere.util.TrxRunnable;
@ -165,7 +165,7 @@ public class WCreateFromWindow extends Window implements EventListener<Event>, W
} }
catch (Exception ex) catch (Exception ex)
{ {
FDialog.error(windowNo, this, "Error", ex.getLocalizedMessage()); Dialog.error(windowNo, "Error", ex.getLocalizedMessage());
} }
} }
// Cancel // Cancel

View File

@ -42,7 +42,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ReaderInputStream; import org.adempiere.webui.util.ReaderInputStream;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.impexp.ImpFormat; import org.compiere.impexp.ImpFormat;
import org.compiere.impexp.ImpFormatRow; import org.compiere.impexp.ImpFormatRow;
import org.compiere.model.MRole; import org.compiere.model.MRole;
@ -473,7 +473,7 @@ public class WFileImport extends ADForm implements EventListener<Event>
if (m_format == null) if (m_format == null)
{ {
FDialog.error(m_WindowNo, this, formatName); Dialog.error(m_WindowNo, formatName);
return; return;
} }
@ -568,7 +568,7 @@ public class WFileImport extends ADForm implements EventListener<Event>
{ {
if (m_format == null) if (m_format == null)
{ {
FDialog.error(m_WindowNo, this, "FileImportNoFormat"); Dialog.error(m_WindowNo, "FileImportNoFormat");
return; return;
} }
@ -583,7 +583,7 @@ public class WFileImport extends ADForm implements EventListener<Event>
if (m_format.updateDB(Env.getCtx(), m_data.get(row).toString(), null)) if (m_format.updateDB(Env.getCtx(), m_data.get(row).toString(), null))
imported++; imported++;
FDialog.info(m_WindowNo, this, "FileImportR/I", row + " / " + imported + "#"); Dialog.info(m_WindowNo, "FileImportR/I", row + " / " + imported + "#");
SessionManager.getAppDesktop().closeActiveWindow(); SessionManager.getAppDesktop().closeActiveWindow();
} // cmd_process } // cmd_process

View File

@ -44,7 +44,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.StatusBarPanel; import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.SimplePDFViewer; import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.apps.form.GenForm; import org.compiere.apps.form.GenForm;
import org.compiere.minigrid.IDColumn; import org.compiere.minigrid.IDColumn;
@ -391,7 +391,7 @@ public class WGenForm extends ADForm implements EventListener<Event>, WTableMode
public void onAfterProcess() public void onAfterProcess()
{ {
// OK to print // OK to print
FDialog.ask(getWindowNo(), this, genForm.getAskPrintMsg(), new Callback<Boolean>() { Dialog.ask(getWindowNo(), genForm.getAskPrintMsg(), new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)

View File

@ -33,7 +33,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.apps.form.Merge; import org.compiere.apps.form.Merge;
import org.compiere.model.Lookup; import org.compiere.model.Lookup;
import org.compiere.model.MLookupFactory; import org.compiere.model.MLookupFactory;
@ -246,7 +246,7 @@ public class WMerge extends Merge implements IFormController, EventListener<Even
final String columnNameRef = columnName; final String columnNameRef = columnName;
final int fromIdRef = from_ID; final int fromIdRef = from_ID;
final int toIdRef = to_ID; final int toIdRef = to_ID;
FDialog.ask(m_WindowNo, form, "MergeQuestion", m_msg, new Callback<Boolean>() { Dialog.ask(m_WindowNo, "MergeQuestion", m_msg, new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -294,12 +294,12 @@ public class WMerge extends Merge implements IFormController, EventListener<Even
{ {
if (m_success) if (m_success)
{ {
FDialog.info (m_WindowNo, form, "MergeSuccess", Dialog.info (m_WindowNo, "MergeSuccess",
m_msg + " #" + m_totalCount); m_msg + " #" + m_totalCount);
} }
else else
{ {
FDialog.error(m_WindowNo, form, "MergeError", Dialog.error(m_WindowNo, "MergeError",
m_errorLog.toString()); m_errorLog.toString());
return; return;
} }

View File

@ -51,7 +51,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.SimplePDFViewer; import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.apps.form.PayPrint; import org.compiere.apps.form.PayPrint;
import org.compiere.model.MLookup; import org.compiere.model.MLookup;
@ -366,7 +366,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
fDocumentNo.setValue(documentNo); fDocumentNo.setValue(documentNo);
if(msg != null && msg.length() > 0) if(msg != null && msg.length() > 0)
FDialog.error(m_WindowNo, form, msg); Dialog.error(m_WindowNo, msg);
getPluginFeatures(); getPluginFeatures();
} // loadPaymentRuleInfo } // loadPaymentRuleInfo
@ -442,10 +442,10 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
if (no >= 0) { if (no >= 0) {
Filedownload.save(new FileInputStream(tempFile), m_PaymentExport.getContentType(), filenameForDownload); Filedownload.save(new FileInputStream(tempFile), m_PaymentExport.getContentType(), filenameForDownload);
FDialog.info(m_WindowNo, form, "Saved", Dialog.info(m_WindowNo, "Saved",
Msg.getMsg(Env.getCtx(), "NoOfLines") + "=" + no); Msg.getMsg(Env.getCtx(), "NoOfLines") + "=" + no);
FDialog.ask(m_WindowNo, form, "VPayPrintSuccess?", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "VPayPrintSuccess?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -459,7 +459,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
} }
}); });
} else { } else {
FDialog.error(m_WindowNo, form, "Error", err.toString()); Dialog.error(m_WindowNo, "Error", err.toString());
} }
dispose(); dispose();
} }
@ -486,7 +486,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
*/ */
protected void confirm_cmd_print() protected void confirm_cmd_print()
{ {
FDialog.ask(m_WindowNo, form, "CreatePayments?", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "CreatePayments?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -590,7 +590,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
DB.executeUpdate(sb.toString(), null); DB.executeUpdate(sb.toString(), null);
} }
FDialog.ask(m_WindowNo, form, "VPayPrintPrintRemittance", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "VPayPrintPrintRemittance", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -666,7 +666,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
if (m_C_PaySelection_ID <= 0 || m_C_BankAccount_ID == -1 if (m_C_PaySelection_ID <= 0 || m_C_BankAccount_ID == -1
|| fPaymentRule.getSelectedIndex() == -1 || fDocumentNo.getValue() == null) || fPaymentRule.getSelectedIndex() == -1 || fDocumentNo.getValue() == null)
{ {
FDialog.error(m_WindowNo, form, "VPayPrintNoRecords", Dialog.error(m_WindowNo, "VPayPrintNoRecords",
"(" + Msg.translate(Env.getCtx(), "C_PaySelectionLine_ID") + "=0)"); "(" + Msg.translate(Env.getCtx(), "C_PaySelectionLine_ID") + "=0)");
return false; return false;
} }
@ -679,7 +679,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
// //
if (m_checks == null || m_checks.length == 0) if (m_checks == null || m_checks.length == 0)
{ {
FDialog.error(m_WindowNo, form, "VPayPrintNoRecords", Dialog.error(m_WindowNo, "VPayPrintNoRecords",
"(" + Msg.translate(Env.getCtx(), "C_PaySelectionLine_ID") + " #0"); "(" + Msg.translate(Env.getCtx(), "C_PaySelectionLine_ID") + " #0");
return false; return false;
} }

View File

@ -57,7 +57,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.apps.form.PaySelect; import org.compiere.apps.form.PaySelect;
import org.compiere.model.MPaySelection; import org.compiere.model.MPaySelection;
import org.compiere.model.MSysConfig; import org.compiere.model.MSysConfig;
@ -327,7 +327,7 @@ public class WPaySelect extends PaySelect
fieldBankAccount.appendItem(bi.toString(), bi); fieldBankAccount.appendItem(bi.toString(), bi);
if (fieldBankAccount.getItemCount() == 0) if (fieldBankAccount.getItemCount() == 0)
FDialog.error(m_WindowNo, form, "VPaySelectNoBank"); Dialog.error(m_WindowNo, "VPaySelectNoBank");
else else
fieldBankAccount.setSelectedIndex(0); fieldBankAccount.setSelectedIndex(0);
@ -390,7 +390,7 @@ public class WPaySelect extends PaySelect
if (log.isLoggable(Level.CONFIG)) log.config("PayDate=" + payDate); if (log.isLoggable(Level.CONFIG)) log.config("PayDate=" + payDate);
if (fieldBankAccount.getItemCount() == 0) { if (fieldBankAccount.getItemCount() == 0) {
FDialog.error(m_WindowNo, form, "VPaySelectNoBank"); Dialog.error(m_WindowNo, "VPaySelectNoBank");
return; return;
} }
@ -454,7 +454,7 @@ public class WPaySelect extends PaySelect
loadTableInfo(); loadTableInfo();
// Ask to Open Print Form // Ask to Open Print Form
FDialog.ask(m_WindowNo, form, "VPaySelectPrint?", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "VPaySelectPrint?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -548,14 +548,14 @@ public class WPaySelect extends PaySelect
if(msg != null && msg.length() > 0) if(msg != null && msg.length() > 0)
{ {
FDialog.error(m_WindowNo, form, "SaveError", msg); Dialog.error(m_WindowNo, "SaveError", msg);
return; return;
} }
if (MSysConfig.getBooleanValue(MSysConfig.PAYMENT_SELECTION_MANUAL_ASK_INVOKE_GENERATE, true, m_ps.getAD_Client_ID(), m_ps.getAD_Org_ID())) { if (MSysConfig.getBooleanValue(MSysConfig.PAYMENT_SELECTION_MANUAL_ASK_INVOKE_GENERATE, true, m_ps.getAD_Client_ID(), m_ps.getAD_Org_ID())) {
// Ask to Post it // Ask to Post it
FDialog.ask(m_WindowNo, form, "VPaySelectGenerate?", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "VPaySelectGenerate?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -587,7 +587,7 @@ public class WPaySelect extends PaySelect
public void onEvent(Event event) throws Exception { public void onEvent(Event event) throws Exception {
if (!dialog.isCancel()) { if (!dialog.isCancel()) {
if (dialog.getProcessInfo().isError()) { if (dialog.getProcessInfo().isError()) {
FDialog.error(m_WindowNo, form, Msg.parseTranslation(Env.getCtx(), dialog.getProcessInfo().getSummary())); Dialog.error(m_WindowNo, Msg.parseTranslation(Env.getCtx(), dialog.getProcessInfo().getSummary()));
return; return;
} }
} }
@ -654,7 +654,7 @@ public class WPaySelect extends PaySelect
Executions.schedule(form.getDesktop(), new EventListener<Event>() { Executions.schedule(form.getDesktop(), new EventListener<Event>() {
@Override @Override
public void onEvent(Event event) throws Exception { public void onEvent(Event event) throws Exception {
FDialog.ask(m_WindowNo, null, message, callback); Dialog.ask(m_WindowNo, message, callback);
} }
}, new Event("onAsk")); }, new Event("onAsk"));
} }
@ -670,7 +670,7 @@ public class WPaySelect extends PaySelect
Executions.schedule(form.getDesktop(), new EventListener<Event>() { Executions.schedule(form.getDesktop(), new EventListener<Event>() {
@Override @Override
public void onEvent(Event event) throws Exception { public void onEvent(Event event) throws Exception {
FDialog.askForInput(m_WindowNo, null, message, callback); Dialog.askForInput(m_WindowNo, message, callback);
} }
}, new Event("onAskForInput")); }, new Event("onAskForInput"));
} }

View File

@ -31,7 +31,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.editor.WDateEditor; import org.adempiere.webui.editor.WDateEditor;
import org.adempiere.webui.editor.WNumberEditor; import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.grid.PaymentFormCash; import org.compiere.grid.PaymentFormCash;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MConversionRate; import org.compiere.model.MConversionRate;
@ -199,7 +199,7 @@ public class WPaymentFormCash extends PaymentFormCash implements EventListener<E
// Check & Cash (Payment) must have a bank account // Check & Cash (Payment) must have a bank account
if (C_BankAccount_ID == 0 && m_Cash_As_Payment) if (C_BankAccount_ID == 0 && m_Cash_As_Payment)
{ {
FDialog.error(getWindowNo(), window, "FillMandatory", bBankAccountLabel.getValue()); Dialog.error(getWindowNo(), "FillMandatory", bBankAccountLabel.getValue());
dataOK = false; dataOK = false;
} }
} }
@ -230,9 +230,9 @@ public class WPaymentFormCash extends PaymentFormCash implements EventListener<E
boolean ok = save(newC_BankAccount_ID,newC_CashBook_ID, newDateAcct, (BigDecimal) bAmountField.getValue(), trxName); boolean ok = save(newC_BankAccount_ID,newC_CashBook_ID, newDateAcct, (BigDecimal) bAmountField.getValue(), trxName);
if (!ok) if (!ok)
FDialog.error(getWindowNo(), window, "PaymentError", processMsg); Dialog.error(getWindowNo(), "PaymentError", processMsg);
else if (processMsg != null) else if (processMsg != null)
FDialog.info(getWindowNo(), window, "PaymentCreated", processMsg); Dialog.info(getWindowNo(), "PaymentCreated", processMsg);
return ok; return ok;
} }

View File

@ -33,7 +33,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox; import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.editor.WNumberEditor; import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.grid.PaymentFormCheck; import org.compiere.grid.PaymentFormCheck;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MBankAccountProcessor;
@ -255,26 +255,26 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
String error = MPaymentValidate.validateRoutingNo(sRoutingField.getText()); String error = MPaymentValidate.validateRoutingNo(sRoutingField.getText());
if (error.length() != 0) if (error.length() != 0)
{ {
FDialog.error(getWindowNo(), window, error); Dialog.error(getWindowNo(), error);
dataOK = false; dataOK = false;
} }
error = MPaymentValidate.validateAccountNo(sNumberField.getText()); error = MPaymentValidate.validateAccountNo(sNumberField.getText());
if (error.length() != 0) if (error.length() != 0)
{ {
FDialog.error(getWindowNo(), window, error); Dialog.error(getWindowNo(), error);
dataOK = false; dataOK = false;
} }
error = MPaymentValidate.validateCheckNo(sCheckField.getText()); error = MPaymentValidate.validateCheckNo(sCheckField.getText());
if (error.length() != 0) if (error.length() != 0)
{ {
FDialog.error(getWindowNo(), window, error); Dialog.error(getWindowNo(), error);
dataOK = false; dataOK = false;
} }
// Check & Cash (Payment) must have a bank account // Check & Cash (Payment) must have a bank account
if (C_BankAccount_ID == 0) if (C_BankAccount_ID == 0)
{ {
FDialog.error(getWindowNo(), window, "FillMandatory", sBankAccountLabel.getValue()); Dialog.error(getWindowNo(), "FillMandatory", sBankAccountLabel.getValue());
dataOK = false; dataOK = false;
} }
// //
@ -293,9 +293,9 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
boolean ok = save(newC_BankAccount_ID, sRoutingField.getText(), sNumberField.getText(), boolean ok = save(newC_BankAccount_ID, sRoutingField.getText(), sNumberField.getText(),
sCheckField.getText(), (BigDecimal) sAmountField.getValue(), trxName); sCheckField.getText(), (BigDecimal) sAmountField.getValue(), trxName);
if (!ok) if (!ok)
FDialog.error(getWindowNo(), window, "PaymentError", processMsg); Dialog.error(getWindowNo(), "PaymentError", processMsg);
else if (processMsg != null) else if (processMsg != null)
FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo()); Dialog.info(getWindowNo(), "PaymentCreated", m_mPayment.getDocumentNo());
return ok; return ok;
} }

View File

@ -31,7 +31,7 @@ import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.editor.WNumberEditor; import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.factory.ButtonFactory; import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.grid.PaymentFormCreditCard; import org.compiere.grid.PaymentFormCreditCard;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MBankAccountProcessor;
@ -279,9 +279,9 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
boolean ok = save(newCCType, kNumberField.getText(), kExpField.getText(), (BigDecimal) kAmountField.getValue(), trxName); boolean ok = save(newCCType, kNumberField.getText(), kExpField.getText(), (BigDecimal) kAmountField.getValue(), trxName);
if(!ok) if(!ok)
FDialog.error(getWindowNo(), window, "PaymentError", processMsg); Dialog.error(getWindowNo(), "PaymentError", processMsg);
else if (processMsg != null) else if (processMsg != null)
FDialog.info(getWindowNo(), window, "PaymentCreated", processMsg); Dialog.info(getWindowNo(), "PaymentCreated", processMsg);
return ok; return ok;
} }
@ -298,12 +298,12 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
boolean ok = processOnline(CCType, kNumberField.getText(), kApprovalField.getText(), kExpField.getText()); boolean ok = processOnline(CCType, kNumberField.getText(), kApprovalField.getText(), kExpField.getText());
if (!ok) if (!ok)
FDialog.error(getWindowNo(), window, "PaymentNotProcessed", processMsg); Dialog.error(getWindowNo(), "PaymentNotProcessed", processMsg);
else else
{ {
loadData(); loadData();
if (processMsg != null) if (processMsg != null)
FDialog.info(getWindowNo(), window, "PaymentProcessed", processMsg); Dialog.info(getWindowNo(), "PaymentProcessed", processMsg);
} }
} // online } // online

View File

@ -30,7 +30,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox; import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.grid.PaymentFormDirect; import org.compiere.grid.PaymentFormDirect;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MBankAccountProcessor;
@ -151,7 +151,7 @@ public abstract class WPaymentFormDirect extends PaymentFormDirect implements Ev
KeyNamePair bpba = selected != null ? selected.toKeyNamePair() : null; KeyNamePair bpba = selected != null ? selected.toKeyNamePair() : null;
if (bpba == null) if (bpba == null)
{ {
FDialog.error(getWindowNo(), window, "PaymentBPBankNotFound"); Dialog.error(getWindowNo(), "PaymentBPBankNotFound");
dataOK = false; dataOK = false;
} }
// //
@ -163,9 +163,9 @@ public abstract class WPaymentFormDirect extends PaymentFormDirect implements Ev
public boolean saveChangesInTrx(final String trxName) { public boolean saveChangesInTrx(final String trxName) {
boolean ok = save(0, tRoutingField.getText(), tNumberField.getText(), trxName); boolean ok = save(0, tRoutingField.getText(), tNumberField.getText(), trxName);
if (!ok) if (!ok)
FDialog.error(getWindowNo(), window, "PaymentError", processMsg); Dialog.error(getWindowNo(), "PaymentError", processMsg);
else if (processMsg != null) else if (processMsg != null)
FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo()); Dialog.info(getWindowNo(), "PaymentCreated", m_mPayment.getDocumentNo());
return ok; return ok;
} }

View File

@ -21,7 +21,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents; import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.grid.PaymentForm; import org.compiere.grid.PaymentForm;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
@ -66,7 +66,7 @@ public class WPaymentFormWindow extends Window implements EventListener<Event>,
zkInit(); zkInit();
initOK = dynInit(); // Null Pointer if order/invoice not saved yet initOK = dynInit(); // Null Pointer if order/invoice not saved yet
} catch (Exception ex) { } catch (Exception ex) {
FDialog.error(windowNo, this, ex.getMessage() == null ? ex.toString() : ex.getMessage()); Dialog.error(windowNo, ex.getMessage() == null ? ex.toString() : ex.getMessage());
initOK = false; initOK = false;
} }

View File

@ -34,7 +34,7 @@ import org.adempiere.webui.component.ZkCssHelper;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.CustomizeGridViewDialog; import org.adempiere.webui.window.CustomizeGridViewDialog;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.DataStatusEvent; import org.compiere.model.DataStatusEvent;
import org.compiere.model.GridField; import org.compiere.model.GridField;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
@ -217,7 +217,7 @@ public class WQuickForm extends Window implements IQuickForm
{ {
if (gridTab.getTableModel().getRowChanged() > -1) if (gridTab.getTableModel().getRowChanged() > -1)
{ {
FDialog.ask(windowNo, this, "SaveChanges?", new Callback <Boolean>() { Dialog.ask(windowNo, "SaveChanges?", new Callback <Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -296,7 +296,7 @@ public class WQuickForm extends Window implements IQuickForm
final int[] indices = gridTab.getSelection(); final int[] indices = gridTab.getSelection();
if (indices.length > 0) if (indices.length > 0)
{ {
FDialog.ask(windowNo, this, "DeleteRecord?", new Callback <Boolean>() { Dialog.ask(windowNo, "DeleteRecord?", new Callback <Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)

View File

@ -47,7 +47,7 @@ import org.adempiere.webui.panel.WRCTabPanel;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.ZkReportViewer; import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.model.MRole; import org.compiere.model.MRole;
import org.compiere.model.Query; import org.compiere.model.Query;
@ -161,7 +161,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
catch(Exception e) catch(Exception e)
{ {
log.log(Level.SEVERE, "", e); log.log(Level.SEVERE, "", e);
FDialog.error(m_WindowNo, "LoadError", e.getLocalizedMessage()); Dialog.error(m_WindowNo, "LoadError", e.getLocalizedMessage());
} }
} }
@ -453,7 +453,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
log.config(""); log.config("");
if (!m_isCanExport) if (!m_isCanExport)
{ {
FDialog.error(m_WindowNo, "AccessCannotExport","Export"); Dialog.error(m_WindowNo, "AccessCannotExport","Export");
return; return;
} }
@ -520,7 +520,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
ListItem li = cboType.getSelectedItem(); ListItem li = cboType.getSelectedItem();
if(li == null || li.getValue() == null) if(li == null || li.getValue() == null)
{ {
FDialog.error(m_WindowNo, winExportFile, "FileInvalidExtension"); Dialog.error(m_WindowNo, "FileInvalidExtension");
return; return;
} }
@ -581,7 +581,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
} }
else else
{ {
FDialog.error(m_WindowNo, winExportFile, "FileInvalidExtension"); Dialog.error(m_WindowNo, "FileInvalidExtension");
return; return;
} }

View File

@ -35,7 +35,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.MLookup; import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory; import org.compiere.model.MLookupFactory;
import org.compiere.model.MPasswordHistory; import org.compiere.model.MPasswordHistory;
@ -382,7 +382,7 @@ public class WResetPassword implements IFormController, EventListener<Event>, Va
throw e; throw e;
} }
clearForm(); clearForm();
FDialog.info(form.getWindowNo(), form, "RecordSaved"); Dialog.info(form.getWindowNo(), "RecordSaved");
return; return;
} }

View File

@ -41,7 +41,7 @@ import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.apps.form.StatementCreateFromBatch; import org.compiere.apps.form.StatementCreateFromBatch;
import org.compiere.model.MBankStatement; import org.compiere.model.MBankStatement;
import org.compiere.model.MColumn; import org.compiere.model.MColumn;
@ -145,7 +145,7 @@ public class WStatementCreateFromBatch extends StatementCreateFromBatch implemen
if (form.getGridTab() != null && form.getGridTab().getValue("C_BankStatement_ID") == null) if (form.getGridTab() != null && form.getGridTab().getValue("C_BankStatement_ID") == null)
{ {
FDialog.error(0, form, "SaveErrorRowNotFound"); Dialog.error(0, "SaveErrorRowNotFound");
return false; return false;
} }

View File

@ -52,7 +52,7 @@ import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.panel.WTabEditorForm; import org.adempiere.webui.panel.WTabEditorForm;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.apps.form.TabEditor; import org.compiere.apps.form.TabEditor;
import org.compiere.model.GridField; import org.compiere.model.GridField;
import org.compiere.model.MColumn; import org.compiere.model.MColumn;
@ -157,7 +157,7 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
if (udt.getAD_UserDef_Win().getAD_Language() != null && !udt.getAD_UserDef_Win().getAD_Language().equals(Env.getAD_Language(Env.getCtx()))) if (udt.getAD_UserDef_Win().getAD_Language() != null && !udt.getAD_UserDef_Win().getAD_Language().equals(Env.getAD_Language(Env.getCtx())))
{ {
FDialog.error(m_WindowNo, "TabEditorWrongLanguage"); Dialog.error(m_WindowNo, "TabEditorWrongLanguage");
tabform.detach(); tabform.detach();
return; return;
} }

View File

@ -36,7 +36,7 @@ import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.TreeUtils; import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.apps.form.TreeMaintenance; import org.compiere.apps.form.TreeMaintenance;
import org.compiere.model.MTree; import org.compiere.model.MTree;
import org.compiere.model.MTreeNode; import org.compiere.model.MTreeNode;
@ -486,7 +486,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
private void action_treeAddAll() private void action_treeAddAll()
{ {
// idempiere-85 // idempiere-85
FDialog.ask(m_WindowNo, null, "TreeAddAllItems", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "TreeAddAllItems", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -514,7 +514,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
{ {
log.info(""); log.info("");
// idempiere-85 // idempiere-85
FDialog.ask(m_WindowNo, null, "TreeRemoveAllItems", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "TreeRemoveAllItems", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)

View File

@ -42,7 +42,7 @@ import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.MColumn; import org.compiere.model.MColumn;
import org.compiere.model.MLookup; import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory; import org.compiere.model.MLookupFactory;
@ -621,7 +621,7 @@ public class WWFActivity extends ADForm implements EventListener<Event>
} }
if (!m_activity.forwardTo(fw, textMsg)) if (!m_activity.forwardTo(fw, textMsg))
{ {
FDialog.error(m_WindowNo, this, "CannotForward"); Dialog.error(m_WindowNo, "CannotForward");
trx.rollback(); trx.rollback();
trx.close(); trx.close();
return; return;
@ -642,7 +642,7 @@ public class WWFActivity extends ADForm implements EventListener<Event>
} }
if (value == null || value.length() == 0) if (value == null || value.length() == 0)
{ {
FDialog.error(m_WindowNo, this, "FillMandatory", Msg.getMsg(Env.getCtx(), "Answer")); Dialog.error(m_WindowNo, "FillMandatory", Msg.getMsg(Env.getCtx(), "Answer"));
trx.rollback(); trx.rollback();
trx.close(); trx.close();
return; return;
@ -658,7 +658,7 @@ public class WWFActivity extends ADForm implements EventListener<Event>
catch (Exception e) catch (Exception e)
{ {
log.log(Level.SEVERE, node.getName(), e); log.log(Level.SEVERE, node.getName(), e);
FDialog.error(m_WindowNo, this, "Error", e.toString()); Dialog.error(m_WindowNo, "Error", e.toString());
trx.rollback(); trx.rollback();
trx.close(); trx.close();
return; return;
@ -678,7 +678,7 @@ public class WWFActivity extends ADForm implements EventListener<Event>
catch (Exception e) catch (Exception e)
{ {
log.log(Level.SEVERE, node.getName(), e); log.log(Level.SEVERE, node.getName(), e);
FDialog.error(m_WindowNo, this, "Error", e.toString()); Dialog.error(m_WindowNo, "Error", e.toString());
trx.rollback(); trx.rollback();
trx.close(); trx.close();
return; return;

View File

@ -15,7 +15,7 @@ import org.adempiere.webui.dashboard.DPFavourites;
import org.adempiere.webui.desktop.FavouriteController; import org.adempiere.webui.desktop.FavouriteController;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.TreeUtils; import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.MTable; import org.compiere.model.MTable;
import org.compiere.model.MTreeFavoriteNode; import org.compiere.model.MTreeFavoriteNode;
import org.compiere.model.MTreeNode; import org.compiere.model.MTreeNode;
@ -98,7 +98,7 @@ public class ADTreeFavoriteOnDropListener implements EventListener<Event>
} }
else else
{ {
FDialog.error(0, "DragItemMenu"); Dialog.error(0, "DragItemMenu");
return; return;
} }
@ -198,7 +198,7 @@ public class ADTreeFavoriteOnDropListener implements EventListener<Event>
*/ */
private void showWarningDialog() private void showWarningDialog()
{ {
FDialog.warn(0, Msg.getMsg(Env.getCtx(), "AlreadyExists")); Dialog.warn(0, Msg.getMsg(Env.getCtx(), "AlreadyExists"));
} // showWarningDialog } // showWarningDialog
/** /**

View File

@ -20,7 +20,7 @@ import org.adempiere.webui.adwindow.ADWindowContent;
import org.adempiere.webui.adwindow.IADTabpanel; import org.adempiere.webui.adwindow.IADTabpanel;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.TreeUtils; import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.MTree; import org.compiere.model.MTree;
import org.compiere.model.MTreeNode; import org.compiere.model.MTreeNode;
import org.compiere.model.PO; import org.compiere.model.PO;
@ -214,7 +214,7 @@ public class ADTreeOnDropListener implements EventListener<Event> {
catch (Exception e) catch (Exception e)
{ {
trx.rollback(); trx.rollback();
FDialog.error(windowNo, tree, "TreeUpdateError", e.getLocalizedMessage()); Dialog.error(windowNo, "TreeUpdateError", e.getLocalizedMessage());
} }
finally finally
{ {

View File

@ -19,7 +19,7 @@ import java.util.Arrays;
import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.MSysConfig; import org.compiere.model.MSysConfig;
import org.compiere.util.Ini; import org.compiere.util.Ini;
import org.compiere.util.Util; import org.compiere.util.Util;
@ -200,7 +200,7 @@ public class FolderBrowser extends Window implements EventListener<Event>
{ {
if(!file.isDirectory() || !file.exists()) if(!file.isDirectory() || !file.exists())
{ {
FDialog.error(0, "Invalid directory"); Dialog.error(0, "Invalid directory");
return; return;
} }
} }
@ -208,7 +208,7 @@ public class FolderBrowser extends Window implements EventListener<Event>
{ {
if(!file.isFile() || !file.exists()) if(!file.isFile() || !file.exists())
{ {
FDialog.error(0, "Invalid file"); Dialog.error(0, "Invalid file");
return; return;
} }
} }

View File

@ -34,7 +34,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WTableDirEditor; import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.MColumn; import org.compiere.model.MColumn;
import org.compiere.model.MLookup; import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory; import org.compiere.model.MLookupFactory;
@ -326,7 +326,7 @@ public class RequestWindow extends Window implements EventListener<Event> {
} }
else else
{ {
FDialog.error(0, this, "Request record not saved"); Dialog.error(0, "Request record not saved");
return; return;
} }

View File

@ -55,7 +55,7 @@ import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.UserPreference; import org.adempiere.webui.util.UserPreference;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridField; import org.compiere.model.GridField;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.I_AD_Preference; import org.compiere.model.I_AD_Preference;
@ -772,7 +772,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
int AD_Table_ID = MTable.getTable_ID(query.getTableName()); int AD_Table_ID = MTable.getTable_ID(query.getTableName());
if (!MRole.getDefault().isCanReport(AD_Table_ID)) if (!MRole.getDefault().isCanReport(AD_Table_ID))
{ {
FDialog.error(0, null, "AccessCannotReport", query.getTableName()); Dialog.error(0, "AccessCannotReport", query.getTableName());
return; return;
} }
if (AD_Table_ID != 0) if (AD_Table_ID != 0)

View File

@ -31,7 +31,7 @@ import org.adempiere.webui.panel.IHelpContext;
import org.adempiere.webui.panel.InfoPanel; import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.part.WindowContainer; import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.WTask; import org.adempiere.webui.window.WTask;
import org.compiere.model.MInfoWindow; import org.compiere.model.MInfoWindow;
import org.compiere.model.MQuery; import org.compiere.model.MQuery;
@ -122,7 +122,7 @@ public abstract class TabbedDesktop extends AbstractDesktop {
windowContainer.addWindow(tabPanel, title, true, DecorateInfo.get(MInfoWindow.get(infoId, null))); windowContainer.addWindow(tabPanel, title, true, DecorateInfo.get(MInfoWindow.get(infoId, null)));
infoPanel.focus(); infoPanel.focus();
} else { } else {
FDialog.error(0, "NotValid"); Dialog.error(0, "NotValid");
} }
} }

View File

@ -29,7 +29,7 @@ import org.adempiere.webui.editor.WLocationEditor;
import org.adempiere.webui.event.ValueChangeEvent; import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener; import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.MBPartner; import org.compiere.model.MBPartner;
import org.compiere.model.MBPartnerLocation; import org.compiere.model.MBPartnerLocation;
import org.compiere.model.MLocation; import org.compiere.model.MLocation;
@ -311,7 +311,7 @@ public class WBPartner extends Window implements EventListener<Event>, ValueChan
if (m_partner.get_ID() == 0) if (m_partner.get_ID() == 0)
{ {
FDialog.error(m_WindowNo, this, "BPartnerNotFound"); Dialog.error(m_WindowNo, "BPartnerNotFound");
return false; return false;
} }
@ -439,7 +439,7 @@ public class WBPartner extends Window implements EventListener<Event>, ValueChan
if (m_partner.save()) { if (m_partner.save()) {
if (log.isLoggable(Level.FINE)) log.fine("C_BPartner_ID=" + m_partner.getC_BPartner_ID()); if (log.isLoggable(Level.FINE)) log.fine("C_BPartner_ID=" + m_partner.getC_BPartner_ID());
} else { } else {
FDialog.error(m_WindowNo, this, "BPartnerNotSaved"); Dialog.error(m_WindowNo, "BPartnerNotSaved");
m_partner = null; m_partner = null;
return false; return false;
} }
@ -458,7 +458,7 @@ public class WBPartner extends Window implements EventListener<Event>, ValueChan
if (m_pLocation.save()) { if (m_pLocation.save()) {
if (log.isLoggable(Level.FINE)) log.fine("C_BPartner_Location_ID=" + m_pLocation.getC_BPartner_Location_ID()); if (log.isLoggable(Level.FINE)) log.fine("C_BPartner_Location_ID=" + m_pLocation.getC_BPartner_Location_ID());
} else { } else {
FDialog.error(m_WindowNo, this, "BPartnerNotSaved", Msg.translate(Env.getCtx(), "C_BPartner_Location_ID")); Dialog.error(m_WindowNo, "BPartnerNotSaved", Msg.translate(Env.getCtx(), "C_BPartner_Location_ID"));
} }
// ***** Business Partner - User ***** // ***** Business Partner - User *****
@ -493,7 +493,7 @@ public class WBPartner extends Window implements EventListener<Event>, ValueChan
if (m_user.save()) { if (m_user.save()) {
if (log.isLoggable(Level.FINE)) log.fine("AD_User_ID=" + m_user.getAD_User_ID()); if (log.isLoggable(Level.FINE)) log.fine("AD_User_ID=" + m_user.getAD_User_ID());
} else { } else {
FDialog.error(m_WindowNo, this, "BPartnerNotSaved", Msg.translate(Env.getCtx(), "AD_User_ID")); Dialog.error(m_WindowNo, "BPartnerNotSaved", Msg.translate(Env.getCtx(), "AD_User_ID"));
} }
} }
return true; return true;

View File

@ -32,7 +32,7 @@ import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridField; import org.compiere.model.GridField;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.GridTable; import org.compiere.model.GridTable;
@ -367,7 +367,7 @@ public class WQuickEntry extends AbstractWQuickEntry implements EventListener<Ev
if (quickPOs.get(0).get_ID() == 0) if (quickPOs.get(0).get_ID() == 0)
{ {
FDialog.error(m_WindowNo, this, "RecordNotFound"); Dialog.error(m_WindowNo, "RecordNotFound");
return false; return false;
} }
@ -416,7 +416,7 @@ public class WQuickEntry extends AbstractWQuickEntry implements EventListener<Ev
for (GridField field : quickFields) { for (GridField field : quickFields) {
String msg = field.getGridTab().processCallout(field); String msg = field.getGridTab().processCallout(field);
if (! Util.isEmpty(msg)) { if (! Util.isEmpty(msg)) {
FDialog.error(m_WindowNo, this, "", msg); Dialog.error(m_WindowNo, "", msg);
return false; return false;
} }
} }
@ -466,7 +466,7 @@ public class WQuickEntry extends AbstractWQuickEntry implements EventListener<Ev
} }
} }
if (savePO && fillMandatoryError) { if (savePO && fillMandatoryError) {
FDialog.error(m_WindowNo, this, "FillMandatory", mandatoryFields.toString()); Dialog.error(m_WindowNo, "FillMandatory", mandatoryFields.toString());
return false; return false;
} }
if (savePO) { if (savePO) {
@ -477,7 +477,7 @@ public class WQuickEntry extends AbstractWQuickEntry implements EventListener<Ev
} }
} }
if(gridtab.getTabLevel()>0 && !isParentSave){ if(gridtab.getTabLevel()>0 && !isParentSave){
FDialog.error(m_WindowNo, this, "FillMinimumInfo",tabZeroName); Dialog.error(m_WindowNo, "FillMinimumInfo",tabZeroName);
return false; return false;
} }
po.saveEx(); po.saveEx();

View File

@ -65,7 +65,7 @@ import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.minigrid.ColumnInfo; import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.EmbedWinInfo; import org.compiere.minigrid.EmbedWinInfo;
import org.compiere.minigrid.IDColumn; import org.compiere.minigrid.IDColumn;
@ -2008,12 +2008,12 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
{ {
if (log.isLoggable(Level.INFO)) if (log.isLoggable(Level.INFO))
log.log(Level.INFO, countSql, e); log.log(Level.INFO, countSql, e);
FDialog.error(p_WindowNo, INFO_QUERY_TIME_OUT_ERROR); Dialog.error(p_WindowNo, INFO_QUERY_TIME_OUT_ERROR);
} }
else else
{ {
log.log(Level.SEVERE, countSql, e); log.log(Level.SEVERE, countSql, e);
FDialog.error(p_WindowNo, "DBExecuteError", e.getMessage()); Dialog.error(p_WindowNo, "DBExecuteError", e.getMessage());
} }
m_count = -2; m_count = -2;
} }
@ -2029,7 +2029,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
{ {
if (promptError) if (promptError)
{ {
FDialog.error(getWindowNo(), this, "InfoFindOverMax", Dialog.error(getWindowNo(), "InfoFindOverMax",
m_count + " > " + infoWindow.getMaxQueryRecords()); m_count + " > " + infoWindow.getMaxQueryRecords());
} }
m_count = 0; m_count = 0;
@ -2404,7 +2404,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
} }
String msg = Msg.translate(ctx, sbError.toString()); String msg = Msg.translate(ctx, sbError.toString());
FDialog.error(0, this, "ValidationError", msg); // TODO messaggio Dialog.error(0, "ValidationError", msg); // TODO messaggio
} }
else else
changeIsValid = true; changeIsValid = true;
@ -2413,7 +2413,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
{ {
log.log(Level.SEVERE, "Error executing validation SQL: " + validationSQL, e); log.log(Level.SEVERE, "Error executing validation SQL: " + validationSQL, e);
FDialog.error(0, this, "Error", validationSQL); // TODO messaggio Dialog.error(0, "Error", validationSQL); // TODO messaggio
changeIsValid = false; changeIsValid = false;
} }
} }

View File

@ -42,7 +42,7 @@ import org.adempiere.webui.component.SimpleListModel;
import org.adempiere.webui.factory.ButtonFactory; import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.I_AD_Field; import org.compiere.model.I_AD_Field;
import org.compiere.model.MField; import org.compiere.model.MField;
import org.compiere.model.MRefList; import org.compiere.model.MRefList;
@ -602,13 +602,12 @@ public class CustomizeGridViewPanel extends Panel
ok = MTabCustomization.saveData(Env.getCtx(), m_AD_Tab_ID, m_AD_User_ID, custom.toString(), dView, null, false, isAutoHide); ok = MTabCustomization.saveData(Env.getCtx(), m_AD_Tab_ID, m_AD_User_ID, custom.toString(), dView, null, false, isAutoHide);
if(ok) { if(ok) {
m_saved = true; m_saved = true;
// FDialog.info(m_WindowNo, null, "Saved");
getParent().detach(); getParent().detach();
if(gridPanel!=null){ if(gridPanel!=null){
Events.postEvent("onCustomizeGrid", gridPanel, null); Events.postEvent("onCustomizeGrid", gridPanel, null);
} }
} else { } else {
FDialog.error(m_WindowNo, null, "SaveError", custom.toString()); Dialog.error(m_WindowNo, "SaveError", custom.toString());
} }
} // saveData } // saveData

View File

@ -34,7 +34,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox; import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.minigrid.ColumnInfo; import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn; import org.compiere.minigrid.IDColumn;
import org.compiere.model.I_C_ElementValue; import org.compiere.model.I_C_ElementValue;
@ -437,7 +437,7 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener<Event>
// Miminum check // Miminum check
if (m_queryColumns.size() == 0) if (m_queryColumns.size() == 0)
{ {
FDialog.error(p_WindowNo, this, "Error", Msg.getMsg(Env.getCtx(),"NoQueryColumnsFound")); Dialog.error(p_WindowNo, "Error", Msg.getMsg(Env.getCtx(),"NoQueryColumnsFound"));
log.log(Level.SEVERE, "No query columns found"); log.log(Level.SEVERE, "No query columns found");
return false; return false;
} }
@ -568,7 +568,7 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener<Event>
if (list.size() == 0) if (list.size() == 0)
{ {
FDialog.error(p_WindowNo, this, "Error", "No Info Columns"); Dialog.error(p_WindowNo, "Error", "No Info Columns");
log.log(Level.SEVERE, "No Info for AD_Table_ID=" + AD_Table_ID + " - " + sql); log.log(Level.SEVERE, "No Info for AD_Table_ID=" + AD_Table_ID + " - " + sql);
return false; return false;
} }

View File

@ -67,7 +67,7 @@ import org.adempiere.webui.part.ITabOnSelectHandler;
import org.adempiere.webui.part.WindowContainer; import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.minigrid.ColumnInfo; import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn; import org.compiere.minigrid.IDColumn;
import org.compiere.model.GridField; import org.compiere.model.GridField;
@ -1088,12 +1088,12 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
{ {
if (log.isLoggable(Level.INFO)) if (log.isLoggable(Level.INFO))
log.log(Level.INFO, dataSql, e); log.log(Level.INFO, dataSql, e);
FDialog.error(p_WindowNo, INFO_QUERY_TIME_OUT_ERROR); Dialog.error(p_WindowNo, INFO_QUERY_TIME_OUT_ERROR);
} }
else else
{ {
log.log(Level.SEVERE, dataSql, e); log.log(Level.SEVERE, dataSql, e);
FDialog.error(p_WindowNo, "DBExecuteError", e.getMessage()); Dialog.error(p_WindowNo, "DBExecuteError", e.getMessage());
} }
} }
@ -1377,12 +1377,12 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
{ {
if (log.isLoggable(Level.INFO)) if (log.isLoggable(Level.INFO))
log.log(Level.INFO, countSql, e); log.log(Level.INFO, countSql, e);
FDialog.error(p_WindowNo, INFO_QUERY_TIME_OUT_ERROR); Dialog.error(p_WindowNo, INFO_QUERY_TIME_OUT_ERROR);
} }
else else
{ {
log.log(Level.SEVERE, countSql, e); log.log(Level.SEVERE, countSql, e);
FDialog.error(p_WindowNo, "DBExecuteError", e.getMessage()); Dialog.error(p_WindowNo, "DBExecuteError", e.getMessage());
} }
m_count = -2; m_count = -2;
} }

View File

@ -48,7 +48,7 @@ import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.BrowserToken; import org.adempiere.webui.util.BrowserToken;
import org.adempiere.webui.util.UserPreference; import org.adempiere.webui.util.UserPreference;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.LoginWindow; import org.adempiere.webui.window.LoginWindow;
import org.compiere.Adempiere; import org.compiere.Adempiere;
import org.compiere.model.MClient; import org.compiere.model.MClient;
@ -477,7 +477,7 @@ public class LoginPanel extends Window implements EventListener<Event>
} }
catch (Exception e) { catch (Exception e) {
String message = e.getMessage(); String message = e.getMessage();
FDialog.warn(0, this, "URLnotValid", message); Dialog.warn(0, "URLnotValid", message);
} }
} }

View File

@ -38,7 +38,7 @@ import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.SimpleListModel; import org.adempiere.webui.component.SimpleListModel;
import org.adempiere.webui.factory.ButtonFactory; import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.I_AD_Field; import org.compiere.model.I_AD_Field;
import org.compiere.model.MField; import org.compiere.model.MField;
import org.compiere.model.MRole; import org.compiere.model.MRole;
@ -425,7 +425,7 @@ public class QuickCustomizeGridViewPanel extends Panel {
} }
getParent().detach(); getParent().detach();
} else { } else {
FDialog.error(m_WindowNo, null, "SaveError", custom.toString()); Dialog.error(m_WindowNo, "SaveError", custom.toString());
} }
} // saveData } // saveData

View File

@ -40,7 +40,7 @@ import org.adempiere.webui.theme.ITheme;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.UserPreference; import org.adempiere.webui.util.UserPreference;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.LoginWindow; import org.adempiere.webui.window.LoginWindow;
import org.compiere.model.MRole; import org.compiere.model.MRole;
import org.compiere.model.MSysConfig; import org.compiere.model.MSysConfig;
@ -636,7 +636,7 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
if (! Util.isEmpty(msg)) if (! Util.isEmpty(msg))
{ {
Env.getCtx().clear(); Env.getCtx().clear();
FDialog.error(0, this, "Error", msg, new Callback<Integer>() { Dialog.error(0, "Error", msg, new Callback<Integer>() {
@Override @Override
public void onCallback(Integer result) { public void onCallback(Integer result) {
Events.echoEvent(new Event(ON_DEFER_LOGOUT, component)); Events.echoEvent(new Event(ON_DEFER_LOGOUT, component));

View File

@ -27,7 +27,7 @@ import org.adempiere.webui.component.Menupopup;
import org.adempiere.webui.component.Messagebox; import org.adempiere.webui.component.Messagebox;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.FeedbackManager; import org.adempiere.webui.util.FeedbackManager;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.WPreference; import org.adempiere.webui.window.WPreference;
import org.compiere.model.MClient; import org.compiere.model.MClient;
import org.compiere.model.MOrg; import org.compiere.model.MOrg;
@ -186,7 +186,7 @@ public class UserPanel implements EventListener<Event>, Composer<Component>
if (logout == event.getTarget()) if (logout == event.getTarget())
{ {
if (SessionManager.getAppDesktop().isPendingWindow()) { if (SessionManager.getAppDesktop().isPendingWindow()) {
FDialog.ask(0, component, "ProceedWithTask?", new Callback<Boolean>() { Dialog.ask(0, "ProceedWithTask?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -217,7 +217,7 @@ public class UserPanel implements EventListener<Event>, Composer<Component>
else if (changeRole == event.getTarget()) else if (changeRole == event.getTarget())
{ {
if (SessionManager.getAppDesktop().isPendingWindow()) { if (SessionManager.getAppDesktop().isPendingWindow()) {
FDialog.ask(0, component, "ProceedWithTask?", new Callback<Boolean>() { Dialog.ask(0, "ProceedWithTask?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)

View File

@ -49,7 +49,7 @@ import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ITheme;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.LoginWindow; import org.adempiere.webui.window.LoginWindow;
import org.compiere.model.MMFAMethod; import org.compiere.model.MMFAMethod;
import org.compiere.model.MMFARegisteredDevice; import org.compiere.model.MMFARegisteredDevice;
@ -388,7 +388,7 @@ public class ValidateMFAPanel extends Window implements EventListener<Event> {
String msg = login.validateLogin(m_orgKNPair); String msg = login.validateLogin(m_orgKNPair);
if (!Util.isEmpty(msg)) { if (!Util.isEmpty(msg)) {
Env.getCtx().clear(); Env.getCtx().clear();
FDialog.error(0, this, "Error", msg, new Callback<Integer>() { Dialog.error(0, "Error", msg, new Callback<Integer>() {
@Override @Override
public void onCallback(Integer result) { public void onCallback(Integer result) {
Events.echoEvent(new Event(ON_DEFER_LOGOUT, component)); Events.echoEvent(new Event(ON_DEFER_LOGOUT, component));
@ -406,7 +406,7 @@ public class ValidateMFAPanel extends Window implements EventListener<Event> {
Timestamp now = TimeUtil.getDay(null); Timestamp now = TimeUtil.getDay(null);
if (now.after(notifyAfter)) if (now.after(notifyAfter))
FDialog.warn(0, null, "", Msg.getMsg(m_ctx, "YourPasswordWillExpireInDays", Dialog.warn(0, "", Msg.getMsg(m_ctx, "YourPasswordWillExpireInDays",
new Object[] { TimeUtil.getDaysBetween(now, limit) })); new Object[] { TimeUtil.getDaysBetween(now, limit) }));
} }
} }

View File

@ -47,7 +47,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.factory.ButtonFactory; import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.adempiere.webui.window.WEMailDialog; import org.adempiere.webui.window.WEMailDialog;
import org.adempiere.webui.window.WTextEditorDialog; import org.adempiere.webui.window.WTextEditorDialog;
import org.compiere.model.MAttachment; import org.compiere.model.MAttachment;
@ -755,7 +755,7 @@ public class WAttachment extends Window implements EventListener<Event>
{ {
log.info(""); log.info("");
FDialog.ask(m_WindowNo, this, "AttachmentDelete?", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "AttachmentDelete?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -786,7 +786,7 @@ public class WAttachment extends Window implements EventListener<Event>
if (fileName == null) if (fileName == null)
return; return;
FDialog.ask(m_WindowNo, this, "AttachmentDeleteEntry?", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "AttachmentDeleteEntry?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)

View File

@ -35,7 +35,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents; import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MAllocationHdr; import org.compiere.model.MAllocationHdr;
import org.compiere.model.MBankStatement; import org.compiere.model.MBankStatement;
@ -156,14 +156,14 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
if (wfStatus != null) if (wfStatus != null)
{ {
if (! fromMenu) if (! fromMenu)
FDialog.error(gridTab.getWindowNo(), this, "WFActiveForRecord", wfStatus); Dialog.error(gridTab.getWindowNo(), "WFActiveForRecord", wfStatus);
return; return;
} }
// Status Change // Status Change
if (!checkStatus(gridTab.getTableName(), gridTab.getRecord_ID(), DocStatus)) if (!checkStatus(gridTab.getTableName(), gridTab.getRecord_ID(), DocStatus))
{ {
FDialog.error(gridTab.getWindowNo(), this, "DocumentStatusChanged"); Dialog.error(gridTab.getWindowNo(), "DocumentStatusChanged");
return; return;
} }
/******************* /*******************
@ -379,7 +379,7 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
String docAction = lstDocAction.getSelectedItem().getLabel(); String docAction = lstDocAction.getSelectedItem().getLabel();
MessageFormat mf = new MessageFormat(Msg.getMsg(Env.getAD_Language(Env.getCtx()), "ConfirmOnDocAction")); MessageFormat mf = new MessageFormat(Msg.getMsg(Env.getAD_Language(Env.getCtx()), "ConfirmOnDocAction"));
Object[] arguments = new Object[]{docAction}; Object[] arguments = new Object[]{docAction};
FDialog.ask(gridTab.getWindowNo(), this, "", mf.format(arguments), new Callback<Boolean>() { Dialog.ask(gridTab.getWindowNo(), "", mf.format(arguments), new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if(result) if(result)

View File

@ -42,7 +42,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Window; import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents; import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
@ -259,7 +259,7 @@ public class ExportAction implements EventListener<Event>
} }
} }
}else if (event.getName().equals("onExporterException")){ }else if (event.getName().equals("onExporterException")){
FDialog.error(0, winExportFile, "FileInvalidExtension"); Dialog.error(0, "FileInvalidExtension");
winExportFile.onClose(); winExportFile.onClose();
} }
} }
@ -342,7 +342,7 @@ public class ExportAction implements EventListener<Event>
media = new AMedia(exporter.getSuggestedFileName(panel.getActiveGridTab()), null, exporter.getContentType(), file, true); media = new AMedia(exporter.getSuggestedFileName(panel.getActiveGridTab()), null, exporter.getContentType(), file, true);
Filedownload.save(media); Filedownload.save(media);
} catch (Exception e) { } catch (Exception e) {
FDialog.error(0, winExportFile, e.getLocalizedMessage()); Dialog.error(0, e.getLocalizedMessage());
} finally { } finally {
if (winExportFile != null) if (winExportFile != null)
winExportFile.onClose(); winExportFile.onClose();

View File

@ -50,7 +50,7 @@ import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.event.DialogEvents; import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.util.ReaderInputStream; import org.adempiere.webui.util.ReaderInputStream;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MLookup; import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory; import org.compiere.model.MLookupFactory;
@ -285,7 +285,7 @@ public class FileImportAction implements EventListener<Event>
ListItem li = cboType.getSelectedItem(); ListItem li = cboType.getSelectedItem();
if(li == null || li.getValue() == null) if(li == null || li.getValue() == null)
{ {
FDialog.error(0, winImportFile, "FileInvalidExtension"); Dialog.error(0, "FileInvalidExtension");
return; return;
} }
@ -293,7 +293,7 @@ public class FileImportAction implements EventListener<Event>
IGridTabImporter importer = importerMap.get(ext); IGridTabImporter importer = importerMap.get(ext);
if (importer == null) if (importer == null)
{ {
FDialog.error(0, winImportFile, "FileInvalidExtension"); Dialog.error(0, "FileInvalidExtension");
return; return;
} }

View File

@ -40,7 +40,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Window; import org.adempiere.webui.component.Window;
import org.adempiere.webui.component.ZkCssHelper; import org.adempiere.webui.component.ZkCssHelper;
import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MQuery; import org.compiere.model.MQuery;
import org.compiere.model.MRole; import org.compiere.model.MRole;
@ -252,7 +252,7 @@ public class ReportAction implements EventListener<Event>
ListItem li = cboPrintFormat.getSelectedItem(); ListItem li = cboPrintFormat.getSelectedItem();
if(li == null || li.getValue() == null) if(li == null || li.getValue() == null)
{ {
FDialog.error(0, winReport, "PrintFormatMandatory"); Dialog.error(0, "PrintFormatMandatory");
return; return;
} }
@ -264,7 +264,7 @@ public class ReportAction implements EventListener<Event>
li = cboExportType.getSelectedItem(); li = cboExportType.getSelectedItem();
if(li == null || li.getValue() == null) if(li == null || li.getValue() == null)
{ {
FDialog.error(0, winReport, "ExportFileTypeMandatory"); Dialog.error(0, "ExportFileTypeMandatory");
return; return;
} }
} }
@ -399,7 +399,7 @@ public class ReportAction implements EventListener<Event>
ListItem li = cboExportType.getSelectedItem(); ListItem li = cboExportType.getSelectedItem();
if(li == null || li.getValue() == null) if(li == null || li.getValue() == null)
{ {
FDialog.error(0, winReport, "FileInvalidExtension"); Dialog.error(0, "FileInvalidExtension");
return; return;
} }
@ -460,7 +460,7 @@ public class ReportAction implements EventListener<Event>
} }
else else
{ {
FDialog.error(0, winReport, "FileInvalidExtension"); Dialog.error(0, "FileInvalidExtension");
return; return;
} }

View File

@ -33,7 +33,7 @@ import org.adempiere.webui.adwindow.ADWindow;
import org.adempiere.webui.adwindow.ADWindowContent; import org.adempiere.webui.adwindow.ADWindowContent;
import org.adempiere.webui.component.Button; import org.adempiere.webui.component.Button;
import org.adempiere.webui.factory.ButtonFactory; import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridField; import org.compiere.model.GridField;
import org.compiere.model.GridTab; import org.compiere.model.GridTab;
import org.compiere.model.MScheduler; import org.compiere.model.MScheduler;
@ -90,7 +90,7 @@ public class ChangeStateAction implements IAction, EventListener<Event> {
else if (status == IServerManager.SERVER_STATE_STOPPED) else if (status == IServerManager.SERVER_STATE_STOPPED)
label = Msg.getMsg(Env.getCtx(), "SchedulerStopped"); label = Msg.getMsg(Env.getCtx(), "SchedulerStopped");
else else
FDialog.error(content.getWindowNo(), content.getComponent(), "CantReadCurrentSchedulerState"); Dialog.error(content.getWindowNo(), "CantReadCurrentSchedulerState");
if (label == null) if (label == null)
return; return;
@ -115,9 +115,9 @@ public class ChangeStateAction implements IAction, EventListener<Event> {
MScheduler model = (MScheduler) schedulerAttr; MScheduler model = (MScheduler) schedulerAttr;
String error = serverMgr.start(model.getServerID()); String error = serverMgr.start(model.getServerID());
if (error == null) { if (error == null) {
FDialog.info(0, null, "SchedulerStartSuccess"); Dialog.info(0, "SchedulerStartSuccess");
} else { } else {
FDialog.error(0, "SchedulerStartFail", error); Dialog.error(0, "SchedulerStartFail", error);
} }
Clients.clearBusy(); Clients.clearBusy();
} }
@ -129,9 +129,9 @@ public class ChangeStateAction implements IAction, EventListener<Event> {
MScheduler model = (MScheduler) schedulerAttr; MScheduler model = (MScheduler) schedulerAttr;
String error = serverMgr.stop(model.getServerID()); String error = serverMgr.stop(model.getServerID());
if (error == null) { if (error == null) {
FDialog.info(0, null, "SchedulerStopSuccess"); Dialog.info(0, "SchedulerStopSuccess");
} else { } else {
FDialog.error(0, "SchedulerStopFail", error); Dialog.error(0, "SchedulerStopFail", error);
} }
Clients.clearBusy(); Clients.clearBusy();
} }
@ -142,9 +142,9 @@ public class ChangeStateAction implements IAction, EventListener<Event> {
if (schedulerAttr != null && schedulerAttr instanceof MScheduler) { if (schedulerAttr != null && schedulerAttr instanceof MScheduler) {
String error = serverMgr.addScheduler(scheduler); String error = serverMgr.addScheduler(scheduler);
if (error == null) { if (error == null) {
FDialog.info(0, null, "SchedulerAddAndStartSuccess"); Dialog.info(0, "SchedulerAddAndStartSuccess");
} else { } else {
FDialog.error(0, "SchedulerAddAndStartFail", error); Dialog.error(0, "SchedulerAddAndStartFail", error);
} }
Clients.clearBusy(); Clients.clearBusy();
} }
@ -180,7 +180,7 @@ public class ChangeStateAction implements IAction, EventListener<Event> {
if (stateAttr != null && stateAttr instanceof Number && schedulerAttr != null && schedulerAttr instanceof MScheduler) { if (stateAttr != null && stateAttr instanceof Number && schedulerAttr != null && schedulerAttr instanceof MScheduler) {
int state = ((Number)stateAttr).intValue(); int state = ((Number)stateAttr).intValue();
if (state == IServerManager.SERVER_STATE_NOT_SCHEDULE) { if (state == IServerManager.SERVER_STATE_NOT_SCHEDULE) {
FDialog.ask(0, null, "SchedulerAddAndStartPrompt", new Callback<Boolean>() { Dialog.ask(0, "SchedulerAddAndStartPrompt", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if (result) { if (result) {
@ -190,7 +190,7 @@ public class ChangeStateAction implements IAction, EventListener<Event> {
} }
}); });
} else if (state == IServerManager.SERVER_STATE_STARTED) { } else if (state == IServerManager.SERVER_STATE_STARTED) {
FDialog.ask(0, null, "SchedulerStopPrompt", new Callback<Boolean>() { Dialog.ask(0, "SchedulerStopPrompt", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if (result) { if (result) {
@ -202,7 +202,7 @@ public class ChangeStateAction implements IAction, EventListener<Event> {
}); });
} }
else if (state == IServerManager.SERVER_STATE_STOPPED) { else if (state == IServerManager.SERVER_STATE_STOPPED) {
FDialog.ask(0, null, "SchedulerStartPrompt", new Callback<Boolean>() { Dialog.ask(0, "SchedulerStartPrompt", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if (result) { if (result) {

View File

@ -31,7 +31,7 @@ import org.adempiere.webui.adwindow.ADWindow;
import org.adempiere.webui.component.Button; import org.adempiere.webui.component.Button;
import org.adempiere.webui.editor.IEditorConfiguration; import org.adempiere.webui.editor.IEditorConfiguration;
import org.adempiere.webui.editor.WEditor; import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.Dialog;
import org.compiere.model.GridField; import org.compiere.model.GridField;
import org.compiere.model.MScheduler; import org.compiere.model.MScheduler;
import org.compiere.model.StateChangeEvent; import org.compiere.model.StateChangeEvent;
@ -107,9 +107,9 @@ public class SchedulerStateEditor extends WEditor {
if (serverMgr != null) { if (serverMgr != null) {
String error = serverMgr.start(model.getServerID()); String error = serverMgr.start(model.getServerID());
if (error == null) { if (error == null) {
FDialog.info(0, null, "SchedulerStartSuccess"); Dialog.info(0, "SchedulerStartSuccess");
} else { } else {
FDialog.error(0, "SchedulerStartFail", error); Dialog.error(0, "SchedulerStartFail", error);
} }
getComponent().setLabel(getDisplay()); getComponent().setLabel(getDisplay());
} }
@ -125,9 +125,9 @@ public class SchedulerStateEditor extends WEditor {
if (serverMgr != null) { if (serverMgr != null) {
String error = serverMgr.stop(model.getServerID()); String error = serverMgr.stop(model.getServerID());
if (error == null) { if (error == null) {
FDialog.info(0, null, "SchedulerStopSuccess"); Dialog.info(0, "SchedulerStopSuccess");
} else { } else {
FDialog.error(0, "SchedulerStopFail", error); Dialog.error(0, "SchedulerStopFail", error);
} }
getComponent().setLabel(getDisplay()); getComponent().setLabel(getDisplay());
} }
@ -144,12 +144,12 @@ public class SchedulerStateEditor extends WEditor {
String error = serverMgr.addScheduler(model); String error = serverMgr.addScheduler(model);
if (error == null) { if (error == null) {
if (serverMgr.getServerInstance(model.getServerID()) != null) { if (serverMgr.getServerInstance(model.getServerID()) != null) {
FDialog.info(0, null, "SchedulerAddAndStartSuccess"); Dialog.info(0, "SchedulerAddAndStartSuccess");
} else { } else {
FDialog.error(0, "SchedulerAddAndStartFail", "Not accepted by any server node, please check the scheduler's schedule setting"); Dialog.error(0, "SchedulerAddAndStartFail", "Not accepted by any server node, please check the scheduler's schedule setting");
} }
} else { } else {
FDialog.error(0, "SchedulerAddAndStartFail", error); Dialog.error(0, "SchedulerAddAndStartFail", error);
} }
getComponent().setLabel(getDisplay()); getComponent().setLabel(getDisplay());
} }
@ -231,7 +231,7 @@ public class SchedulerStateEditor extends WEditor {
} }
} }
} else { } else {
FDialog.error(0, "CantReadCurrentSchedulerState"); Dialog.error(0, "CantReadCurrentSchedulerState");
} }
} }
@ -242,7 +242,7 @@ public class SchedulerStateEditor extends WEditor {
if (id <= 0) if (id <= 0)
return; return;
FDialog.ask(0, null, "SchedulerAddAndStartPrompt", new Callback<Boolean>() { Dialog.ask(0, "SchedulerAddAndStartPrompt", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if (result) { if (result) {
@ -260,7 +260,7 @@ public class SchedulerStateEditor extends WEditor {
if (id <= 0) if (id <= 0)
return; return;
FDialog.ask(0, null, "SchedulerStopPrompt", new Callback<Boolean>() { Dialog.ask(0, "SchedulerStopPrompt", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if (result) { if (result) {
@ -277,7 +277,7 @@ public class SchedulerStateEditor extends WEditor {
if (id <= 0) if (id <= 0)
return; return;
FDialog.ask(0, null, "SchedulerStartPrompt", new Callback<Boolean>() { Dialog.ask(0, "SchedulerStartPrompt", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if (result) { if (result) {

View File

@ -0,0 +1,499 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Diego Ruiz *
**********************************************************************/
package org.adempiere.webui.window;
import java.util.Map;
import java.util.logging.Level;
import org.adempiere.util.Callback;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Messagebox;
import org.adempiere.webui.editor.WChosenboxListEditor;
import org.adempiere.webui.editor.WChosenboxSearchEditor;
import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.editor.WStringEditor;
import org.adempiere.webui.editor.WTableDirEditor;
import org.compiere.model.MLookup;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Trace;
import org.compiere.util.Util;
import org.zkoss.zk.ui.Desktop;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
public final class Dialog {
private static final CLogger logger = CLogger.getCLogger(Dialog.class);
private Dialog() {
}
/**
* Construct a message from the AD_Message and the additional message
*
* @param adMessage AD_Message string
* @param message additional message
* @return The translated AD_Message appended with the additional message
*/
private static String constructMessage(String adMessage, String message, Object ... args) {
StringBuffer out = new StringBuffer();
if (!Util.isEmpty(adMessage)) {
out.append(getADMessage(adMessage, args));
}
if (!Util.isEmpty(message)) {
if (out.length() > 0)
out.append("<br>");
out.append(message);
}
return out.toString();
}
private static String getADMessage(String adMessage, Object ... args) {
String message;
if (args != null && args.length > 0)
message = Msg.getMsg(Env.getCtx(), adMessage, args);
else
message = Msg.getMsg(Env.getCtx(), adMessage);
return message;
}
/**
* Display dialog with a warning icon
* @param windowNo Number of Window
* @param adMessage Message to be translated
*/
public static void warn(int windowNo, String adMessage) {
warn(windowNo, adMessage, null, null);
}
/**
* Display a dialog with a warning icon
*
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @param title Message box title
*/
public static void warn(int windowNo, String adMessage, String title) {
warn(windowNo, adMessage, null, title);
}
/**
* Display a dialog with a warning 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
*/
public static void warn(int windowNo, String adMessage, String additionalMessage, String title) {
if (logger.isLoggable(Level.INFO))
logger.info(adMessage + " - " + additionalMessage);
String dialogTitle = getDialogTitle(title, windowNo);
String out = constructMessage(adMessage, additionalMessage);
String message = formatDialogMessage(out);
Messagebox.showDialog(message, dialogTitle, Messagebox.OK, Messagebox.EXCLAMATION);
}
private static String getDialogTitle(String title, int windowNo) {
return title == null ? AEnv.getDialogHeader(Env.getCtx(), windowNo) : title;
}
private static String formatDialogMessage(String originalMessage) {
return originalMessage.replace("\n", "<br>");
}
/**
* Display dialog with an error icon
* @param windowNo Number of Window
* @param adMessage Message to be translated
*/
public static void error(int windowNo, String adMessage) {
error(windowNo, adMessage, null);
}
/**
* Display dialog with an error icon
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @param additionalMessage Additional message
*/
public static void error(int windowNo, String adMessage, String additionalMessage) {
error(windowNo, adMessage, additionalMessage, (Callback<Integer>)null);
}
/**
* Display dialog with an error icon
*
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @param additionalMessage Additional message
* @param callback
*/
public static void error(int windowNo, String adMessage, String additionalMessage, Callback<Integer> callback) {
error(windowNo, adMessage, additionalMessage, callback, null);
}
/**
* Display dialog with an error 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
*/
public static void error(int windowNo, String adMessage, String additionalMessage, String title) {
error(windowNo, adMessage, additionalMessage, (Callback<Integer>)null, title);
}
/**
* Display dialog with an error icon
*
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @param additionalMessage Additional message
* @param callback
* @param title If none then one will be generated
*/
public static void error(int windowNo, String adMessage, String additionalMessage, Callback<Integer> callback, String title) {
if (logger.isLoggable(Level.INFO))
logger.info(adMessage + " - " + additionalMessage);
if (CLogMgt.isLevelFinest()) {
Trace.printStack();
}
String dialogTitle = getDialogTitle(title, windowNo);
String out = constructMessage(adMessage, additionalMessage);
String message = formatDialogMessage(out);
Messagebox.showDialog(message, dialogTitle, Messagebox.OK, Messagebox.ERROR, callback);
}
/**************************************************************************
* Ask Question with question icon and (OK) (Cancel) buttons
*
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @return true, if OK
*/
public static boolean ask(int windowNo, String adMessage) {
return ask(windowNo, adMessage, "");
}
/**************************************************************************
* Ask Question with question icon and (OK) (Cancel) buttons
*
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @param callback
* @return true, if OK
*/
public static boolean ask(int windowNo, String adMessage, final Callback<Boolean> callback) {
return ask(null, windowNo, adMessage, callback);
}
/**************************************************************************
* Ask Question with question icon and (OK) (Cancel) buttons
*
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @param additionalMessage Additional clear text message
* @return true, if OK
*/
public static boolean ask(int windowNo, String adMessage, String additionalMessage) {
return ask(windowNo, adMessage, additionalMessage, (Callback<Boolean>)null);
}
/**************************************************************************
* Ask Question with question icon and (OK) (Cancel) buttons
*
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @param additionalMessage Additional clear text message
* @param callback
* @return true, if OK
*/
public static boolean ask(int windowNo, String adMessage, String additionalMessage, final Callback<Boolean> callback) {
return ask(null, windowNo, adMessage, additionalMessage, callback);
}
/**************************************************************************
* Ask Question with question icon and (OK) (Cancel) buttons
*
* @param title
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @param callback
* @param args
* @return true, if OK
*/
public static boolean ask(String title, int windowNo, String adMessage, final Callback<Boolean> callback, Object ... args) {
return ask(title, windowNo, adMessage, null, callback, args);
}
/**************************************************************************
* Ask Question with question icon and (OK) (Cancel) buttons
*
* @param windowNo Number of Window
* @param title Title of the dialog panel
* @param adMessage Message to be translated
* @param msg Additional clear text message
* @param callback
* @return true, if OK
*/
public static boolean ask(int windowNo, String title, String adMessage, String msg, final Callback<Boolean> callback) {
return ask(title, windowNo, adMessage, msg, callback);
}
/**************************************************************************
* Ask Question with question icon and (OK) (Cancel) buttons
*
* @param title
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @param additionalMessage Additional clear text message
* @param callback
* @param args
* @return true, if OK
*/
public static boolean ask(String title, int windowNo, String adMessage, String additionalMessage, final Callback<Boolean> callback, Object ... args) {
Callback<Integer> msgCallback = getMessageCallback(callback);
String message = constructMessage(adMessage, additionalMessage, args);
String dialogTitle = getDialogTitle(title, windowNo);
message = formatDialogMessage(message);
int response = Messagebox.showDialog(message, dialogTitle,
Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION, msgCallback, (msgCallback == null));
return (response == Messagebox.OK);
}
private static Callback<Integer> getMessageCallback(final Callback<Boolean> callback) {
Callback<Integer> msgCallback = null;
if (callback != null) {
msgCallback = new Callback<Integer>() {
@Override
public void onCallback(Integer result) {
boolean b = result != null && result.intValue() == Messagebox.OK;
callback.onCallback(b);
}
};
}
return msgCallback;
}
public static void askForInput(final String message, MLookup lookup, int editorType, final Callback<Object> callback, Desktop desktop, int windowNo) {
askForInput(message, lookup, editorType, callback, desktop, windowNo, "", null);
}
public static void askForInput(final String message, MLookup lookup, int editorType, final Callback<Object> callback, Desktop desktop, int windowNo, String title, Object defaultValue) {
final WEditor weditor = getEditor(lookup, editorType);
if (weditor != null && defaultValue != null)
weditor.setValue(defaultValue);
Executions.schedule(desktop, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
Dialog.askForInput(windowNo, weditor, message, title, callback);
}
}, new Event("onAskForInput"));
}
private static WEditor getEditor(MLookup lookup, int editorType) {
switch (editorType) {
case DisplayType.String:
return new WStringEditor();
case DisplayType.Number:
return new WNumberEditor();
case DisplayType.TableDir:
return new WTableDirEditor(lookup, "", "", true, false, true);
case DisplayType.Search:
return new WSearchEditor(lookup, "", "", true, false, true);
case DisplayType.ChosenMultipleSelectionSearch:
return new WChosenboxSearchEditor(lookup, "", "", true, false, true);
case DisplayType.ChosenMultipleSelectionList:
case DisplayType.ChosenMultipleSelectionTable:
return new WChosenboxListEditor(lookup, "", "", true, false, true);
default:
return null;
}
}
public static void askForInput(int windowNo, WEditor weditor, String adMessage, final Callback<Object> callback) {
askForInput(windowNo, weditor, adMessage, "", callback);
}
public static void askForInput(int windowNo, WEditor weditor, String adMessage, String title, final Callback<Object> callback) {
Callback<Object> msgCallback = null;
if (callback != null) {
msgCallback = new Callback<Object>() {
@Override
public void onCallback(Object result) {
callback.onCallback(result);
}
};
}
String dialogTitle = getDialogTitle(title, windowNo);
String message = constructMessage(adMessage, null);
message = formatDialogMessage(message);
Messagebox.showDialog(message, dialogTitle,
Messagebox.OK | Messagebox.INPUT, Messagebox.QUESTION, weditor, msgCallback, (msgCallback == null));
}
public static void askForInput(int windowNo, String adMessage, final Callback<String> callback) {
askForInput(windowNo, adMessage, "", callback);
}
public static void askForInput(int windowNo, String adMessage, String title, final Callback<String> callback) {
Callback<String> msgCallback = null;
if (callback != null)
{
msgCallback = new Callback<String>() {
@Override
public void onCallback(String result) {
callback.onCallback(result);
}
};
}
String dialogTitle = getDialogTitle(title, windowNo);
String message = constructMessage(adMessage, null);
message = formatDialogMessage(message);
Messagebox.showDialog(message, dialogTitle,
Messagebox.OK | Messagebox.INPUT, Messagebox.QUESTION, msgCallback, (msgCallback == null));
}
/**
* Confirmation dialog before deleting the records.
* @param windowNo
* @param weditor
* @param adMessage
* @param adMessageArgs
* @param title
* @param correctInput
* @param callback
*/
public static void askForInputTextConfirmation(int windowNo, WEditor weditor, String adMessage, Object[] adMessageArgs, String title, final Callback<Map.Entry<Boolean, String>> callback) {
Callback<Map.Entry<Boolean, String>> msgCallback = null;
msgCallback = new Callback<Map.Entry<Boolean, String>>() {
@Override
public void onCallback(Map.Entry<Boolean, String> result) {
callback.onCallback(result);
}
};
String dialogTitle = getDialogTitle(title, windowNo);
String message = constructMessage(adMessage, null, adMessageArgs);
message = formatDialogMessage(message);
Messagebox.showDialog(message, dialogTitle,
Messagebox.OK | Messagebox.CANCEL | Messagebox.INPUT, Messagebox.QUESTION, weditor, msgCallback, (msgCallback == null));
}
public static void askForInputWithCancel(int windowNo, WEditor weditor, String adMessage, String title, final Callback<Map.Entry<Boolean, Object>> callback) {
Callback<Map.Entry<Boolean, Object>> msgCallback = null;
if (callback != null)
{
msgCallback = new Callback<Map.Entry<Boolean, Object>>() {
@Override
public void onCallback(Map.Entry<Boolean, Object> result) {
callback.onCallback(result);
}
};
}
String dialogTitle = getDialogTitle(title, windowNo);
String message = constructMessage(adMessage, null);
message = formatDialogMessage(message);
Messagebox.showDialog(message, dialogTitle,
Messagebox.OK | Messagebox.CANCEL | Messagebox.INPUT, Messagebox.QUESTION, weditor, true, msgCallback, (msgCallback == null));
}
/**
* Display dialog with information icon.
*
* @param windowNo Number of Window
* @param adMessage Message to be translated
*/
public static void info(int windowNo, String adMessage) {
info(windowNo, adMessage, null);
}
/**
* Display dialog with information icon.
*
* @param windowNo Number of Window
* @param adMessage Message to be translated
* @param additionalMessage Additional message
*/
public static void info(int windowNo, String adMessage, String additionalMessage) {
info(windowNo, adMessage, additionalMessage, null);
}
/**
* 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
*/
public static void info(int windowNo, String adMessage, String additionalMessage, String title) {
if (logger.isLoggable(Level.INFO)) logger.info(adMessage + " - " + additionalMessage);
if (CLogMgt.isLevelFinest()) {
Trace.printStack();
}
String dialogTitle = getDialogTitle(title, windowNo);
String message = constructMessage(adMessage, null);
message = formatDialogMessage(message);
Messagebox.showDialog(message, dialogTitle, Messagebox.OK, Messagebox.INFORMATION);
}
}

View File

@ -46,12 +46,14 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
/** /**
* @deprecated Many methods in this class receive parameters that are never used.
* As of iDempiere 10, use the {@link Dialog} class instead.
* *
* @author <a href="mailto:agramdass@gmail.com">Ashley G Ramdass</a> * @author <a href="mailto:agramdass@gmail.com">Ashley G Ramdass</a>
* @date Feb 25, 2007 * @date Feb 25, 2007
* @version $Revision: 0.10 $ * @version $Revision: 0.10 $
*/ */
@Deprecated(since="10", forRemoval=true)
public class FDialog public class FDialog
{ {
/** Logger */ /** Logger */

View File

@ -2386,7 +2386,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
String name = selected; String name = selected;
if ((fQueryName.getSelectedIndex() == 0 || name.equals(m_sNew)) && saveQuery){ // New query - needs a name if ((fQueryName.getSelectedIndex() == 0 || name.equals(m_sNew)) && saveQuery){ // New query - needs a name
FDialog.warn (m_targetWindowNo, this, "NeedsName", name); Dialog.warn(m_targetWindowNo, "NeedsName", name);
return; return;
} }
if (saveQuery){ if (saveQuery){
@ -2413,16 +2413,16 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
} else if (code.length() <= 0){ // Delete the query } else if (code.length() <= 0){ // Delete the query
if (uq == null) if (uq == null)
{ {
FDialog.warn (m_targetWindowNo, this, "NeedsQuery", name); Dialog.warn(m_targetWindowNo, "NeedsQuery", name);
return; return;
} }
if (uq.delete(true)) if (uq.delete(true))
{ {
FDialog.info (m_targetWindowNo, this, "Deleted", name); Dialog.info(m_targetWindowNo, "Deleted", name);
refreshUserQueries(); refreshUserQueries();
} }
else else
FDialog.warn (m_targetWindowNo, this, "DeleteError", name); Dialog.warn(m_targetWindowNo, "DeleteError", name);
return; return;
} }
uq.setCode (code.toString()); uq.setCode (code.toString());
@ -2842,7 +2842,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
// Test for no records // Test for no records
if (getNoOfRecords(m_query, true) != 0) { if (getNoOfRecords(m_query, true) != 0) {
if (m_total == COUNTING_RECORDS_TIMED_OUT) { if (m_total == COUNTING_RECORDS_TIMED_OUT) {
FDialog.error(m_targetWindowNo, "InfoQueryTimeOutError"); Dialog.error(m_targetWindowNo, "InfoQueryTimeOutError");
} else { } else {
if (advancedPanel != null) { if (advancedPanel != null) {
advancedPanel.getItems().clear(); advancedPanel.getItems().clear();
@ -2924,7 +2924,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
if (getNoOfRecords(m_query, true) != 0) { if (getNoOfRecords(m_query, true) != 0) {
if (m_total == COUNTING_RECORDS_TIMED_OUT) { if (m_total == COUNTING_RECORDS_TIMED_OUT) {
FDialog.error(m_targetWindowNo, "InfoQueryTimeOutError"); Dialog.error(m_targetWindowNo, "InfoQueryTimeOutError");
} else { } else {
dispose(); dispose();
} }
@ -3011,11 +3011,11 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
} }
// No Records // No Records
if (m_total == 0 && alertRecords) if (m_total == 0 && alertRecords)
FDialog.warn(m_targetWindowNo, this, "FindZeroRecords", null); Dialog.warn(m_targetWindowNo, "FindZeroRecords", null);
// More then allowed // More then allowed
if (m_gridTab != null && alertRecords && m_total != COUNTING_RECORDS_TIMED_OUT && m_gridTab.isQueryMax(m_total)) if (m_gridTab != null && alertRecords && m_total != COUNTING_RECORDS_TIMED_OUT && m_gridTab.isQueryMax(m_total))
{ {
FDialog.error(m_targetWindowNo, this, "FindOverMax", Dialog.error(m_targetWindowNo, "FindOverMax",
m_total + " > " + m_gridTab.getMaxQueryRecords()); m_total + " > " + m_gridTab.getMaxQueryRecords());
m_total = 0; // return 0 if more then allowed - teo_sarca [ 1708717 ] m_total = 0; // return 0 if more then allowed - teo_sarca [ 1708717 ]
} }
@ -3189,7 +3189,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
StringBuilder errMsg = new StringBuilder(); StringBuilder errMsg = new StringBuilder();
errMsg.append(field.getColumnName()).append(" = ").append(in).append(" - ").append(error); errMsg.append(field.getColumnName()).append(" = ").append(in).append(" - ").append(error);
// //
FDialog.error(0, this, "ValidationError", errMsg.toString()); Dialog.error(0, "ValidationError", errMsg.toString());
return null; return null;
} }
@ -3776,7 +3776,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
StringBuilder errMsg = new StringBuilder(); StringBuilder errMsg = new StringBuilder();
errMsg.append(attribute.getName()).append(" = ").append(value).append(" - ").append(error); errMsg.append(attribute.getName()).append(" = ").append(value).append(" - ").append(error);
// //
FDialog.error(0, this, "ValidationError", errMsg.toString()); Dialog.error(0, "ValidationError", errMsg.toString());
return null; return null;
} }

View File

@ -573,7 +573,7 @@ public class InfoSchedule extends Window implements EventListener<Event>
} }
} else { } else {
if (!slot.isAssignment()) { if (!slot.isAssignment()) {
FDialog.error(0, this, "No available time slot for the selected day."); Dialog.error(0, "No available time slot for the selected day.");
return; return;
} }

View File

@ -760,7 +760,7 @@ public final class WAccountDialog extends Window
needconfirm = true; needconfirm = true;
if (needconfirm) { if (needconfirm) {
FDialog.ask(m_WindowNo, this, "CreateNewAccountCombination?", new Callback<Boolean>() { Dialog.ask(m_WindowNo, "CreateNewAccountCombination?", new Callback<Boolean>() {
public void onCallback(Boolean result) { public void onCallback(Boolean result) {
if (result) { if (result) {
if (action_Save()) { if (action_Save()) {
@ -1063,17 +1063,17 @@ public final class WAccountDialog extends Window
if (sb.length() != 0) if (sb.length() != 0)
{ {
FDialog.error(m_WindowNo, this, "FillMandatory", sb.substring(0, sb.length()-2)); Dialog.error(m_WindowNo, "FillMandatory", sb.substring(0, sb.length()-2));
return false; return false;
} }
if (f_AD_Org_ID == null || f_AD_Org_ID.getValue() == null) if (f_AD_Org_ID == null || f_AD_Org_ID.getValue() == null)
{ {
FDialog.error(m_WindowNo, this, "FillMandatory", Msg.getElement(Env.getCtx(), "AD_Org_ID")); Dialog.error(m_WindowNo, "FillMandatory", Msg.getElement(Env.getCtx(), "AD_Org_ID"));
return false; return false;
} }
if (f_Account_ID == null || f_Account_ID.getValue() == null) if (f_Account_ID == null || f_Account_ID.getValue() == null)
{ {
FDialog.error(m_WindowNo, this, "FillMandatory", Msg.getElement(Env.getCtx(), "Account_ID")); Dialog.error(m_WindowNo, "FillMandatory", Msg.getElement(Env.getCtx(), "Account_ID"));
return false; return false;
} }
@ -1142,7 +1142,7 @@ public final class WAccountDialog extends Window
stmt = null; stmt = null;
} }
if (i == 0) if (i == 0)
FDialog.error(m_WindowNo, this, "AccountNotUpdated"); Dialog.error(m_WindowNo, "AccountNotUpdated");
} }
// load and display // load and display

View File

@ -411,7 +411,7 @@ public class WAssignmentDialog extends Window implements EventListener<Event>
detach(); detach();
} }
else else
FDialog.error(0, this, "ResourceAssignmentNotDeleted"); Dialog.error(0, "ResourceAssignmentNotDeleted");
} }
// OK - Save // OK - Save

View File

@ -183,9 +183,9 @@ public class WCtxHelpSuggestion extends Window implements EventListener<Event> {
onSave0(trx); onSave0(trx);
trx.commit(true); trx.commit(true);
if (ctxHelpMsg != null && ctxHelpMsg.getAD_Client_ID() == Env.getAD_Client_ID(Env.getCtx())) { if (ctxHelpMsg != null && ctxHelpMsg.getAD_Client_ID() == Env.getAD_Client_ID(Env.getCtx())) {
FDialog.info(0, this, Msg.getMsg(Env.getCtx(), "Your changes have been saved.")); Dialog.info(0, Msg.getMsg(Env.getCtx(), "Your changes have been saved."));
} else { } else {
FDialog.info(0, this, Msg.getMsg(Env.getCtx(),"Your suggestions have been submitted for review")); Dialog.info(0, Msg.getMsg(Env.getCtx(),"Your suggestions have been submitted for review"));
} }
} catch (Exception e) { } catch (Exception e) {
trx.rollback(); trx.rollback();

View File

@ -599,14 +599,14 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
new MUserMail(Env.getCtx(), email).saveEx(); new MUserMail(Env.getCtx(), email).saveEx();
if (email.isSentOK()) if (email.isSentOK())
{ {
FDialog.info(0, this, "MessageSent"); Dialog.info(0, "MessageSent");
onClose(); onClose();
} }
else else
FDialog.error(0, this, "MessageNotSent", status); Dialog.error(0, "MessageNotSent", status);
} }
else else
FDialog.error(0, this, "MessageNotSent", status); Dialog.error(0, "MessageNotSent", status);
} }
else if (event instanceof UploadEvent) else if (event instanceof UploadEvent)
{ {
@ -704,7 +704,7 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
m_user = MUser.get(Env.getCtx(), AD_User_ID); m_user = MUser.get(Env.getCtx(), AD_User_ID);
if (Util.isEmpty(m_user.getEMail())) if (Util.isEmpty(m_user.getEMail()))
{ {
FDialog.error(0, Msg.getMsg(Env.getCtx(), "UserNoEmailAddress")); Dialog.error(0, Msg.getMsg(Env.getCtx(), "UserNoEmailAddress"));
} }
else else
{ {
@ -719,7 +719,7 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
m_ccuser = MUser.get(Env.getCtx(), AD_User_ID); m_ccuser = MUser.get(Env.getCtx(), AD_User_ID);
if (Util.isEmpty(m_ccuser.getEMail())) if (Util.isEmpty(m_ccuser.getEMail()))
{ {
FDialog.error(0, Msg.getMsg(Env.getCtx(), "UserNoEmailAddress")); Dialog.error(0, Msg.getMsg(Env.getCtx(), "UserNoEmailAddress"));
} }
else else
{ {

View File

@ -162,7 +162,7 @@ public class WFieldSuggestion extends Window implements EventListener<Event> {
}finally { }finally {
PO.clearCrossTenantSafe(); PO.clearCrossTenantSafe();
} }
FDialog.info(0, this, Msg.getMsg(Env.getCtx(),"Your suggestions have been submitted for review")); Dialog.info(0, Msg.getMsg(Env.getCtx(),"Your suggestions have been submitted for review"));
this.detach(); this.detach();
} }
} }

View File

@ -727,7 +727,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
String msg = validate_OK(); String msg = validate_OK();
if (msg != null) { if (msg != null) {
onSaveError = true; onSaveError = true;
FDialog.error(0, this, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback<Integer>() { Dialog.error(0, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback<Integer>() {
@Override @Override
public void onCallback(Integer result) { public void onCallback(Integer result) {
Events.echoEvent("onSaveError", WLocationDialog.this, null); Events.echoEvent("onSaveError", WLocationDialog.this, null);
@ -746,7 +746,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
else else
{ {
onSaveError = true; onSaveError = true;
FDialog.error(0, this, "CityNotFound", (String)null, new Callback<Integer>() { Dialog.error(0, "CityNotFound", (String)null, new Callback<Integer>() {
@Override @Override
public void onCallback(Integer result) { public void onCallback(Integer result) {
Events.echoEvent("onSaveError", WLocationDialog.this, null); Events.echoEvent("onSaveError", WLocationDialog.this, null);
@ -768,7 +768,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
} }
catch (Exception e) { catch (Exception e) {
message = e.getMessage(); message = e.getMessage();
FDialog.warn(0, this, "URLnotValid", message); Dialog.warn(0, "URLnotValid", message);
} }
} }
else if (toRoute.equals(event.getTarget())) else if (toRoute.equals(event.getTarget()))
@ -787,7 +787,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
} }
catch (Exception e) { catch (Exception e) {
message = e.getMessage(); message = e.getMessage();
FDialog.warn(0, this, "URLnotValid", message); Dialog.warn(0, "URLnotValid", message);
} }
} }
} }
@ -809,7 +809,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
String msg = validate_OK(); String msg = validate_OK();
if (msg != null) { if (msg != null) {
onSaveError = true; onSaveError = true;
FDialog.error(0, this, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback<Integer>() { Dialog.error(0, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback<Integer>() {
@Override @Override
public void onCallback(Integer result) { public void onCallback(Integer result) {
Events.echoEvent("onSaveError", WLocationDialog.this, null); Events.echoEvent("onSaveError", WLocationDialog.this, null);
@ -866,7 +866,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
if (!ok) if (!ok)
{ {
onSaveError = true; onSaveError = true;
FDialog.error(0, this, "Error", m_location.getErrorMessage(), new Callback<Integer>() { Dialog.error(0, "Error", m_location.getErrorMessage(), new Callback<Integer>() {
@Override @Override
public void onCallback(Integer result) { public void onCallback(Integer result) {
Events.echoEvent("onSaveError", WLocationDialog.this, null); Events.echoEvent("onSaveError", WLocationDialog.this, null);

View File

@ -616,7 +616,7 @@ public class WLocatorDialog extends Window implements EventListener<Event>
if (mandatoryFields.length() != 0) if (mandatoryFields.length() != 0)
{ {
FDialog.error(m_WindowNo, this, "FillMandatory", mandatoryFields.substring(0, mandatoryFields.length()-3)); Dialog.error(m_WindowNo, "FillMandatory", mandatoryFields.substring(0, mandatoryFields.length()-3));
return; return;
} }
@ -629,7 +629,7 @@ public class WLocatorDialog extends Window implements EventListener<Event>
MLocator loc = MLocator.get(Env.getCtx(), m_M_Warehouse_ID, txtKey.getText(), MLocator loc = MLocator.get(Env.getCtx(), m_M_Warehouse_ID, txtKey.getText(),
txtAisleX.getText(), txtBinY.getText(), txtLevelZ.getText(), lt); txtAisleX.getText(), txtBinY.getText(), txtLevelZ.getText(), lt);
if (loc == null) { if (loc == null) {
FDialog.error(m_WindowNo, this, "AccessCannotInsert", Msg.getElement(Env.getCtx(), "M_Locator_ID")); Dialog.error(m_WindowNo, "AccessCannotInsert", Msg.getElement(Env.getCtx(), "M_Locator_ID"));
return; return;
} }
m_M_Locator_ID = loc.getM_Locator_ID(); m_M_Locator_ID = loc.getM_Locator_ID();

View File

@ -284,13 +284,13 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
// Product has no Attribute Set // Product has no Attribute Set
if (as == null) if (as == null)
{ {
FDialog.error(m_WindowNo, this, "PAttributeNoAttributeSet"); Dialog.error(m_WindowNo, "PAttributeNoAttributeSet");
return false; return false;
} }
// Product has no Instance Attributes // Product has no Instance Attributes
if (!m_productWindow && !as.isInstanceAttribute()) if (!m_productWindow && !as.isInstanceAttribute())
{ {
FDialog.error(m_WindowNo, this, "PAttributeNoInstanceAttribute"); Dialog.error(m_WindowNo, "PAttributeNoInstanceAttribute");
return false; return false;
} }
@ -488,7 +488,7 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
if (m_row == 0) if (m_row == 0)
{ {
FDialog.error(m_WindowNo, this, "PAttributeNoInfo"); Dialog.error(m_WindowNo, "PAttributeNoInfo");
return false; return false;
} }
@ -1095,7 +1095,7 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
// //
if (mandatory.length() > 0) if (mandatory.length() > 0)
{ {
FDialog.error(m_WindowNo, this, "FillMandatory", mandatory); Dialog.error(m_WindowNo, "FillMandatory", mandatory);
return false; return false;
} }
// Save Model // Save Model

View File

@ -144,7 +144,7 @@ public class WReportExportDialog extends Window implements EventListener<Event>
ListItem li = cboType.getSelectedItem(); ListItem li = cboType.getSelectedItem();
if(li == null || li.getValue() == null) if(li == null || li.getValue() == null)
{ {
FDialog.error(-1, this, "FileInvalidExtension"); Dialog.error(-1, "FileInvalidExtension");
return; return;
} }
@ -187,7 +187,7 @@ public class WReportExportDialog extends Window implements EventListener<Event>
} }
else else
{ {
FDialog.error(-1, this, "FileInvalidExtension"); Dialog.error(-1, "FileInvalidExtension");
return; return;
} }

View File

@ -284,7 +284,7 @@ public class WReportUploadDialog extends Window implements EventListener<Event>
} }
else else
{ {
FDialog.error(-1, this, "FileInvalidExtension", ext, this.getTitle()); Dialog.error(-1, "FileInvalidExtension", ext, this.getTitle());
return; return;
} }
@ -303,7 +303,7 @@ public class WReportUploadDialog extends Window implements EventListener<Event>
catch (Exception e) catch (Exception e)
{ {
log.log(Level.SEVERE, "Failed to upload content.", e); log.log(Level.SEVERE, "Failed to upload content.", e);
FDialog.error(-1, this, "Error", e.getMessage(), this.getTitle()); Dialog.error(-1, "Error", e.getMessage(), this.getTitle());
} }
} }

View File

@ -611,7 +611,7 @@ public class ZkJRViewer extends Window implements EventListener<Event>, ITabOnCl
try { try {
attachment = getPDF(); attachment = getPDF();
} catch (Exception e) { } catch (Exception e) {
FDialog.error(m_WindowNo, this, e.getLocalizedMessage(), m_title); Dialog.error(m_WindowNo, e.getLocalizedMessage(), m_title);
return; return;
} }
} }
@ -860,9 +860,9 @@ public class ZkJRViewer extends Window implements EventListener<Event>, ITabOnCl
} }
if (success) if (success)
FDialog.info(m_WindowNo, this, "Archived"); Dialog.info(m_WindowNo, "Archived");
else else
FDialog.error(m_WindowNo, this, "ArchiveError"); Dialog.error(m_WindowNo, "ArchiveError");
} }
catch (IOException e) catch (IOException e)
{ {
@ -892,9 +892,9 @@ public class ZkJRViewer extends Window implements EventListener<Event>, ITabOnCl
attachment.addEntry(fileName, data); attachment.addEntry(fileName, data);
success = attachment.save(); success = attachment.save();
if (success) if (success)
FDialog.info(m_WindowNo, this, "Attached", fileName); Dialog.info(m_WindowNo, "Attached", fileName);
else else
FDialog.error(m_WindowNo, this, "AttachError"); Dialog.error(m_WindowNo, "AttachError");
} // cmd_archive } // cmd_archive
/** /**

View File

@ -257,7 +257,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
m_AD_Table_ID = re.getPrintFormat().getAD_Table_ID(); m_AD_Table_ID = re.getPrintFormat().getAD_Table_ID();
if (!MRole.getDefault().isCanReport(m_AD_Table_ID)) if (!MRole.getDefault().isCanReport(m_AD_Table_ID))
{ {
FDialog.error(m_WindowNo, this, "AccessCannotReport", m_reportEngine.getName()); Dialog.error(m_WindowNo, "AccessCannotReport", m_reportEngine.getName());
this.onClose(); this.onClose();
} }
m_isCanExport = MRole.getDefault().isCanExport(m_AD_Table_ID); m_isCanExport = MRole.getDefault().isCanExport(m_AD_Table_ID);
@ -414,7 +414,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
catch(Exception e) catch(Exception e)
{ {
log.log(Level.SEVERE, "", e); log.log(Level.SEVERE, "", e);
FDialog.error(m_WindowNo, this, "LoadError", e.getLocalizedMessage()); Dialog.error(m_WindowNo, "LoadError", e.getLocalizedMessage());
this.onClose(); this.onClose();
} }
} }
@ -1341,7 +1341,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
int AD_Table_ID = MTable.getTable_ID(query.getTableName()); int AD_Table_ID = MTable.getTable_ID(query.getTableName());
if (!MRole.getDefault().isCanReport(AD_Table_ID)) if (!MRole.getDefault().isCanReport(AD_Table_ID))
{ {
FDialog.error(m_WindowNo, this, "AccessCannotReport", query.getTableName()); Dialog.error(m_WindowNo, "AccessCannotReport", query.getTableName());
return; return;
} }
if (AD_Table_ID != 0) if (AD_Table_ID != 0)
@ -1404,9 +1404,9 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
success = archive.save(); success = archive.save();
} }
if (success) if (success)
FDialog.info(m_WindowNo, this, "Archived"); Dialog.info(m_WindowNo, "Archived");
else else
FDialog.error(m_WindowNo, this, "ArchiveError"); Dialog.error(m_WindowNo, "ArchiveError");
} // cmd_archive } // cmd_archive
/** /**
@ -1427,9 +1427,9 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
attachment.addEntry(fileName, data); attachment.addEntry(fileName, data);
success = attachment.save(); success = attachment.save();
if (success) if (success)
FDialog.info(m_WindowNo, this, "DocumentAttached", fileName); Dialog.info(m_WindowNo, "DocumentAttached", fileName);
else else
FDialog.error(m_WindowNo, this, "AttachError"); Dialog.error(m_WindowNo, "AttachError");
} // cmd_attachment } // cmd_attachment
/** /**
@ -1440,7 +1440,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
log.config(""); log.config("");
if (!m_isCanExport) if (!m_isCanExport)
{ {
FDialog.error(m_WindowNo, this, "AccessCannotExport", getTitle()); Dialog.error(m_WindowNo, "AccessCannotExport", getTitle());
return; return;
} }
@ -1481,7 +1481,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
{ {
WEditor editor = new WStringEditor(); WEditor editor = new WStringEditor();
ZKUpdateUtil.setWidth((HtmlBasedComponent)editor.getComponent(), "98%"); ZKUpdateUtil.setWidth((HtmlBasedComponent)editor.getComponent(), "98%");
FDialog.askForInputWithCancel(m_WindowNo, editor, "CreateNewPrintFormat", Msg.getMsg(m_ctx, "CreateNewPrintFormatTitle"), new Callback<Map.Entry<Boolean, Object>>() { Dialog.askForInputWithCancel(m_WindowNo, editor, "CreateNewPrintFormat", Msg.getMsg(m_ctx, "CreateNewPrintFormatTitle"), new Callback<Map.Entry<Boolean, Object>>() {
public void onCallback(Map.Entry<Boolean, Object> result) { public void onCallback(Map.Entry<Boolean, Object> result) {
if((result == null) || (!(result.getValue() instanceof String)) || (!result.getKey())) { if((result == null) || (!(result.getValue() instanceof String)) || (!result.getKey())) {
comboReport.setSelectedItem(previousSelected); comboReport.setSelectedItem(previousSelected);
@ -1534,7 +1534,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
} else if (AD_PrintFormat_ID == -2) { } else if (AD_PrintFormat_ID == -2) {
WEditor editor = new WStringEditor(); WEditor editor = new WStringEditor();
ZKUpdateUtil.setWidth((HtmlBasedComponent)editor.getComponent(), "90%"); ZKUpdateUtil.setWidth((HtmlBasedComponent)editor.getComponent(), "90%");
FDialog.askForInputWithCancel(m_WindowNo, editor, "CreatePrintFormatCopy", Msg.getMsg(m_ctx, "CreatePrintFormatCopyTitle"), new Callback<Map.Entry<Boolean, Object>>() { Dialog.askForInputWithCancel(m_WindowNo, editor, "CreatePrintFormatCopy", Msg.getMsg(m_ctx, "CreatePrintFormatCopyTitle"), new Callback<Map.Entry<Boolean, Object>>() {
public void onCallback(Map.Entry<Boolean, Object> result) { public void onCallback(Map.Entry<Boolean, Object> result) {
if((result == null) || (!(result.getValue() instanceof String)) || (!result.getKey())) { if((result == null) || (!(result.getValue() instanceof String)) || (!result.getKey())) {
comboReport.setSelectedItem(previousSelected); comboReport.setSelectedItem(previousSelected);