diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java index 7c23185be6..7c295b1ffb 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java @@ -37,7 +37,7 @@ import org.adempiere.webui.component.Window; import org.adempiere.webui.component.ZkCssHelper; import org.adempiere.webui.theme.ThemeManager; 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.MRole; import org.compiere.util.CLogMgt; @@ -491,9 +491,9 @@ public class ValuePreference extends Window implements EventListener { int no = delete(); if (no == 0) - FDialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotFound"); + Dialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotFound"); else - FDialog.info(m_WindowNo, this, "ValuePreferenceDeleted", String.valueOf(no)); + Dialog.info(m_WindowNo, "ValuePreferenceDeleted", String.valueOf(no)); detach(); } else @@ -672,7 +672,7 @@ public class ValuePreference extends Window implements EventListener m_Value = " "; else { - FDialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotInserted"); + Dialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotInserted"); return; } } @@ -733,10 +733,10 @@ public class ValuePreference extends Window implements EventListener if (no == 1) { Env.setContext(m_ctx, getContextKey(), m_Value); - FDialog.info(m_WindowNo, this, "ValuePreferenceInserted"); + Dialog.info(m_WindowNo, "ValuePreferenceInserted"); } else - FDialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotInserted"); + Dialog.warn(m_WindowNo, this.getTitle(), "ValuePreferenceNotInserted"); } // insert diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java index 77f8100eee..94772f2f01 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java @@ -52,7 +52,7 @@ import org.adempiere.webui.panel.InfoPanel; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; 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.MAcctSchemaElement; import org.compiere.model.MColumn; @@ -1311,11 +1311,11 @@ public class WAcctViewer extends Window implements EventListener { // IDEMPIERE-2392 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; } - FDialog.ask(m_data.WindowNo, this, "PostImmediate?", new Callback() { + Dialog.ask(m_data.WindowNo, "PostImmediate?", new Callback() { @Override public void onCallback(Boolean result) @@ -1328,7 +1328,7 @@ public class WAcctViewer extends Window implements EventListener m_data.AD_Table_ID, m_data.Record_ID, force); //setCursor(Cursor.getDefaultCursor()); if (error != null) - FDialog.error(0, WAcctViewer.this, "PostingError-N", error); + Dialog.error(0, "PostingError-N", error); actionQuery(); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java index d9962124c1..88d28a790f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java @@ -38,7 +38,7 @@ import org.adempiere.webui.component.SimpleListModel; import org.adempiere.webui.factory.ButtonFactory; import org.adempiere.webui.theme.ThemeManager; 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.MRole; import org.compiere.model.MSysConfig; @@ -749,7 +749,7 @@ public class ADSortTab extends Panel implements IADTabpanel setIsChanged(false); } else { - FDialog.error(m_WindowNo, null, "SaveError", info.toString()); + Dialog.error(m_WindowNo, "SaveError", info.toString()); } } // saveData diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index f3706d9c60..d481b4fc3c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -65,7 +65,7 @@ import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.GridTabDataBinder; import org.adempiere.webui.util.TreeUtils; 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.DataStatusListener; import org.compiere.model.GridField; @@ -118,9 +118,9 @@ import org.zkoss.zul.Separator; import org.zkoss.zul.South; import org.zkoss.zul.Space; import org.zkoss.zul.Style; -import org.zkoss.zul.Toolbar; import org.zkoss.zul.Tabpanels; import org.zkoss.zul.Tabs; +import org.zkoss.zul.Toolbar; import org.zkoss.zul.TreeModel; import org.zkoss.zul.Treeitem; import org.zkoss.zul.Vlayout; @@ -1339,7 +1339,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer } 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 if (msg.length() > 0) { - FDialog.error(windowNo, this, msg); + Dialog.error(windowNo, msg); } } //if (col >= 0) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java index d68841cb20..8d92e36c1f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java @@ -41,7 +41,7 @@ import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ThemeManager; 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.MRole; import org.compiere.model.MSysConfig; @@ -583,7 +583,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener if (msg == null) { 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); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 7555a88bc4..95b5012e64 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -81,7 +81,7 @@ import org.adempiere.webui.part.ITabOnSelectHandler; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.util.ZKUpdateUtil; 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.LabelAction; import org.adempiere.webui.window.WChat; @@ -192,8 +192,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements private int m_onlyCurrentDays = 0; - private Component parent; - private boolean m_findCancelled; private boolean m_findCreateNew; @@ -241,9 +239,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements */ public Component createPart(Object parent) { - if (parent instanceof Component) - this.parent = (Component) parent; - adTabbox = createADTab(); adTabbox.setSelectionEventListener(this); adTabbox.setADWindowPanel(this); @@ -699,7 +694,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements initFirstTabpanel(); } catch (Exception 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()) { showingOnExitDialog = true; - FDialog.ask(curWindowNo, null, "CloseUnSave?", b -> { + Dialog.ask(curWindowNo, "CloseUnSave?", b -> { showingOnExitDialog = false; callback.onCallback(b); if (!b) @@ -1447,7 +1442,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements if (!adTabbox.updateSelectedIndex(oldTabIndex, newTabIndex)) { - FDialog.warn(curWindowNo, "TabSwitchJumpGo", title); + Dialog.warn(curWindowNo, "TabSwitchJumpGo", title); if (callback != null) callback.onCallback(false); return; @@ -1794,7 +1789,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements isImporting = gridTable.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 } } @@ -2070,9 +2065,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements adTabbox.getSelectedGridTab().dataRefreshAll(fireEvent, true); } catch (Exception e) { if (DBException.isTimeout(e)) { - FDialog.error(getWindowNo(), "GridTabLoadTimeoutError"); + Dialog.error(getWindowNo(), "GridTabLoadTimeoutError"); } else { - FDialog.error(getWindowNo(), "Error", e.getMessage()); + Dialog.error(getWindowNo(), "Error", e.getMessage()); logger.log(Level.SEVERE, e.getMessage(), e); } adTabbox.getSelectedGridTab().reset(); @@ -2573,7 +2568,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements if (!Util.isEmpty(dirtyTabpanel.getGridTab().getCommitWarning()) || (!Env.isAutoCommit(ctx, curWindowNo) && onNavigationEvent)) { - FDialog.ask(curWindowNo, this.getComponent(), "SaveChanges?", dirtyTabpanel.getGridTab().getCommitWarning(), new Callback() { + Dialog.ask(curWindowNo, "SaveChanges?", dirtyTabpanel.getGridTab().getCommitWarning(), new Callback() { @Override public void onCallback(Boolean result) @@ -2789,7 +2784,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements deleteConfirmationLogic = adTabbox.getSelectedGridTab().getDeleteConfirmationLogic(); if(Util.isEmpty(deleteConfirmationLogic)) { - FDialog.ask(curWindowNo, null, "DeleteRecord?", new Callback() { + Dialog.ask(curWindowNo, "DeleteRecord?", new Callback() { @Override public void onCallback(Boolean result) { @@ -2821,7 +2816,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements editor.fillHorizontal(); editor.setValidInput(deleteConfirmationLogic); - FDialog.askForInputTextConfirmation(curWindowNo, editor, "DeleteRecordWithConfirm?", new Object[] {deleteConfirmationLogic}, null, + Dialog.askForInputTextConfirmation(curWindowNo, editor, "DeleteRecordWithConfirm?", new Object[] {deleteConfirmationLogic}, null, new Callback>() { @Override public void onCallback(Map.Entry result) @@ -2864,7 +2859,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements sb.append(Env.getContext(ctx, curWindowNo, "_WinInfo_WindowName", false)).append(" - ") .append(indices.length).append(" ").append(Msg.getMsg(Env.getCtx(), "Selected")); if(Util.isEmpty(deleteConfirmationLogic)) { - FDialog.ask(sb.toString(), curWindowNo, null,"DeleteSelection", new Callback() { + Dialog.ask(sb.toString(), curWindowNo,"DeleteSelection", new Callback() { @Override public void onCallback(Boolean result) { if(result){ @@ -2906,7 +2901,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements editor.fillHorizontal(); 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>() { @Override public void onCallback(Map.Entry result) @@ -3039,7 +3034,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements public void onReport() { if (!MRole.getDefault().isCanReport(adTabbox.getSelectedGridTab().getAD_Table_ID())) { - FDialog.error(curWindowNo, parent, "AccessCannotReport"); + Dialog.error(curWindowNo, "AccessCannotReport"); return; } @@ -3178,7 +3173,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements int AD_Table_ID=getActiveGridTab().getAD_Table_ID(); final boolean isCanExport=MRole.getDefault().isCanExport(AD_Table_ID); if (!isCanExport) { - FDialog.error(curWindowNo, parent, "AccessCannotExport"); + Dialog.error(curWindowNo, "AccessCannotExport"); return; } else { ExportAction action = new ExportAction(this); @@ -3267,7 +3262,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements { if (adTabbox.getSelectedGridTab().hasChangedCurrentTabAndParents()) { String msg = CLogger.retrieveErrorString("Please ReQuery Window"); - FDialog.error(curWindowNo, parent, null, msg); + Dialog.error(curWindowNo, null, msg); return; } @@ -3363,7 +3358,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements if (record_ID == -1 && adtabPanel.getGridTab().getKeyColumnName().endsWith("_ID")) { - FDialog.error(curWindowNo, parent, "SaveErrorRowNotFound"); + Dialog.error(curWindowNo, "SaveErrorRowNotFound"); return; } @@ -3457,7 +3452,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements ; else { - FDialog.error(curWindowNo, parent, "PostDocNotComplete"); + Dialog.error(curWindowNo, "PostDocNotComplete"); return; } } @@ -3484,7 +3479,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements { final int tableIdRef = tableId; final int recordIdRef = recordId; - FDialog.ask(curWindowNo, null, "PostImmediate?", new Callback() { + Dialog.ask(curWindowNo, "PostImmediate?", new Callback() { @Override public void onCallback(Boolean result) @@ -3607,7 +3602,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements { 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; } @@ -3978,7 +3973,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements setupEmbeddedFindwindow(findWindow); if (!findWindow.initialize()) { if (findWindow.getTotalRecords() == 0) { - FDialog.info(curWindowNo, getComponent(), "NoRecordsFound"); + Dialog.info(curWindowNo, "NoRecordsFound"); } return false; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java index 1fd181c01a..5733b59306 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java @@ -28,7 +28,7 @@ import org.adempiere.webui.adwindow.DetailPane.Tabpanel; import org.adempiere.webui.component.ADTabListModel; import org.adempiere.webui.component.ADTabListModel.ADTabLabel; 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.DataStatusListener; import org.compiere.model.GridField; @@ -225,7 +225,7 @@ public class CompositeADTabbox extends AbstractADTabbox } else if (tabPanel != null && tabPanel.getGridTab().getRowCount() > 0 && tabPanel.getGridTab().getCurrentRow() >= 0) { - FDialog.ask(tabPanel.getGridTab().getWindowNo(), null, "DeleteRecord?", new Callback() { + Dialog.ask(tabPanel.getGridTab().getWindowNo(), "DeleteRecord?", new Callback() { @Override public void onCallback(Boolean result) { @@ -248,7 +248,7 @@ public class CompositeADTabbox extends AbstractADTabbox StringBuilder sb = new StringBuilder(); sb.append(Env.getContext(Env.getCtx(), tabPanel.getGridTab().getWindowNo(), "_WinInfo_WindowName", false)).append(" - ") .append(indices.length).append(" ").append(Msg.getMsg(Env.getCtx(), "Selected")); - FDialog.ask(sb.toString(), tabPanel.getGridTab().getWindowNo(), null,"DeleteSelection", new Callback() { + Dialog.ask(sb.toString(), tabPanel.getGridTab().getWindowNo(),"DeleteSelection", new Callback() { @Override public void onCallback(Boolean result) { if(result){ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java index e55933ad54..eab6414be3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java @@ -50,7 +50,7 @@ import org.adempiere.webui.info.InfoWindow; import org.adempiere.webui.process.WProcessInfo; import org.adempiere.webui.session.SessionManager; 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.SimplePDFViewer; import org.compiere.Adempiere; @@ -810,7 +810,7 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI return; 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"); return; } @@ -1029,7 +1029,7 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI Executions.schedule(getDesktop(), new EventListener() { @Override public void onEvent(Event event) throws Exception { - FDialog.ask(getWindowNo(), null, message, callback); + Dialog.ask(getWindowNo(), message, callback); } }, new Event("onAsk")); } @@ -1269,14 +1269,14 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI Executions.schedule(getDesktop(), new EventListener() { @Override public void onEvent(Event event) throws Exception { - FDialog.askForInput(m_WindowNo, null, message, callback); + Dialog.askForInput(m_WindowNo, message, callback); } }, new Event("onAskForInput")); } @Override public void askForInput(final String message, MLookup lookup, int editorType, final Callback callback) { - FDialog.askForInput(message, lookup, editorType, callback, getDesktop(), m_WindowNo); + Dialog.askForInput(message, lookup, editorType, callback, getDesktop(), m_WindowNo); } @Override diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/CalloutDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/CalloutDialog.java index ae618a3de7..302c18511f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/CalloutDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/CalloutDialog.java @@ -16,7 +16,7 @@ package org.adempiere.webui.apps; import org.adempiere.util.Callback; import org.adempiere.util.ICalloutUI; -import org.adempiere.webui.window.FDialog; +import org.adempiere.webui.window.Dialog; import org.compiere.model.MLookup; import org.zkoss.zk.ui.Desktop; @@ -38,7 +38,7 @@ public class CalloutDialog implements ICalloutUI { @Override public void askForInput(final String message, MLookup lookup, int editorType, final Callback callback) { - FDialog.askForInput(message, lookup, editorType, callback, desktop, m_windowNo); + Dialog.askForInput(message, lookup, editorType, callback, desktop, m_windowNo); } @Override diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java index 609b545601..40d7ea30c2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java @@ -37,7 +37,7 @@ import org.adempiere.webui.editor.WTableDirEditor; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.FeedbackManager; 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.compiere.model.MAttachment; import org.compiere.model.MColumn; @@ -303,12 +303,12 @@ public class FeedbackRequestWindow extends Window implements EventListener() { + Dialog.ask(getWindowNo(), "PrintShipments", new Callback() { @Override public void onCallback(Boolean result) { if (result) { @@ -628,7 +628,7 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene { if (m_ids == null) return; - FDialog.ask(getWindowNo(), this, "PrintInvoices", new Callback() { + Dialog.ask(getWindowNo(), "PrintInvoices", new Callback() { @Override public void onCallback(Boolean result) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java index ce2696dff6..e471af9ef6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java @@ -49,7 +49,7 @@ import org.adempiere.webui.event.ValueChangeEvent; import org.adempiere.webui.event.ValueChangeListener; import org.adempiere.webui.session.SessionManager; 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.model.GridField; import org.compiere.model.GridFieldVO; @@ -536,7 +536,7 @@ public class ProcessParameterPanel extends Panel implements } // field loop if (sb.length() != 0) { - FDialog.error(m_WindowNo, this, "FillMandatory", sb.toString()); + Dialog.error(m_WindowNo, "FillMandatory", sb.toString()); return false; } @@ -546,7 +546,7 @@ public class ProcessParameterPanel extends Panel implements for(IProcessParameterListener listener : listeners) { String error = listener.validate(this); if (!Util.isEmpty(error)) { - FDialog.error(m_WindowNo, this, error); + Dialog.error(m_WindowNo, error); return false; } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java index 60c46d5c61..2d760bfd77 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java @@ -19,7 +19,8 @@ package org.adempiere.webui.apps; import java.util.ArrayList; import java.util.List; 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.MRole; import org.compiere.model.MTable; @@ -85,7 +86,7 @@ public class WReport implements EventListener { if (log.isLoggable(Level.CONFIG)) log.config("AD_Table_ID=" + AD_Table_ID + " " + query); if (!MRole.getDefault().isCanReport(AD_Table_ID)) { - FDialog.error(0, "AccessCannotReport", query.getTableName()); + Dialog.error(0, "AccessCannotReport", query.getTableName()); return; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java index e5acc20cf5..fadb707b0e 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java @@ -16,6 +16,9 @@ *****************************************************************************/ 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_CURRENCY_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.IFormController; 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.model.MAllocationHdr; import org.compiere.model.MLookup; @@ -75,8 +78,6 @@ import org.zkoss.zul.Hlayout; import org.zkoss.zul.North; import org.zkoss.zul.South; -import static org.adempiere.webui.ClientInfo.*; - /** * Allocation Form * @@ -572,7 +573,7 @@ public class WAllocation extends Allocation model.updateComponent(row); if(msg != null && msg.length() > 0) - FDialog.warn(form.getWindowNo(), "AllocationWriteOffWarn"); + Dialog.warn(form.getWindowNo(), "AllocationWriteOffWarn"); calculate(); } // tableChanged @@ -743,7 +744,7 @@ public class WAllocation extends Allocation } catch (Exception e) { - FDialog.error(form.getWindowNo(), form, "Error", e.getLocalizedMessage()); + Dialog.error(form.getWindowNo(), "Error", e.getLocalizedMessage()); return null; } } // saveData diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java index 253d80599a..ed9e97d395 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java @@ -64,7 +64,7 @@ import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; 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.compiere.apps.form.Archive; import org.compiere.model.MArchive; @@ -670,7 +670,7 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis } // updateQDisplay public void cmd_deleteArchive(){ - FDialog.ask(m_WindowNo, this.form, "DeleteRecord?", new Callback() { + Dialog.ask(m_WindowNo, "DeleteRecord?", new Callback() { @Override public void onCallback(Boolean result) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAttributeGrid.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAttributeGrid.java index 240d3a03e4..9aeced7a73 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAttributeGrid.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAttributeGrid.java @@ -38,7 +38,7 @@ import org.adempiere.webui.component.Tabpanels; import org.adempiere.webui.component.Tabs; import org.adempiere.webui.panel.ADForm; 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.MAttributeValue; import org.compiere.model.MProduct; @@ -376,7 +376,7 @@ public class WAttributeGrid extends ADForm implements EventListener 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"); tabbox.setSelectedIndex(0); return; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java index f93a52ccfe..4a36039c8f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java @@ -42,7 +42,7 @@ import org.adempiere.webui.panel.CustomForm; import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.session.SessionManager; 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.util.CLogger; 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.Center; import org.zkoss.zul.North; -import org.zkoss.zul.South; import org.zkoss.zul.Separator; +import org.zkoss.zul.South; /** * This class represents the Custom Form for generating charges @@ -349,17 +349,17 @@ public class WCharge extends Charge implements IFormController, EventListener 0) { - FDialog.info(form.getWindowNo(), form, "ChargeCreated", listCreated.toString()); + Dialog.info(form.getWindowNo(), "ChargeCreated", listCreated.toString()); } if (listRejected.length() > 0) { - FDialog.error(form.getWindowNo(), form, "ChargeNotCreated", listRejected.toString()); + Dialog.error(form.getWindowNo(), "ChargeNotCreated", listRejected.toString()); } m_selectedCount = 0; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java index e3fe15be8a..dca7727cc3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java @@ -38,7 +38,7 @@ import org.adempiere.webui.editor.WSearchEditor; import org.adempiere.webui.editor.WStringEditor; import org.adempiere.webui.editor.WTableDirEditor; 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.model.GridTab; import org.compiere.model.MBankStatement; @@ -143,7 +143,7 @@ public class WCreateFromDepositBatchUI extends CreateFromDepositBatch implements if (getGridTab().getValue("C_DepositBatch_ID") == null) { - FDialog.error(0, window, "SaveErrorRowNotFound"); + Dialog.error(0, "SaveErrorRowNotFound"); return false; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromForm.java index d80554c373..1047335241 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromForm.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromForm.java @@ -28,7 +28,7 @@ import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.panel.StatusBarPanel; import org.adempiere.webui.theme.ThemeManager; 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.util.Env; import org.compiere.util.Msg; @@ -169,7 +169,7 @@ public class WCreateFromForm extends ADForm implements EventListener, WTa } catch (Exception ex) { - FDialog.error(getWindowNo(), this, "Error", ex.getLocalizedMessage()); + Dialog.error(getWindowNo(), "Error", ex.getLocalizedMessage()); } } // Cancel diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java index c3214b3d92..a13ab582aa 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java @@ -40,7 +40,7 @@ import org.adempiere.webui.editor.WSearchEditor; import org.adempiere.webui.editor.WStringEditor; import org.adempiere.webui.editor.WTableDirEditor; 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.model.GridTab; import org.compiere.model.MBankStatement; @@ -144,7 +144,7 @@ public class WCreateFromStatementUI extends CreateFromStatement implements Event if (getGridTab().getValue("C_BankStatement_ID") == null) { - FDialog.error(0, window, "SaveErrorRowNotFound"); + Dialog.error(0, "SaveErrorRowNotFound"); return false; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java index d1580b0941..2ab058d672 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java @@ -28,7 +28,7 @@ import org.adempiere.webui.event.WTableModelListener; import org.adempiere.webui.panel.StatusBarPanel; import org.adempiere.webui.theme.ThemeManager; 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.util.Trx; import org.compiere.util.TrxRunnable; @@ -165,7 +165,7 @@ public class WCreateFromWindow extends Window implements EventListener, W } catch (Exception ex) { - FDialog.error(windowNo, this, "Error", ex.getLocalizedMessage()); + Dialog.error(windowNo, "Error", ex.getLocalizedMessage()); } } // Cancel diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java index 48aa3a5ee1..ebd9bdf8da 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java @@ -42,7 +42,7 @@ import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.util.ReaderInputStream; 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.ImpFormatRow; import org.compiere.model.MRole; @@ -473,7 +473,7 @@ public class WFileImport extends ADForm implements EventListener if (m_format == null) { - FDialog.error(m_WindowNo, this, formatName); + Dialog.error(m_WindowNo, formatName); return; } @@ -568,7 +568,7 @@ public class WFileImport extends ADForm implements EventListener { if (m_format == null) { - FDialog.error(m_WindowNo, this, "FileImportNoFormat"); + Dialog.error(m_WindowNo, "FileImportNoFormat"); return; } @@ -583,7 +583,7 @@ public class WFileImport extends ADForm implements EventListener if (m_format.updateDB(Env.getCtx(), m_data.get(row).toString(), null)) imported++; - FDialog.info(m_WindowNo, this, "FileImportR/I", row + " / " + imported + "#"); + Dialog.info(m_WindowNo, "FileImportR/I", row + " / " + imported + "#"); SessionManager.getAppDesktop().closeActiveWindow(); } // cmd_process diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java index 2ecad3f28a..748975a217 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java @@ -44,7 +44,7 @@ import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.panel.StatusBarPanel; import org.adempiere.webui.session.SessionManager; 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.compiere.apps.form.GenForm; import org.compiere.minigrid.IDColumn; @@ -391,7 +391,7 @@ public class WGenForm extends ADForm implements EventListener, WTableMode public void onAfterProcess() { // OK to print - FDialog.ask(getWindowNo(), this, genForm.getAskPrintMsg(), new Callback() { + Dialog.ask(getWindowNo(), genForm.getAskPrintMsg(), new Callback() { @Override public void onCallback(Boolean result) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMerge.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMerge.java index efb8f94425..aa7be86680 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMerge.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMerge.java @@ -33,7 +33,7 @@ import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.session.SessionManager; 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.model.Lookup; import org.compiere.model.MLookupFactory; @@ -246,7 +246,7 @@ public class WMerge extends Merge implements IFormController, EventListener() { + Dialog.ask(m_WindowNo, "MergeQuestion", m_msg, new Callback() { @Override public void onCallback(Boolean result) @@ -294,12 +294,12 @@ public class WMerge extends Merge implements IFormController, EventListener 0) - FDialog.error(m_WindowNo, form, msg); + Dialog.error(m_WindowNo, msg); getPluginFeatures(); } // loadPaymentRuleInfo @@ -442,10 +442,10 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene if (no >= 0) { 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); - FDialog.ask(m_WindowNo, form, "VPayPrintSuccess?", new Callback() { + Dialog.ask(m_WindowNo, "VPayPrintSuccess?", new Callback() { @Override public void onCallback(Boolean result) @@ -459,7 +459,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene } }); } else { - FDialog.error(m_WindowNo, form, "Error", err.toString()); + Dialog.error(m_WindowNo, "Error", err.toString()); } dispose(); } @@ -486,7 +486,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene */ protected void confirm_cmd_print() { - FDialog.ask(m_WindowNo, form, "CreatePayments?", new Callback() { + Dialog.ask(m_WindowNo, "CreatePayments?", new Callback() { @Override public void onCallback(Boolean result) @@ -590,7 +590,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene DB.executeUpdate(sb.toString(), null); } - FDialog.ask(m_WindowNo, form, "VPayPrintPrintRemittance", new Callback() { + Dialog.ask(m_WindowNo, "VPayPrintPrintRemittance", new Callback() { @Override 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 || 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)"); return false; } @@ -679,7 +679,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene // 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"); return false; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java index 54f6debb74..b62781b32d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java @@ -57,7 +57,7 @@ import org.adempiere.webui.panel.CustomForm; import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.session.SessionManager; 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.model.MPaySelection; import org.compiere.model.MSysConfig; @@ -327,7 +327,7 @@ public class WPaySelect extends PaySelect fieldBankAccount.appendItem(bi.toString(), bi); if (fieldBankAccount.getItemCount() == 0) - FDialog.error(m_WindowNo, form, "VPaySelectNoBank"); + Dialog.error(m_WindowNo, "VPaySelectNoBank"); else fieldBankAccount.setSelectedIndex(0); @@ -390,7 +390,7 @@ public class WPaySelect extends PaySelect if (log.isLoggable(Level.CONFIG)) log.config("PayDate=" + payDate); if (fieldBankAccount.getItemCount() == 0) { - FDialog.error(m_WindowNo, form, "VPaySelectNoBank"); + Dialog.error(m_WindowNo, "VPaySelectNoBank"); return; } @@ -454,7 +454,7 @@ public class WPaySelect extends PaySelect loadTableInfo(); // Ask to Open Print Form - FDialog.ask(m_WindowNo, form, "VPaySelectPrint?", new Callback() { + Dialog.ask(m_WindowNo, "VPaySelectPrint?", new Callback() { @Override public void onCallback(Boolean result) @@ -548,14 +548,14 @@ public class WPaySelect extends PaySelect if(msg != null && msg.length() > 0) { - FDialog.error(m_WindowNo, form, "SaveError", msg); + Dialog.error(m_WindowNo, "SaveError", msg); return; } 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 - FDialog.ask(m_WindowNo, form, "VPaySelectGenerate?", new Callback() { + Dialog.ask(m_WindowNo, "VPaySelectGenerate?", new Callback() { @Override public void onCallback(Boolean result) @@ -587,7 +587,7 @@ public class WPaySelect extends PaySelect public void onEvent(Event event) throws Exception { if (!dialog.isCancel()) { 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; } } @@ -654,7 +654,7 @@ public class WPaySelect extends PaySelect Executions.schedule(form.getDesktop(), new EventListener() { @Override public void onEvent(Event event) throws Exception { - FDialog.ask(m_WindowNo, null, message, callback); + Dialog.ask(m_WindowNo, message, callback); } }, new Event("onAsk")); } @@ -670,7 +670,7 @@ public class WPaySelect extends PaySelect Executions.schedule(form.getDesktop(), new EventListener() { @Override public void onEvent(Event event) throws Exception { - FDialog.askForInput(m_WindowNo, null, message, callback); + Dialog.askForInput(m_WindowNo, message, callback); } }, new Event("onAskForInput")); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java index 8782052149..ad5240c48f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java @@ -31,7 +31,7 @@ import org.adempiere.webui.component.Rows; import org.adempiere.webui.editor.WDateEditor; import org.adempiere.webui.editor.WNumberEditor; 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.model.GridTab; import org.compiere.model.MConversionRate; @@ -199,7 +199,7 @@ public class WPaymentFormCash extends PaymentFormCash implements EventListener, zkInit(); initOK = dynInit(); // Null Pointer if order/invoice not saved yet } 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; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WQuickForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WQuickForm.java index 1d0acddcc7..f088c2be44 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WQuickForm.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WQuickForm.java @@ -34,7 +34,7 @@ import org.adempiere.webui.component.ZkCssHelper; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.util.ZKUpdateUtil; 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.GridField; import org.compiere.model.GridTab; @@ -217,7 +217,7 @@ public class WQuickForm extends Window implements IQuickForm { if (gridTab.getTableModel().getRowChanged() > -1) { - FDialog.ask(windowNo, this, "SaveChanges?", new Callback () { + Dialog.ask(windowNo, "SaveChanges?", new Callback () { @Override public void onCallback(Boolean result) @@ -296,7 +296,7 @@ public class WQuickForm extends Window implements IQuickForm final int[] indices = gridTab.getSelection(); if (indices.length > 0) { - FDialog.ask(windowNo, this, "DeleteRecord?", new Callback () { + Dialog.ask(windowNo, "DeleteRecord?", new Callback () { @Override public void onCallback(Boolean result) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java index 36ea55bfad..954e89b23b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java @@ -47,7 +47,7 @@ import org.adempiere.webui.panel.WRCTabPanel; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; 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.compiere.model.MRole; import org.compiere.model.Query; @@ -161,7 +161,7 @@ public class WReportCustomization implements IFormController,EventListener, Va throw e; } clearForm(); - FDialog.info(form.getWindowNo(), form, "RecordSaved"); + Dialog.info(form.getWindowNo(), "RecordSaved"); return; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java index 72caa278f9..450173b8e7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java @@ -41,7 +41,7 @@ import org.adempiere.webui.editor.WTableDirEditor; import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.panel.IFormController; 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.model.MBankStatement; 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) { - FDialog.error(0, form, "SaveErrorRowNotFound"); + Dialog.error(0, "SaveErrorRowNotFound"); return false; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java index 737e9fd875..aeba51a984 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java @@ -52,7 +52,7 @@ import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.panel.WTabEditorForm; import org.adempiere.webui.session.SessionManager; 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.model.GridField; 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()))) { - FDialog.error(m_WindowNo, "TabEditorWrongLanguage"); + Dialog.error(m_WindowNo, "TabEditorWrongLanguage"); tabform.detach(); return; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java index 05790e4245..c6f8cd0377 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java @@ -36,7 +36,7 @@ import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.TreeUtils; 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.model.MTree; import org.compiere.model.MTreeNode; @@ -486,7 +486,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController private void action_treeAddAll() { // idempiere-85 - FDialog.ask(m_WindowNo, null, "TreeAddAllItems", new Callback() { + Dialog.ask(m_WindowNo, "TreeAddAllItems", new Callback() { @Override public void onCallback(Boolean result) @@ -514,7 +514,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController { log.info(""); // idempiere-85 - FDialog.ask(m_WindowNo, null, "TreeRemoveAllItems", new Callback() { + Dialog.ask(m_WindowNo, "TreeRemoveAllItems", new Callback() { @Override public void onCallback(Boolean result) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java index cd5230fdf9..8efd005862 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java @@ -42,7 +42,7 @@ import org.adempiere.webui.panel.StatusBarPanel; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; 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.MLookup; import org.compiere.model.MLookupFactory; @@ -621,7 +621,7 @@ public class WWFActivity extends ADForm implements EventListener } if (!m_activity.forwardTo(fw, textMsg)) { - FDialog.error(m_WindowNo, this, "CannotForward"); + Dialog.error(m_WindowNo, "CannotForward"); trx.rollback(); trx.close(); return; @@ -642,7 +642,7 @@ public class WWFActivity extends ADForm implements EventListener } 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.close(); return; @@ -658,7 +658,7 @@ public class WWFActivity extends ADForm implements EventListener catch (Exception 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.close(); return; @@ -678,7 +678,7 @@ public class WWFActivity extends ADForm implements EventListener catch (Exception 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.close(); return; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeFavoriteOnDropListener.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeFavoriteOnDropListener.java index 73f625dddf..94dfa0462a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeFavoriteOnDropListener.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeFavoriteOnDropListener.java @@ -15,7 +15,7 @@ import org.adempiere.webui.dashboard.DPFavourites; import org.adempiere.webui.desktop.FavouriteController; import org.adempiere.webui.theme.ThemeManager; 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.MTreeFavoriteNode; import org.compiere.model.MTreeNode; @@ -98,7 +98,7 @@ public class ADTreeFavoriteOnDropListener implements EventListener } else { - FDialog.error(0, "DragItemMenu"); + Dialog.error(0, "DragItemMenu"); return; } @@ -198,7 +198,7 @@ public class ADTreeFavoriteOnDropListener implements EventListener */ private void showWarningDialog() { - FDialog.warn(0, Msg.getMsg(Env.getCtx(), "AlreadyExists")); + Dialog.warn(0, Msg.getMsg(Env.getCtx(), "AlreadyExists")); } // showWarningDialog /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java index d7f2b6af74..05e491cfd6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java @@ -20,7 +20,7 @@ import org.adempiere.webui.adwindow.ADWindowContent; import org.adempiere.webui.adwindow.IADTabpanel; import org.adempiere.webui.session.SessionManager; 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.MTreeNode; import org.compiere.model.PO; @@ -214,7 +214,7 @@ public class ADTreeOnDropListener implements EventListener { catch (Exception e) { trx.rollback(); - FDialog.error(windowNo, tree, "TreeUpdateError", e.getLocalizedMessage()); + Dialog.error(windowNo, "TreeUpdateError", e.getLocalizedMessage()); } finally { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java index 6f412903af..5a42ab0736 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java @@ -19,7 +19,7 @@ import java.util.Arrays; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.theme.ThemeManager; 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.util.Ini; import org.compiere.util.Util; @@ -200,7 +200,7 @@ public class FolderBrowser extends Window implements EventListener { if(!file.isDirectory() || !file.exists()) { - FDialog.error(0, "Invalid directory"); + Dialog.error(0, "Invalid directory"); return; } } @@ -208,7 +208,7 @@ public class FolderBrowser extends Window implements EventListener { if(!file.isFile() || !file.exists()) { - FDialog.error(0, "Invalid file"); + Dialog.error(0, "Invalid file"); return; } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java index 964125b552..ae7129d829 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java @@ -34,7 +34,7 @@ import org.adempiere.webui.component.Window; import org.adempiere.webui.editor.WTableDirEditor; import org.adempiere.webui.theme.ThemeManager; 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.MLookup; import org.compiere.model.MLookupFactory; @@ -326,7 +326,7 @@ public class RequestWindow extends Window implements EventListener { } else { - FDialog.error(0, this, "Request record not saved"); + Dialog.error(0, "Request record not saved"); return; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java index ab6b147fe5..96498b0b63 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java @@ -55,7 +55,7 @@ import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.UserPreference; 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.GridTab; 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()); if (!MRole.getDefault().isCanReport(AD_Table_ID)) { - FDialog.error(0, null, "AccessCannotReport", query.getTableName()); + Dialog.error(0, "AccessCannotReport", query.getTableName()); return; } if (AD_Table_ID != 0) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java index 815efa1e08..b7d1bb9a8e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java @@ -31,7 +31,7 @@ import org.adempiere.webui.panel.IHelpContext; import org.adempiere.webui.panel.InfoPanel; import org.adempiere.webui.part.WindowContainer; 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.compiere.model.MInfoWindow; 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))); infoPanel.focus(); } else { - FDialog.error(0, "NotValid"); + Dialog.error(0, "NotValid"); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java index ff8f778ced..72b45162e0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java @@ -29,7 +29,7 @@ import org.adempiere.webui.editor.WLocationEditor; import org.adempiere.webui.event.ValueChangeEvent; import org.adempiere.webui.event.ValueChangeListener; 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.MBPartnerLocation; import org.compiere.model.MLocation; @@ -311,7 +311,7 @@ public class WBPartner extends Window implements EventListener, ValueChan if (m_partner.get_ID() == 0) { - FDialog.error(m_WindowNo, this, "BPartnerNotFound"); + Dialog.error(m_WindowNo, "BPartnerNotFound"); return false; } @@ -439,7 +439,7 @@ public class WBPartner extends Window implements EventListener, ValueChan if (m_partner.save()) { if (log.isLoggable(Level.FINE)) log.fine("C_BPartner_ID=" + m_partner.getC_BPartner_ID()); } else { - FDialog.error(m_WindowNo, this, "BPartnerNotSaved"); + Dialog.error(m_WindowNo, "BPartnerNotSaved"); m_partner = null; return false; } @@ -458,7 +458,7 @@ public class WBPartner extends Window implements EventListener, ValueChan if (m_pLocation.save()) { if (log.isLoggable(Level.FINE)) log.fine("C_BPartner_Location_ID=" + m_pLocation.getC_BPartner_Location_ID()); } 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 ***** @@ -493,7 +493,7 @@ public class WBPartner extends Window implements EventListener, ValueChan if (m_user.save()) { if (log.isLoggable(Level.FINE)) log.fine("AD_User_ID=" + m_user.getAD_User_ID()); } 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; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java index 6fdfa64cf4..eff277097e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java @@ -32,7 +32,7 @@ import org.adempiere.webui.event.ValueChangeListener; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; 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.GridTab; import org.compiere.model.GridTable; @@ -367,7 +367,7 @@ public class WQuickEntry extends AbstractWQuickEntry implements EventListener0 && !isParentSave){ - FDialog.error(m_WindowNo, this, "FillMinimumInfo",tabZeroName); + Dialog.error(m_WindowNo, "FillMinimumInfo",tabZeroName); return false; } po.saveEx(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java index e14e20fc08..12378d42aa 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java @@ -65,7 +65,7 @@ import org.adempiere.webui.panel.InfoPanel; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; 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.EmbedWinInfo; import org.compiere.minigrid.IDColumn; @@ -2008,12 +2008,12 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL { if (log.isLoggable(Level.INFO)) 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 { log.log(Level.SEVERE, countSql, e); - FDialog.error(p_WindowNo, "DBExecuteError", e.getMessage()); + Dialog.error(p_WindowNo, "DBExecuteError", e.getMessage()); } m_count = -2; } @@ -2029,7 +2029,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL { if (promptError) { - FDialog.error(getWindowNo(), this, "InfoFindOverMax", + Dialog.error(getWindowNo(), "InfoFindOverMax", m_count + " > " + infoWindow.getMaxQueryRecords()); } m_count = 0; @@ -2404,7 +2404,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL } String msg = Msg.translate(ctx, sbError.toString()); - FDialog.error(0, this, "ValidationError", msg); // TODO messaggio + Dialog.error(0, "ValidationError", msg); // TODO messaggio } else changeIsValid = true; @@ -2413,7 +2413,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL { 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; } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java index 68ca19758a..4e7e27034b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java @@ -42,7 +42,7 @@ import org.adempiere.webui.component.SimpleListModel; import org.adempiere.webui.factory.ButtonFactory; import org.adempiere.webui.theme.ThemeManager; 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.MField; 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); if(ok) { m_saved = true; - // FDialog.info(m_WindowNo, null, "Saved"); getParent().detach(); if(gridPanel!=null){ Events.postEvent("onCustomizeGrid", gridPanel, null); } } else { - FDialog.error(m_WindowNo, null, "SaveError", custom.toString()); + Dialog.error(m_WindowNo, "SaveError", custom.toString()); } } // saveData diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java index 7d25756124..f8e331f93c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java @@ -34,7 +34,7 @@ import org.adempiere.webui.component.Row; import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.Textbox; 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.IDColumn; import org.compiere.model.I_C_ElementValue; @@ -437,7 +437,7 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener // Miminum check 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"); return false; } @@ -568,7 +568,7 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener 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); return false; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java index 72cec2b6ce..a27fa85b6d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java @@ -67,7 +67,7 @@ import org.adempiere.webui.part.ITabOnSelectHandler; import org.adempiere.webui.part.WindowContainer; import org.adempiere.webui.session.SessionManager; 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.IDColumn; import org.compiere.model.GridField; @@ -1088,12 +1088,12 @@ public abstract class InfoPanel extends Window implements EventListener, { if (log.isLoggable(Level.INFO)) 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 { 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, { if (log.isLoggable(Level.INFO)) 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 { log.log(Level.SEVERE, countSql, e); - FDialog.error(p_WindowNo, "DBExecuteError", e.getMessage()); + Dialog.error(p_WindowNo, "DBExecuteError", e.getMessage()); } m_count = -2; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java index 418304ce6e..dc790c2af3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java @@ -48,7 +48,7 @@ import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.BrowserToken; import org.adempiere.webui.util.UserPreference; 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.compiere.Adempiere; import org.compiere.model.MClient; @@ -477,7 +477,7 @@ public class LoginPanel extends Window implements EventListener } catch (Exception e) { String message = e.getMessage(); - FDialog.warn(0, this, "URLnotValid", message); + Dialog.warn(0, "URLnotValid", message); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/QuickCustomizeGridViewPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/QuickCustomizeGridViewPanel.java index 4878003e44..c56f6fd397 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/QuickCustomizeGridViewPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/QuickCustomizeGridViewPanel.java @@ -38,7 +38,7 @@ import org.adempiere.webui.component.Panel; import org.adempiere.webui.component.SimpleListModel; import org.adempiere.webui.factory.ButtonFactory; 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.MField; import org.compiere.model.MRole; @@ -425,7 +425,7 @@ public class QuickCustomizeGridViewPanel extends Panel { } getParent().detach(); } else { - FDialog.error(m_WindowNo, null, "SaveError", custom.toString()); + Dialog.error(m_WindowNo, "SaveError", custom.toString()); } } // saveData diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java index 256fa18280..cf9464cf90 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java @@ -40,7 +40,7 @@ import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.UserPreference; 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.compiere.model.MRole; import org.compiere.model.MSysConfig; @@ -636,7 +636,7 @@ public class RolePanel extends Window implements EventListener, Deferrabl if (! Util.isEmpty(msg)) { Env.getCtx().clear(); - FDialog.error(0, this, "Error", msg, new Callback() { + Dialog.error(0, "Error", msg, new Callback() { @Override public void onCallback(Integer result) { Events.echoEvent(new Event(ON_DEFER_LOGOUT, component)); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java index 5926392ab2..024a165741 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java @@ -27,7 +27,7 @@ import org.adempiere.webui.component.Menupopup; import org.adempiere.webui.component.Messagebox; import org.adempiere.webui.session.SessionManager; 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.compiere.model.MClient; import org.compiere.model.MOrg; @@ -186,7 +186,7 @@ public class UserPanel implements EventListener, Composer if (logout == event.getTarget()) { if (SessionManager.getAppDesktop().isPendingWindow()) { - FDialog.ask(0, component, "ProceedWithTask?", new Callback() { + Dialog.ask(0, "ProceedWithTask?", new Callback() { @Override public void onCallback(Boolean result) @@ -217,7 +217,7 @@ public class UserPanel implements EventListener, Composer else if (changeRole == event.getTarget()) { if (SessionManager.getAppDesktop().isPendingWindow()) { - FDialog.ask(0, component, "ProceedWithTask?", new Callback() { + Dialog.ask(0, "ProceedWithTask?", new Callback() { @Override public void onCallback(Boolean result) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ValidateMFAPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ValidateMFAPanel.java index ea119c0ce8..290c05c74d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ValidateMFAPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ValidateMFAPanel.java @@ -49,7 +49,7 @@ import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ThemeManager; 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.compiere.model.MMFAMethod; import org.compiere.model.MMFARegisteredDevice; @@ -388,7 +388,7 @@ public class ValidateMFAPanel extends Window implements EventListener { String msg = login.validateLogin(m_orgKNPair); if (!Util.isEmpty(msg)) { Env.getCtx().clear(); - FDialog.error(0, this, "Error", msg, new Callback() { + Dialog.error(0, "Error", msg, new Callback() { @Override public void onCallback(Integer result) { Events.echoEvent(new Event(ON_DEFER_LOGOUT, component)); @@ -406,7 +406,7 @@ public class ValidateMFAPanel extends Window implements EventListener { Timestamp now = TimeUtil.getDay(null); 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) })); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java index 40c2529c82..7839dbb98f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java @@ -47,7 +47,7 @@ import org.adempiere.webui.event.DialogEvents; import org.adempiere.webui.factory.ButtonFactory; import org.adempiere.webui.theme.ThemeManager; 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.WTextEditorDialog; import org.compiere.model.MAttachment; @@ -755,7 +755,7 @@ public class WAttachment extends Window implements EventListener { log.info(""); - FDialog.ask(m_WindowNo, this, "AttachmentDelete?", new Callback() { + Dialog.ask(m_WindowNo, "AttachmentDelete?", new Callback() { @Override public void onCallback(Boolean result) @@ -786,7 +786,7 @@ public class WAttachment extends Window implements EventListener if (fileName == null) return; - FDialog.ask(m_WindowNo, this, "AttachmentDeleteEntry?", new Callback() { + Dialog.ask(m_WindowNo, "AttachmentDeleteEntry?", new Callback() { @Override public void onCallback(Boolean result) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java index 03392b8435..01a3e2deaa 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java @@ -35,7 +35,7 @@ import org.adempiere.webui.component.Window; import org.adempiere.webui.event.DialogEvents; import org.adempiere.webui.theme.ThemeManager; 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.MAllocationHdr; import org.compiere.model.MBankStatement; @@ -156,14 +156,14 @@ public class WDocActionPanel extends Window implements EventListener, Dia if (wfStatus != null) { if (! fromMenu) - FDialog.error(gridTab.getWindowNo(), this, "WFActiveForRecord", wfStatus); + Dialog.error(gridTab.getWindowNo(), "WFActiveForRecord", wfStatus); return; } // Status Change if (!checkStatus(gridTab.getTableName(), gridTab.getRecord_ID(), DocStatus)) { - FDialog.error(gridTab.getWindowNo(), this, "DocumentStatusChanged"); + Dialog.error(gridTab.getWindowNo(), "DocumentStatusChanged"); return; } /******************* @@ -379,7 +379,7 @@ public class WDocActionPanel extends Window implements EventListener, Dia String docAction = lstDocAction.getSelectedItem().getLabel(); MessageFormat mf = new MessageFormat(Msg.getMsg(Env.getAD_Language(Env.getCtx()), "ConfirmOnDocAction")); Object[] arguments = new Object[]{docAction}; - FDialog.ask(gridTab.getWindowNo(), this, "", mf.format(arguments), new Callback() { + Dialog.ask(gridTab.getWindowNo(), "", mf.format(arguments), new Callback() { @Override public void onCallback(Boolean result) { if(result) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java index 525eea9474..308fe00cbd 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java @@ -42,7 +42,7 @@ import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.Window; import org.adempiere.webui.event.DialogEvents; 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.util.Env; import org.compiere.util.Msg; @@ -259,7 +259,7 @@ public class ExportAction implements EventListener } } }else if (event.getName().equals("onExporterException")){ - FDialog.error(0, winExportFile, "FileInvalidExtension"); + Dialog.error(0, "FileInvalidExtension"); winExportFile.onClose(); } } @@ -342,7 +342,7 @@ public class ExportAction implements EventListener media = new AMedia(exporter.getSuggestedFileName(panel.getActiveGridTab()), null, exporter.getContentType(), file, true); Filedownload.save(media); } catch (Exception e) { - FDialog.error(0, winExportFile, e.getLocalizedMessage()); + Dialog.error(0, e.getLocalizedMessage()); } finally { if (winExportFile != null) winExportFile.onClose(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/FileImportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/FileImportAction.java index 9d45495702..73cf053819 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/FileImportAction.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/FileImportAction.java @@ -50,7 +50,7 @@ import org.adempiere.webui.editor.WTableDirEditor; import org.adempiere.webui.event.DialogEvents; import org.adempiere.webui.util.ReaderInputStream; 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.MLookup; import org.compiere.model.MLookupFactory; @@ -285,7 +285,7 @@ public class FileImportAction implements EventListener ListItem li = cboType.getSelectedItem(); if(li == null || li.getValue() == null) { - FDialog.error(0, winImportFile, "FileInvalidExtension"); + Dialog.error(0, "FileInvalidExtension"); return; } @@ -293,7 +293,7 @@ public class FileImportAction implements EventListener IGridTabImporter importer = importerMap.get(ext); if (importer == null) { - FDialog.error(0, winImportFile, "FileInvalidExtension"); + Dialog.error(0, "FileInvalidExtension"); return; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java index ed1ac1f15b..5109588073 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java @@ -40,7 +40,7 @@ import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.Window; import org.adempiere.webui.component.ZkCssHelper; 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.MQuery; import org.compiere.model.MRole; @@ -252,7 +252,7 @@ public class ReportAction implements EventListener ListItem li = cboPrintFormat.getSelectedItem(); if(li == null || li.getValue() == null) { - FDialog.error(0, winReport, "PrintFormatMandatory"); + Dialog.error(0, "PrintFormatMandatory"); return; } @@ -264,7 +264,7 @@ public class ReportAction implements EventListener li = cboExportType.getSelectedItem(); if(li == null || li.getValue() == null) { - FDialog.error(0, winReport, "ExportFileTypeMandatory"); + Dialog.error(0, "ExportFileTypeMandatory"); return; } } @@ -399,7 +399,7 @@ public class ReportAction implements EventListener ListItem li = cboExportType.getSelectedItem(); if(li == null || li.getValue() == null) { - FDialog.error(0, winReport, "FileInvalidExtension"); + Dialog.error(0, "FileInvalidExtension"); return; } @@ -460,7 +460,7 @@ public class ReportAction implements EventListener } else { - FDialog.error(0, winReport, "FileInvalidExtension"); + Dialog.error(0, "FileInvalidExtension"); return; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/scheduler/ChangeStateAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/scheduler/ChangeStateAction.java index c2c36032f7..13d5201dc8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/scheduler/ChangeStateAction.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/scheduler/ChangeStateAction.java @@ -33,7 +33,7 @@ import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.adwindow.ADWindowContent; import org.adempiere.webui.component.Button; 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.GridTab; import org.compiere.model.MScheduler; @@ -90,7 +90,7 @@ public class ChangeStateAction implements IAction, EventListener { else if (status == IServerManager.SERVER_STATE_STOPPED) label = Msg.getMsg(Env.getCtx(), "SchedulerStopped"); else - FDialog.error(content.getWindowNo(), content.getComponent(), "CantReadCurrentSchedulerState"); + Dialog.error(content.getWindowNo(), "CantReadCurrentSchedulerState"); if (label == null) return; @@ -115,9 +115,9 @@ public class ChangeStateAction implements IAction, EventListener { MScheduler model = (MScheduler) schedulerAttr; String error = serverMgr.start(model.getServerID()); if (error == null) { - FDialog.info(0, null, "SchedulerStartSuccess"); + Dialog.info(0, "SchedulerStartSuccess"); } else { - FDialog.error(0, "SchedulerStartFail", error); + Dialog.error(0, "SchedulerStartFail", error); } Clients.clearBusy(); } @@ -129,9 +129,9 @@ public class ChangeStateAction implements IAction, EventListener { MScheduler model = (MScheduler) schedulerAttr; String error = serverMgr.stop(model.getServerID()); if (error == null) { - FDialog.info(0, null, "SchedulerStopSuccess"); + Dialog.info(0, "SchedulerStopSuccess"); } else { - FDialog.error(0, "SchedulerStopFail", error); + Dialog.error(0, "SchedulerStopFail", error); } Clients.clearBusy(); } @@ -142,9 +142,9 @@ public class ChangeStateAction implements IAction, EventListener { if (schedulerAttr != null && schedulerAttr instanceof MScheduler) { String error = serverMgr.addScheduler(scheduler); if (error == null) { - FDialog.info(0, null, "SchedulerAddAndStartSuccess"); + Dialog.info(0, "SchedulerAddAndStartSuccess"); } else { - FDialog.error(0, "SchedulerAddAndStartFail", error); + Dialog.error(0, "SchedulerAddAndStartFail", error); } Clients.clearBusy(); } @@ -180,7 +180,7 @@ public class ChangeStateAction implements IAction, EventListener { if (stateAttr != null && stateAttr instanceof Number && schedulerAttr != null && schedulerAttr instanceof MScheduler) { int state = ((Number)stateAttr).intValue(); if (state == IServerManager.SERVER_STATE_NOT_SCHEDULE) { - FDialog.ask(0, null, "SchedulerAddAndStartPrompt", new Callback() { + Dialog.ask(0, "SchedulerAddAndStartPrompt", new Callback() { @Override public void onCallback(Boolean result) { if (result) { @@ -190,7 +190,7 @@ public class ChangeStateAction implements IAction, EventListener { } }); } else if (state == IServerManager.SERVER_STATE_STARTED) { - FDialog.ask(0, null, "SchedulerStopPrompt", new Callback() { + Dialog.ask(0, "SchedulerStopPrompt", new Callback() { @Override public void onCallback(Boolean result) { if (result) { @@ -202,7 +202,7 @@ public class ChangeStateAction implements IAction, EventListener { }); } else if (state == IServerManager.SERVER_STATE_STOPPED) { - FDialog.ask(0, null, "SchedulerStartPrompt", new Callback() { + Dialog.ask(0, "SchedulerStartPrompt", new Callback() { @Override public void onCallback(Boolean result) { if (result) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/scheduler/SchedulerStateEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/scheduler/SchedulerStateEditor.java index fc375b55eb..9b6d330a05 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/scheduler/SchedulerStateEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/scheduler/SchedulerStateEditor.java @@ -31,7 +31,7 @@ import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.component.Button; import org.adempiere.webui.editor.IEditorConfiguration; 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.MScheduler; import org.compiere.model.StateChangeEvent; @@ -107,9 +107,9 @@ public class SchedulerStateEditor extends WEditor { if (serverMgr != null) { String error = serverMgr.start(model.getServerID()); if (error == null) { - FDialog.info(0, null, "SchedulerStartSuccess"); + Dialog.info(0, "SchedulerStartSuccess"); } else { - FDialog.error(0, "SchedulerStartFail", error); + Dialog.error(0, "SchedulerStartFail", error); } getComponent().setLabel(getDisplay()); } @@ -125,9 +125,9 @@ public class SchedulerStateEditor extends WEditor { if (serverMgr != null) { String error = serverMgr.stop(model.getServerID()); if (error == null) { - FDialog.info(0, null, "SchedulerStopSuccess"); + Dialog.info(0, "SchedulerStopSuccess"); } else { - FDialog.error(0, "SchedulerStopFail", error); + Dialog.error(0, "SchedulerStopFail", error); } getComponent().setLabel(getDisplay()); } @@ -144,12 +144,12 @@ public class SchedulerStateEditor extends WEditor { String error = serverMgr.addScheduler(model); if (error == null) { if (serverMgr.getServerInstance(model.getServerID()) != null) { - FDialog.info(0, null, "SchedulerAddAndStartSuccess"); + Dialog.info(0, "SchedulerAddAndStartSuccess"); } 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 { - FDialog.error(0, "SchedulerAddAndStartFail", error); + Dialog.error(0, "SchedulerAddAndStartFail", error); } getComponent().setLabel(getDisplay()); } @@ -231,7 +231,7 @@ public class SchedulerStateEditor extends WEditor { } } } else { - FDialog.error(0, "CantReadCurrentSchedulerState"); + Dialog.error(0, "CantReadCurrentSchedulerState"); } } @@ -242,7 +242,7 @@ public class SchedulerStateEditor extends WEditor { if (id <= 0) return; - FDialog.ask(0, null, "SchedulerAddAndStartPrompt", new Callback() { + Dialog.ask(0, "SchedulerAddAndStartPrompt", new Callback() { @Override public void onCallback(Boolean result) { if (result) { @@ -260,7 +260,7 @@ public class SchedulerStateEditor extends WEditor { if (id <= 0) return; - FDialog.ask(0, null, "SchedulerStopPrompt", new Callback() { + Dialog.ask(0, "SchedulerStopPrompt", new Callback() { @Override public void onCallback(Boolean result) { if (result) { @@ -277,7 +277,7 @@ public class SchedulerStateEditor extends WEditor { if (id <= 0) return; - FDialog.ask(0, null, "SchedulerStartPrompt", new Callback() { + Dialog.ask(0, "SchedulerStartPrompt", new Callback() { @Override public void onCallback(Boolean result) { if (result) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/Dialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/Dialog.java new file mode 100644 index 0000000000..9c03e508f3 --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/Dialog.java @@ -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("
"); + 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", "
"); + } + + /** + * 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)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 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)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 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 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)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 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 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 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 callback, Object ... args) { + Callback 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 getMessageCallback(final Callback callback) { + Callback msgCallback = null; + if (callback != null) { + msgCallback = new Callback() { + @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 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 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() { + @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 callback) { + askForInput(windowNo, weditor, adMessage, "", callback); + } + + public static void askForInput(int windowNo, WEditor weditor, String adMessage, String title, final Callback callback) { + Callback msgCallback = null; + if (callback != null) { + msgCallback = new Callback() { + @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 callback) { + askForInput(windowNo, adMessage, "", callback); + } + + public static void askForInput(int windowNo, String adMessage, String title, final Callback callback) { + Callback msgCallback = null; + if (callback != null) + { + msgCallback = new Callback() { + @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> callback) { + Callback> msgCallback = null; + msgCallback = new Callback>() { + @Override + public void onCallback(Map.Entry 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> callback) { + Callback> msgCallback = null; + if (callback != null) + { + msgCallback = new Callback>() { + @Override + public void onCallback(Map.Entry 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); + } + +} diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java index 185b49c159..bb4ffe0e83 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java @@ -46,12 +46,14 @@ import org.zkoss.zk.ui.event.Event; 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 Ashley G Ramdass * @date Feb 25, 2007 * @version $Revision: 0.10 $ */ - +@Deprecated(since="10", forRemoval=true) public class FDialog { /** Logger */ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index 299a581acd..c88f640565 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -2386,7 +2386,7 @@ public class FindWindow extends Window implements EventListener, ValueCha String name = selected; 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; } if (saveQuery){ @@ -2413,16 +2413,16 @@ public class FindWindow extends Window implements EventListener, ValueCha } else if (code.length() <= 0){ // Delete the query if (uq == null) { - FDialog.warn (m_targetWindowNo, this, "NeedsQuery", name); + Dialog.warn(m_targetWindowNo, "NeedsQuery", name); return; } if (uq.delete(true)) { - FDialog.info (m_targetWindowNo, this, "Deleted", name); + Dialog.info(m_targetWindowNo, "Deleted", name); refreshUserQueries(); } else - FDialog.warn (m_targetWindowNo, this, "DeleteError", name); + Dialog.warn(m_targetWindowNo, "DeleteError", name); return; } uq.setCode (code.toString()); @@ -2842,7 +2842,7 @@ public class FindWindow extends Window implements EventListener, ValueCha // Test for no records if (getNoOfRecords(m_query, true) != 0) { if (m_total == COUNTING_RECORDS_TIMED_OUT) { - FDialog.error(m_targetWindowNo, "InfoQueryTimeOutError"); + Dialog.error(m_targetWindowNo, "InfoQueryTimeOutError"); } else { if (advancedPanel != null) { advancedPanel.getItems().clear(); @@ -2924,7 +2924,7 @@ public class FindWindow extends Window implements EventListener, ValueCha if (getNoOfRecords(m_query, true) != 0) { if (m_total == COUNTING_RECORDS_TIMED_OUT) { - FDialog.error(m_targetWindowNo, "InfoQueryTimeOutError"); + Dialog.error(m_targetWindowNo, "InfoQueryTimeOutError"); } else { dispose(); } @@ -3011,11 +3011,11 @@ public class FindWindow extends Window implements EventListener, ValueCha } // No Records if (m_total == 0 && alertRecords) - FDialog.warn(m_targetWindowNo, this, "FindZeroRecords", null); + Dialog.warn(m_targetWindowNo, "FindZeroRecords", null); // More then allowed 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 = 0; // return 0 if more then allowed - teo_sarca [ 1708717 ] } @@ -3189,7 +3189,7 @@ public class FindWindow extends Window implements EventListener, ValueCha StringBuilder errMsg = new StringBuilder(); 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; } @@ -3776,7 +3776,7 @@ public class FindWindow extends Window implements EventListener, ValueCha StringBuilder errMsg = new StringBuilder(); 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; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/InfoSchedule.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/InfoSchedule.java index c846da04b0..15fa105913 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/InfoSchedule.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/InfoSchedule.java @@ -573,7 +573,7 @@ public class InfoSchedule extends Window implements EventListener } } else { 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; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java index 485909da1f..6165f0fa09 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java @@ -760,7 +760,7 @@ public final class WAccountDialog extends Window needconfirm = true; if (needconfirm) { - FDialog.ask(m_WindowNo, this, "CreateNewAccountCombination?", new Callback() { + Dialog.ask(m_WindowNo, "CreateNewAccountCombination?", new Callback() { public void onCallback(Boolean result) { if (result) { if (action_Save()) { @@ -1063,17 +1063,17 @@ public final class WAccountDialog extends Window 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; } 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; } 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; } @@ -1142,7 +1142,7 @@ public final class WAccountDialog extends Window stmt = null; } if (i == 0) - FDialog.error(m_WindowNo, this, "AccountNotUpdated"); + Dialog.error(m_WindowNo, "AccountNotUpdated"); } // load and display diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java index e1c0e775b7..1a7f81d89e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java @@ -411,7 +411,7 @@ public class WAssignmentDialog extends Window implements EventListener detach(); } else - FDialog.error(0, this, "ResourceAssignmentNotDeleted"); + Dialog.error(0, "ResourceAssignmentNotDeleted"); } // OK - Save diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WCtxHelpSuggestion.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WCtxHelpSuggestion.java index 06cc7d76ab..17585c27b7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WCtxHelpSuggestion.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WCtxHelpSuggestion.java @@ -183,9 +183,9 @@ public class WCtxHelpSuggestion extends Window implements EventListener { onSave0(trx); trx.commit(true); 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 { - 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) { trx.rollback(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java index 2ae8215e8f..e81ac15034 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java @@ -599,14 +599,14 @@ public class WEMailDialog extends Window implements EventListener, ValueC new MUserMail(Env.getCtx(), email).saveEx(); if (email.isSentOK()) { - FDialog.info(0, this, "MessageSent"); + Dialog.info(0, "MessageSent"); onClose(); } else - FDialog.error(0, this, "MessageNotSent", status); + Dialog.error(0, "MessageNotSent", status); } else - FDialog.error(0, this, "MessageNotSent", status); + Dialog.error(0, "MessageNotSent", status); } else if (event instanceof UploadEvent) { @@ -704,7 +704,7 @@ public class WEMailDialog extends Window implements EventListener, ValueC m_user = MUser.get(Env.getCtx(), AD_User_ID); if (Util.isEmpty(m_user.getEMail())) { - FDialog.error(0, Msg.getMsg(Env.getCtx(), "UserNoEmailAddress")); + Dialog.error(0, Msg.getMsg(Env.getCtx(), "UserNoEmailAddress")); } else { @@ -719,7 +719,7 @@ public class WEMailDialog extends Window implements EventListener, ValueC m_ccuser = MUser.get(Env.getCtx(), AD_User_ID); if (Util.isEmpty(m_ccuser.getEMail())) { - FDialog.error(0, Msg.getMsg(Env.getCtx(), "UserNoEmailAddress")); + Dialog.error(0, Msg.getMsg(Env.getCtx(), "UserNoEmailAddress")); } else { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldSuggestion.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldSuggestion.java index cba52ae924..5f3fb7a482 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldSuggestion.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldSuggestion.java @@ -162,7 +162,7 @@ public class WFieldSuggestion extends Window implements EventListener { }finally { 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(); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java index 21e1d7fe5b..eb4e913b6c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java @@ -727,7 +727,7 @@ public class WLocationDialog extends Window implements EventListener String msg = validate_OK(); if (msg != null) { onSaveError = true; - FDialog.error(0, this, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback() { + Dialog.error(0, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback() { @Override public void onCallback(Integer result) { Events.echoEvent("onSaveError", WLocationDialog.this, null); @@ -746,7 +746,7 @@ public class WLocationDialog extends Window implements EventListener else { onSaveError = true; - FDialog.error(0, this, "CityNotFound", (String)null, new Callback() { + Dialog.error(0, "CityNotFound", (String)null, new Callback() { @Override public void onCallback(Integer result) { Events.echoEvent("onSaveError", WLocationDialog.this, null); @@ -768,7 +768,7 @@ public class WLocationDialog extends Window implements EventListener } catch (Exception e) { message = e.getMessage(); - FDialog.warn(0, this, "URLnotValid", message); + Dialog.warn(0, "URLnotValid", message); } } else if (toRoute.equals(event.getTarget())) @@ -787,7 +787,7 @@ public class WLocationDialog extends Window implements EventListener } catch (Exception e) { 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 String msg = validate_OK(); if (msg != null) { onSaveError = true; - FDialog.error(0, this, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback() { + Dialog.error(0, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback() { @Override public void onCallback(Integer result) { Events.echoEvent("onSaveError", WLocationDialog.this, null); @@ -866,7 +866,7 @@ public class WLocationDialog extends Window implements EventListener if (!ok) { onSaveError = true; - FDialog.error(0, this, "Error", m_location.getErrorMessage(), new Callback() { + Dialog.error(0, "Error", m_location.getErrorMessage(), new Callback() { @Override public void onCallback(Integer result) { Events.echoEvent("onSaveError", WLocationDialog.this, null); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java index f79f3dab43..41b8d87c36 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java @@ -616,7 +616,7 @@ public class WLocatorDialog extends Window implements EventListener 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; } @@ -629,7 +629,7 @@ public class WLocatorDialog extends Window implements EventListener MLocator loc = MLocator.get(Env.getCtx(), m_M_Warehouse_ID, txtKey.getText(), txtAisleX.getText(), txtBinY.getText(), txtLevelZ.getText(), lt); 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; } m_M_Locator_ID = loc.getM_Locator_ID(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java index bb012a66af..8aec45d377 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java @@ -284,13 +284,13 @@ public class WPAttributeDialog extends Window implements EventListener // Product has no Attribute Set if (as == null) { - FDialog.error(m_WindowNo, this, "PAttributeNoAttributeSet"); + Dialog.error(m_WindowNo, "PAttributeNoAttributeSet"); return false; } // Product has no Instance Attributes if (!m_productWindow && !as.isInstanceAttribute()) { - FDialog.error(m_WindowNo, this, "PAttributeNoInstanceAttribute"); + Dialog.error(m_WindowNo, "PAttributeNoInstanceAttribute"); return false; } @@ -488,7 +488,7 @@ public class WPAttributeDialog extends Window implements EventListener if (m_row == 0) { - FDialog.error(m_WindowNo, this, "PAttributeNoInfo"); + Dialog.error(m_WindowNo, "PAttributeNoInfo"); return false; } @@ -1095,7 +1095,7 @@ public class WPAttributeDialog extends Window implements EventListener // if (mandatory.length() > 0) { - FDialog.error(m_WindowNo, this, "FillMandatory", mandatory); + Dialog.error(m_WindowNo, "FillMandatory", mandatory); return false; } // Save Model diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WReportExportDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WReportExportDialog.java index 8ea5716ce8..51eeeea87a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WReportExportDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WReportExportDialog.java @@ -144,7 +144,7 @@ public class WReportExportDialog extends Window implements EventListener ListItem li = cboType.getSelectedItem(); if(li == null || li.getValue() == null) { - FDialog.error(-1, this, "FileInvalidExtension"); + Dialog.error(-1, "FileInvalidExtension"); return; } @@ -187,7 +187,7 @@ public class WReportExportDialog extends Window implements EventListener } else { - FDialog.error(-1, this, "FileInvalidExtension"); + Dialog.error(-1, "FileInvalidExtension"); return; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WReportUploadDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WReportUploadDialog.java index a09c527aed..a18b26d7f4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WReportUploadDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WReportUploadDialog.java @@ -284,7 +284,7 @@ public class WReportUploadDialog extends Window implements EventListener } else { - FDialog.error(-1, this, "FileInvalidExtension", ext, this.getTitle()); + Dialog.error(-1, "FileInvalidExtension", ext, this.getTitle()); return; } @@ -303,7 +303,7 @@ public class WReportUploadDialog extends Window implements EventListener catch (Exception 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()); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java index 164aabd6a0..95ae23886a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java @@ -611,7 +611,7 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl try { attachment = getPDF(); } catch (Exception e) { - FDialog.error(m_WindowNo, this, e.getLocalizedMessage(), m_title); + Dialog.error(m_WindowNo, e.getLocalizedMessage(), m_title); return; } } @@ -860,9 +860,9 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl } if (success) - FDialog.info(m_WindowNo, this, "Archived"); + Dialog.info(m_WindowNo, "Archived"); else - FDialog.error(m_WindowNo, this, "ArchiveError"); + Dialog.error(m_WindowNo, "ArchiveError"); } catch (IOException e) { @@ -892,9 +892,9 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl attachment.addEntry(fileName, data); success = attachment.save(); if (success) - FDialog.info(m_WindowNo, this, "Attached", fileName); + Dialog.info(m_WindowNo, "Attached", fileName); else - FDialog.error(m_WindowNo, this, "AttachError"); + Dialog.error(m_WindowNo, "AttachError"); } // cmd_archive /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index ca6584d403..8124ec96c5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -257,7 +257,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab m_AD_Table_ID = re.getPrintFormat().getAD_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(); } m_isCanExport = MRole.getDefault().isCanExport(m_AD_Table_ID); @@ -414,7 +414,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab catch(Exception e) { log.log(Level.SEVERE, "", e); - FDialog.error(m_WindowNo, this, "LoadError", e.getLocalizedMessage()); + Dialog.error(m_WindowNo, "LoadError", e.getLocalizedMessage()); this.onClose(); } } @@ -1341,7 +1341,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab int AD_Table_ID = MTable.getTable_ID(query.getTableName()); if (!MRole.getDefault().isCanReport(AD_Table_ID)) { - FDialog.error(m_WindowNo, this, "AccessCannotReport", query.getTableName()); + Dialog.error(m_WindowNo, "AccessCannotReport", query.getTableName()); return; } if (AD_Table_ID != 0) @@ -1404,9 +1404,9 @@ public class ZkReportViewer extends Window implements EventListener, ITab success = archive.save(); } if (success) - FDialog.info(m_WindowNo, this, "Archived"); + Dialog.info(m_WindowNo, "Archived"); else - FDialog.error(m_WindowNo, this, "ArchiveError"); + Dialog.error(m_WindowNo, "ArchiveError"); } // cmd_archive /** @@ -1427,9 +1427,9 @@ public class ZkReportViewer extends Window implements EventListener, ITab attachment.addEntry(fileName, data); success = attachment.save(); if (success) - FDialog.info(m_WindowNo, this, "DocumentAttached", fileName); + Dialog.info(m_WindowNo, "DocumentAttached", fileName); else - FDialog.error(m_WindowNo, this, "AttachError"); + Dialog.error(m_WindowNo, "AttachError"); } // cmd_attachment /** @@ -1440,7 +1440,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab log.config(""); if (!m_isCanExport) { - FDialog.error(m_WindowNo, this, "AccessCannotExport", getTitle()); + Dialog.error(m_WindowNo, "AccessCannotExport", getTitle()); return; } @@ -1481,7 +1481,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab { WEditor editor = new WStringEditor(); ZKUpdateUtil.setWidth((HtmlBasedComponent)editor.getComponent(), "98%"); - FDialog.askForInputWithCancel(m_WindowNo, editor, "CreateNewPrintFormat", Msg.getMsg(m_ctx, "CreateNewPrintFormatTitle"), new Callback>() { + Dialog.askForInputWithCancel(m_WindowNo, editor, "CreateNewPrintFormat", Msg.getMsg(m_ctx, "CreateNewPrintFormatTitle"), new Callback>() { public void onCallback(Map.Entry result) { if((result == null) || (!(result.getValue() instanceof String)) || (!result.getKey())) { comboReport.setSelectedItem(previousSelected); @@ -1534,7 +1534,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab } else if (AD_PrintFormat_ID == -2) { WEditor editor = new WStringEditor(); ZKUpdateUtil.setWidth((HtmlBasedComponent)editor.getComponent(), "90%"); - FDialog.askForInputWithCancel(m_WindowNo, editor, "CreatePrintFormatCopy", Msg.getMsg(m_ctx, "CreatePrintFormatCopyTitle"), new Callback>() { + Dialog.askForInputWithCancel(m_WindowNo, editor, "CreatePrintFormatCopy", Msg.getMsg(m_ctx, "CreatePrintFormatCopyTitle"), new Callback>() { public void onCallback(Map.Entry result) { if((result == null) || (!(result.getValue() instanceof String)) || (!result.getKey())) { comboReport.setSelectedItem(previousSelected);