IDEMPIERE-4723 - Deprecate and replace FDialog (#1421)
* IDEMPIERE-4723 - Replace FDialog class * IDEMPIERE-4723 - Refactor Dialog code * IDEMPIERE-4723 - Deprecate FDialog * IDEMPIERE-4723 - Add deprecated message in the FDialog class. Make Dialog final and add a private constructor * IDEMPIERE-4723 - Remove unused imports
This commit is contained in:
parent
5f8e7be3c5
commit
da37cf8871
|
@ -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<Event>
|
|||
{
|
||||
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<Event>
|
|||
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<Event>
|
|||
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
|
||||
|
||||
|
|
|
@ -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<Event>
|
|||
{
|
||||
// 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<Boolean>() {
|
||||
Dialog.ask(m_data.WindowNo, "PostImmediate?", new Callback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
|
@ -1328,7 +1328,7 @@ public class WAcctViewer extends Window implements EventListener<Event>
|
|||
m_data.AD_Table_ID, m_data.Record_ID, force);
|
||||
//setCursor(Cursor.getDefaultCursor());
|
||||
if (error != null)
|
||||
FDialog.error(0, WAcctViewer.this, "PostingError-N", error);
|
||||
Dialog.error(0, "PostingError-N", error);
|
||||
|
||||
actionQuery();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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<Event>
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<Boolean>() {
|
||||
Dialog.ask(curWindowNo, "SaveChanges?", dirtyTabpanel.getGridTab().getCommitWarning(), new Callback<Boolean>() {
|
||||
|
||||
@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<Boolean>() {
|
||||
Dialog.ask(curWindowNo, "DeleteRecord?", new Callback<Boolean>() {
|
||||
@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<Map.Entry<Boolean, String>>() {
|
||||
@Override
|
||||
public void onCallback(Map.Entry<Boolean, String> result)
|
||||
|
@ -2864,7 +2859,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
sb.append(Env.getContext(ctx, curWindowNo, "_WinInfo_WindowName", false)).append(" - ")
|
||||
.append(indices.length).append(" ").append(Msg.getMsg(Env.getCtx(), "Selected"));
|
||||
if(Util.isEmpty(deleteConfirmationLogic)) {
|
||||
FDialog.ask(sb.toString(), curWindowNo, null,"DeleteSelection", new Callback<Boolean>() {
|
||||
Dialog.ask(sb.toString(), curWindowNo,"DeleteSelection", new Callback<Boolean>() {
|
||||
@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<Map.Entry<Boolean, String>>() {
|
||||
@Override
|
||||
public void onCallback(Map.Entry<Boolean, String> 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<Boolean>() {
|
||||
Dialog.ask(curWindowNo, "PostImmediate?", new Callback<Boolean>() {
|
||||
|
||||
@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;
|
||||
}
|
||||
|
|
|
@ -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<Boolean>() {
|
||||
Dialog.ask(tabPanel.getGridTab().getWindowNo(), "DeleteRecord?", new Callback<Boolean>() {
|
||||
|
||||
@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<Boolean>() {
|
||||
Dialog.ask(sb.toString(), tabPanel.getGridTab().getWindowNo(),"DeleteSelection", new Callback<Boolean>() {
|
||||
@Override
|
||||
public void onCallback(Boolean result) {
|
||||
if(result){
|
||||
|
|
|
@ -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<Event>() {
|
||||
@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<Event>() {
|
||||
@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<Object> callback) {
|
||||
FDialog.askForInput(message, lookup, editorType, callback, getDesktop(), m_WindowNo);
|
||||
Dialog.askForInput(message, lookup, editorType, callback, getDesktop(), m_WindowNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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<Object> callback) {
|
||||
FDialog.askForInput(message, lookup, editorType, callback, desktop, m_windowNo);
|
||||
Dialog.askForInput(message, lookup, editorType, callback, desktop, m_windowNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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<Event
|
|||
|
||||
if (success)
|
||||
{
|
||||
FDialog.info(0, null, Msg.getMsg(Env.getCtx(), "Saved"));
|
||||
Dialog.info(0, Msg.getMsg(Env.getCtx(), "Saved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
trx.rollback();
|
||||
FDialog.error(0, this, Msg.getMsg(Env.getCtx(), "SaveError"));
|
||||
Dialog.error(0, Msg.getMsg(Env.getCtx(), "SaveError"));
|
||||
}
|
||||
} finally {
|
||||
trx.close();
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.adempiere.webui.process.WProcessInfo;
|
|||
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.SimplePDFViewer;
|
||||
import org.compiere.model.MProcess;
|
||||
import org.compiere.model.X_AD_CtxHelp;
|
||||
|
@ -545,7 +545,7 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
|||
{
|
||||
if (m_ids == null)
|
||||
return;
|
||||
FDialog.ask(getWindowNo(), this, "PrintShipments", new Callback<Boolean>() {
|
||||
Dialog.ask(getWindowNo(), "PrintShipments", new Callback<Boolean>() {
|
||||
@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<Boolean>() {
|
||||
Dialog.ask(getWindowNo(), "PrintInvoices", new Callback<Boolean>() {
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<Event> {
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "DeleteRecord?", new Callback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
|
|
|
@ -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<Event>
|
|||
|
||||
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;
|
||||
|
|
|
@ -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<Ev
|
|||
int elementValueId = createElementValue (value, name, m_chbIsExpense.isChecked());
|
||||
if (elementValueId == 0)
|
||||
{
|
||||
FDialog.error(form.getWindowNo(), form, "ChargeNotCreated", name);
|
||||
Dialog.error(form.getWindowNo(), "ChargeNotCreated", name);
|
||||
return;
|
||||
}
|
||||
// Create Charge
|
||||
int chargeId = createCharge(name, elementValueId);
|
||||
if (chargeId == 0)
|
||||
{
|
||||
FDialog.error(form.getWindowNo(), form, "ChargeNotCreated", name);
|
||||
Dialog.error(form.getWindowNo(), "ChargeNotCreated", name);
|
||||
return;
|
||||
}
|
||||
FDialog.info(form.getWindowNo(), form, "ChargeCreated", name);
|
||||
Dialog.info(form.getWindowNo(), "ChargeCreated", name);
|
||||
} // createNew
|
||||
|
||||
/**
|
||||
|
@ -372,11 +372,11 @@ public class WCharge extends Charge implements IFormController, EventListener<Ev
|
|||
createAccount(m_tblData);
|
||||
if (listCreated.length() > 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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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<Event>, WTa
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
FDialog.error(getWindowNo(), this, "Error", ex.getLocalizedMessage());
|
||||
Dialog.error(getWindowNo(), "Error", ex.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
// Cancel
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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<Event>, W
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
FDialog.error(windowNo, this, "Error", ex.getLocalizedMessage());
|
||||
Dialog.error(windowNo, "Error", ex.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
// Cancel
|
||||
|
|
|
@ -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<Event>
|
|||
|
||||
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<Event>
|
|||
{
|
||||
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<Event>
|
|||
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
|
||||
|
|
|
@ -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<Event>, WTableMode
|
|||
public void onAfterProcess()
|
||||
{
|
||||
// OK to print
|
||||
FDialog.ask(getWindowNo(), this, genForm.getAskPrintMsg(), new Callback<Boolean>() {
|
||||
Dialog.ask(getWindowNo(), genForm.getAskPrintMsg(), new Callback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
|
|
|
@ -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<Even
|
|||
final String columnNameRef = columnName;
|
||||
final int fromIdRef = from_ID;
|
||||
final int toIdRef = to_ID;
|
||||
FDialog.ask(m_WindowNo, form, "MergeQuestion", m_msg, new Callback<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "MergeQuestion", m_msg, new Callback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
|
@ -294,12 +294,12 @@ public class WMerge extends Merge implements IFormController, EventListener<Even
|
|||
{
|
||||
if (m_success)
|
||||
{
|
||||
FDialog.info (m_WindowNo, form, "MergeSuccess",
|
||||
Dialog.info (m_WindowNo, "MergeSuccess",
|
||||
m_msg + " #" + m_totalCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
FDialog.error(m_WindowNo, form, "MergeError",
|
||||
Dialog.error(m_WindowNo, "MergeError",
|
||||
m_errorLog.toString());
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,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.adempiere.webui.window.SimplePDFViewer;
|
||||
import org.compiere.apps.form.PayPrint;
|
||||
import org.compiere.model.MLookup;
|
||||
|
@ -366,7 +366,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
|
|||
fDocumentNo.setValue(documentNo);
|
||||
|
||||
if(msg != null && msg.length() > 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<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "VPayPrintSuccess?", new Callback<Boolean>() {
|
||||
|
||||
@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<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "CreatePayments?", new Callback<Boolean>() {
|
||||
|
||||
@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<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "VPayPrintPrintRemittance", new Callback<Boolean>() {
|
||||
|
||||
@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;
|
||||
}
|
||||
|
|
|
@ -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<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "VPaySelectPrint?", new Callback<Boolean>() {
|
||||
|
||||
@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<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "VPaySelectGenerate?", new Callback<Boolean>() {
|
||||
|
||||
@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<Event>() {
|
||||
@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<Event>() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
FDialog.askForInput(m_WindowNo, null, message, callback);
|
||||
Dialog.askForInput(m_WindowNo, message, callback);
|
||||
}
|
||||
}, new Event("onAskForInput"));
|
||||
}
|
||||
|
|
|
@ -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<E
|
|||
// Check & Cash (Payment) must have a bank account
|
||||
if (C_BankAccount_ID == 0 && m_Cash_As_Payment)
|
||||
{
|
||||
FDialog.error(getWindowNo(), window, "FillMandatory", bBankAccountLabel.getValue());
|
||||
Dialog.error(getWindowNo(), "FillMandatory", bBankAccountLabel.getValue());
|
||||
dataOK = false;
|
||||
}
|
||||
}
|
||||
|
@ -230,9 +230,9 @@ public class WPaymentFormCash extends PaymentFormCash implements EventListener<E
|
|||
boolean ok = save(newC_BankAccount_ID,newC_CashBook_ID, newDateAcct, (BigDecimal) bAmountField.getValue(), trxName);
|
||||
|
||||
if (!ok)
|
||||
FDialog.error(getWindowNo(), window, "PaymentError", processMsg);
|
||||
Dialog.error(getWindowNo(), "PaymentError", processMsg);
|
||||
else if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentCreated", processMsg);
|
||||
Dialog.info(getWindowNo(), "PaymentCreated", processMsg);
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.adempiere.webui.component.Rows;
|
|||
import org.adempiere.webui.component.Textbox;
|
||||
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.PaymentFormCheck;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
|
@ -255,26 +255,26 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
String error = MPaymentValidate.validateRoutingNo(sRoutingField.getText());
|
||||
if (error.length() != 0)
|
||||
{
|
||||
FDialog.error(getWindowNo(), window, error);
|
||||
Dialog.error(getWindowNo(), error);
|
||||
dataOK = false;
|
||||
}
|
||||
error = MPaymentValidate.validateAccountNo(sNumberField.getText());
|
||||
if (error.length() != 0)
|
||||
{
|
||||
FDialog.error(getWindowNo(), window, error);
|
||||
Dialog.error(getWindowNo(), error);
|
||||
dataOK = false;
|
||||
}
|
||||
error = MPaymentValidate.validateCheckNo(sCheckField.getText());
|
||||
if (error.length() != 0)
|
||||
{
|
||||
FDialog.error(getWindowNo(), window, error);
|
||||
Dialog.error(getWindowNo(), error);
|
||||
dataOK = false;
|
||||
}
|
||||
|
||||
// Check & Cash (Payment) must have a bank account
|
||||
if (C_BankAccount_ID == 0)
|
||||
{
|
||||
FDialog.error(getWindowNo(), window, "FillMandatory", sBankAccountLabel.getValue());
|
||||
Dialog.error(getWindowNo(), "FillMandatory", sBankAccountLabel.getValue());
|
||||
dataOK = false;
|
||||
}
|
||||
//
|
||||
|
@ -293,9 +293,9 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener
|
|||
boolean ok = save(newC_BankAccount_ID, sRoutingField.getText(), sNumberField.getText(),
|
||||
sCheckField.getText(), (BigDecimal) sAmountField.getValue(), trxName);
|
||||
if (!ok)
|
||||
FDialog.error(getWindowNo(), window, "PaymentError", processMsg);
|
||||
Dialog.error(getWindowNo(), "PaymentError", processMsg);
|
||||
else if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo());
|
||||
Dialog.info(getWindowNo(), "PaymentCreated", m_mPayment.getDocumentNo());
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.adempiere.webui.component.Textbox;
|
|||
import org.adempiere.webui.editor.WNumberEditor;
|
||||
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.grid.PaymentFormCreditCard;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
|
@ -279,9 +279,9 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
|
|||
|
||||
boolean ok = save(newCCType, kNumberField.getText(), kExpField.getText(), (BigDecimal) kAmountField.getValue(), trxName);
|
||||
if(!ok)
|
||||
FDialog.error(getWindowNo(), window, "PaymentError", processMsg);
|
||||
Dialog.error(getWindowNo(), "PaymentError", processMsg);
|
||||
else if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentCreated", processMsg);
|
||||
Dialog.info(getWindowNo(), "PaymentCreated", processMsg);
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
@ -298,12 +298,12 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
|
|||
|
||||
boolean ok = processOnline(CCType, kNumberField.getText(), kApprovalField.getText(), kExpField.getText());
|
||||
if (!ok)
|
||||
FDialog.error(getWindowNo(), window, "PaymentNotProcessed", processMsg);
|
||||
Dialog.error(getWindowNo(), "PaymentNotProcessed", processMsg);
|
||||
else
|
||||
{
|
||||
loadData();
|
||||
if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentProcessed", processMsg);
|
||||
Dialog.info(getWindowNo(), "PaymentProcessed", processMsg);
|
||||
}
|
||||
} // online
|
||||
|
||||
|
|
|
@ -30,7 +30,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.grid.PaymentFormDirect;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBankAccountProcessor;
|
||||
|
@ -151,7 +151,7 @@ public abstract class WPaymentFormDirect extends PaymentFormDirect implements Ev
|
|||
KeyNamePair bpba = selected != null ? selected.toKeyNamePair() : null;
|
||||
if (bpba == null)
|
||||
{
|
||||
FDialog.error(getWindowNo(), window, "PaymentBPBankNotFound");
|
||||
Dialog.error(getWindowNo(), "PaymentBPBankNotFound");
|
||||
dataOK = false;
|
||||
}
|
||||
//
|
||||
|
@ -163,9 +163,9 @@ public abstract class WPaymentFormDirect extends PaymentFormDirect implements Ev
|
|||
public boolean saveChangesInTrx(final String trxName) {
|
||||
boolean ok = save(0, tRoutingField.getText(), tNumberField.getText(), trxName);
|
||||
if (!ok)
|
||||
FDialog.error(getWindowNo(), window, "PaymentError", processMsg);
|
||||
Dialog.error(getWindowNo(), "PaymentError", processMsg);
|
||||
else if (processMsg != null)
|
||||
FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo());
|
||||
Dialog.info(getWindowNo(), "PaymentCreated", m_mPayment.getDocumentNo());
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,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.grid.PaymentForm;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
|
@ -66,7 +66,7 @@ public class WPaymentFormWindow extends Window implements EventListener<Event>,
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <Boolean>() {
|
||||
Dialog.ask(windowNo, "SaveChanges?", new Callback <Boolean>() {
|
||||
|
||||
@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 <Boolean>() {
|
||||
Dialog.ask(windowNo, "DeleteRecord?", new Callback <Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
|
|
|
@ -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<Even
|
|||
catch(Exception e)
|
||||
{
|
||||
log.log(Level.SEVERE, "", e);
|
||||
FDialog.error(m_WindowNo, "LoadError", e.getLocalizedMessage());
|
||||
Dialog.error(m_WindowNo, "LoadError", e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -453,7 +453,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
|
|||
log.config("");
|
||||
if (!m_isCanExport)
|
||||
{
|
||||
FDialog.error(m_WindowNo, "AccessCannotExport","Export");
|
||||
Dialog.error(m_WindowNo, "AccessCannotExport","Export");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -520,7 +520,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
|
|||
ListItem li = cboType.getSelectedItem();
|
||||
if(li == null || li.getValue() == null)
|
||||
{
|
||||
FDialog.error(m_WindowNo, winExportFile, "FileInvalidExtension");
|
||||
Dialog.error(m_WindowNo, "FileInvalidExtension");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -581,7 +581,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
|
|||
}
|
||||
else
|
||||
{
|
||||
FDialog.error(m_WindowNo, winExportFile, "FileInvalidExtension");
|
||||
Dialog.error(m_WindowNo, "FileInvalidExtension");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,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.model.MLookup;
|
||||
import org.compiere.model.MLookupFactory;
|
||||
import org.compiere.model.MPasswordHistory;
|
||||
|
@ -382,7 +382,7 @@ public class WResetPassword implements IFormController, EventListener<Event>, Va
|
|||
throw e;
|
||||
}
|
||||
clearForm();
|
||||
FDialog.info(form.getWindowNo(), form, "RecordSaved");
|
||||
Dialog.info(form.getWindowNo(), "RecordSaved");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "TreeAddAllItems", new Callback<Boolean>() {
|
||||
|
||||
@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<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "TreeRemoveAllItems", new Callback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
|
|
|
@ -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<Event>
|
|||
}
|
||||
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<Event>
|
|||
}
|
||||
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<Event>
|
|||
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<Event>
|
|||
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;
|
||||
|
|
|
@ -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<Event>
|
|||
}
|
||||
else
|
||||
{
|
||||
FDialog.error(0, "DragItemMenu");
|
||||
Dialog.error(0, "DragItemMenu");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,7 @@ public class ADTreeFavoriteOnDropListener implements EventListener<Event>
|
|||
*/
|
||||
private void showWarningDialog()
|
||||
{
|
||||
FDialog.warn(0, Msg.getMsg(Env.getCtx(), "AlreadyExists"));
|
||||
Dialog.warn(0, Msg.getMsg(Env.getCtx(), "AlreadyExists"));
|
||||
} // showWarningDialog
|
||||
|
||||
/**
|
||||
|
|
|
@ -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<Event> {
|
|||
catch (Exception e)
|
||||
{
|
||||
trx.rollback();
|
||||
FDialog.error(windowNo, tree, "TreeUpdateError", e.getLocalizedMessage());
|
||||
Dialog.error(windowNo, "TreeUpdateError", e.getLocalizedMessage());
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -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<Event>
|
|||
{
|
||||
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<Event>
|
|||
{
|
||||
if(!file.isFile() || !file.exists())
|
||||
{
|
||||
FDialog.error(0, "Invalid file");
|
||||
Dialog.error(0, "Invalid file");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<Event> {
|
|||
}
|
||||
else
|
||||
{
|
||||
FDialog.error(0, this, "Request record not saved");
|
||||
Dialog.error(0, "Request record not saved");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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<Event>, 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<Event>, 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<Event>, 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<Event>, 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;
|
||||
|
|
|
@ -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 EventListener<Ev
|
|||
|
||||
if (quickPOs.get(0).get_ID() == 0)
|
||||
{
|
||||
FDialog.error(m_WindowNo, this, "RecordNotFound");
|
||||
Dialog.error(m_WindowNo, "RecordNotFound");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -416,7 +416,7 @@ public class WQuickEntry extends AbstractWQuickEntry implements EventListener<Ev
|
|||
for (GridField field : quickFields) {
|
||||
String msg = field.getGridTab().processCallout(field);
|
||||
if (! Util.isEmpty(msg)) {
|
||||
FDialog.error(m_WindowNo, this, "", msg);
|
||||
Dialog.error(m_WindowNo, "", msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -466,7 +466,7 @@ public class WQuickEntry extends AbstractWQuickEntry implements EventListener<Ev
|
|||
}
|
||||
}
|
||||
if (savePO && fillMandatoryError) {
|
||||
FDialog.error(m_WindowNo, this, "FillMandatory", mandatoryFields.toString());
|
||||
Dialog.error(m_WindowNo, "FillMandatory", mandatoryFields.toString());
|
||||
return false;
|
||||
}
|
||||
if (savePO) {
|
||||
|
@ -477,7 +477,7 @@ public class WQuickEntry extends AbstractWQuickEntry implements EventListener<Ev
|
|||
}
|
||||
}
|
||||
if(gridtab.getTabLevel()>0 && !isParentSave){
|
||||
FDialog.error(m_WindowNo, this, "FillMinimumInfo",tabZeroName);
|
||||
Dialog.error(m_WindowNo, "FillMinimumInfo",tabZeroName);
|
||||
return false;
|
||||
}
|
||||
po.saveEx();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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<Event>
|
|||
// 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<Event>
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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<Event>,
|
|||
{
|
||||
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<Event>,
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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<Event>
|
|||
}
|
||||
catch (Exception e) {
|
||||
String message = e.getMessage();
|
||||
FDialog.warn(0, this, "URLnotValid", message);
|
||||
Dialog.warn(0, "URLnotValid", message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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<Event>, Deferrabl
|
|||
if (! Util.isEmpty(msg))
|
||||
{
|
||||
Env.getCtx().clear();
|
||||
FDialog.error(0, this, "Error", msg, new Callback<Integer>() {
|
||||
Dialog.error(0, "Error", msg, new Callback<Integer>() {
|
||||
@Override
|
||||
public void onCallback(Integer result) {
|
||||
Events.echoEvent(new Event(ON_DEFER_LOGOUT, component));
|
||||
|
|
|
@ -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<Event>, Composer<Component>
|
|||
if (logout == event.getTarget())
|
||||
{
|
||||
if (SessionManager.getAppDesktop().isPendingWindow()) {
|
||||
FDialog.ask(0, component, "ProceedWithTask?", new Callback<Boolean>() {
|
||||
Dialog.ask(0, "ProceedWithTask?", new Callback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
|
@ -217,7 +217,7 @@ public class UserPanel implements EventListener<Event>, Composer<Component>
|
|||
else if (changeRole == event.getTarget())
|
||||
{
|
||||
if (SessionManager.getAppDesktop().isPendingWindow()) {
|
||||
FDialog.ask(0, component, "ProceedWithTask?", new Callback<Boolean>() {
|
||||
Dialog.ask(0, "ProceedWithTask?", new Callback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
|
|
|
@ -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<Event> {
|
|||
String msg = login.validateLogin(m_orgKNPair);
|
||||
if (!Util.isEmpty(msg)) {
|
||||
Env.getCtx().clear();
|
||||
FDialog.error(0, this, "Error", msg, new Callback<Integer>() {
|
||||
Dialog.error(0, "Error", msg, new Callback<Integer>() {
|
||||
@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<Event> {
|
|||
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) }));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<Event>
|
|||
{
|
||||
log.info("");
|
||||
|
||||
FDialog.ask(m_WindowNo, this, "AttachmentDelete?", new Callback<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "AttachmentDelete?", new Callback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
|
@ -786,7 +786,7 @@ public class WAttachment extends Window implements EventListener<Event>
|
|||
if (fileName == null)
|
||||
return;
|
||||
|
||||
FDialog.ask(m_WindowNo, this, "AttachmentDeleteEntry?", new Callback<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "AttachmentDeleteEntry?", new Callback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onCallback(Boolean result)
|
||||
|
|
|
@ -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<Event>, 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<Event>, Dia
|
|||
String docAction = lstDocAction.getSelectedItem().getLabel();
|
||||
MessageFormat mf = new MessageFormat(Msg.getMsg(Env.getAD_Language(Env.getCtx()), "ConfirmOnDocAction"));
|
||||
Object[] arguments = new Object[]{docAction};
|
||||
FDialog.ask(gridTab.getWindowNo(), this, "", mf.format(arguments), new Callback<Boolean>() {
|
||||
Dialog.ask(gridTab.getWindowNo(), "", mf.format(arguments), new Callback<Boolean>() {
|
||||
@Override
|
||||
public void onCallback(Boolean result) {
|
||||
if(result)
|
||||
|
|
|
@ -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<Event>
|
|||
}
|
||||
}
|
||||
}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<Event>
|
|||
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();
|
||||
|
|
|
@ -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<Event>
|
|||
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<Event>
|
|||
IGridTabImporter importer = importerMap.get(ext);
|
||||
if (importer == null)
|
||||
{
|
||||
FDialog.error(0, winImportFile, "FileInvalidExtension");
|
||||
Dialog.error(0, "FileInvalidExtension");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -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<Event>
|
|||
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<Event>
|
|||
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<Event>
|
|||
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<Event>
|
|||
}
|
||||
else
|
||||
{
|
||||
FDialog.error(0, winReport, "FileInvalidExtension");
|
||||
Dialog.error(0, "FileInvalidExtension");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -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<Event> {
|
|||
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<Event> {
|
|||
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<Event> {
|
|||
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<Event> {
|
|||
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<Event> {
|
|||
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<Boolean>() {
|
||||
Dialog.ask(0, "SchedulerAddAndStartPrompt", new Callback<Boolean>() {
|
||||
@Override
|
||||
public void onCallback(Boolean result) {
|
||||
if (result) {
|
||||
|
@ -190,7 +190,7 @@ public class ChangeStateAction implements IAction, EventListener<Event> {
|
|||
}
|
||||
});
|
||||
} else if (state == IServerManager.SERVER_STATE_STARTED) {
|
||||
FDialog.ask(0, null, "SchedulerStopPrompt", new Callback<Boolean>() {
|
||||
Dialog.ask(0, "SchedulerStopPrompt", new Callback<Boolean>() {
|
||||
@Override
|
||||
public void onCallback(Boolean result) {
|
||||
if (result) {
|
||||
|
@ -202,7 +202,7 @@ public class ChangeStateAction implements IAction, EventListener<Event> {
|
|||
});
|
||||
}
|
||||
else if (state == IServerManager.SERVER_STATE_STOPPED) {
|
||||
FDialog.ask(0, null, "SchedulerStartPrompt", new Callback<Boolean>() {
|
||||
Dialog.ask(0, "SchedulerStartPrompt", new Callback<Boolean>() {
|
||||
@Override
|
||||
public void onCallback(Boolean result) {
|
||||
if (result) {
|
||||
|
|
|
@ -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<Boolean>() {
|
||||
Dialog.ask(0, "SchedulerAddAndStartPrompt", new Callback<Boolean>() {
|
||||
@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<Boolean>() {
|
||||
Dialog.ask(0, "SchedulerStopPrompt", new Callback<Boolean>() {
|
||||
@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<Boolean>() {
|
||||
Dialog.ask(0, "SchedulerStartPrompt", new Callback<Boolean>() {
|
||||
@Override
|
||||
public void onCallback(Boolean result) {
|
||||
if (result) {
|
||||
|
|
|
@ -0,0 +1,499 @@
|
|||
/***********************************************************************
|
||||
* This file is part of iDempiere ERP Open Source *
|
||||
* http://www.idempiere.org *
|
||||
* *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation; either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Diego Ruiz *
|
||||
**********************************************************************/
|
||||
package org.adempiere.webui.window;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.util.Callback;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.Messagebox;
|
||||
import org.adempiere.webui.editor.WChosenboxListEditor;
|
||||
import org.adempiere.webui.editor.WChosenboxSearchEditor;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.adempiere.webui.editor.WNumberEditor;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
import org.adempiere.webui.editor.WStringEditor;
|
||||
import org.adempiere.webui.editor.WTableDirEditor;
|
||||
import org.compiere.model.MLookup;
|
||||
import org.compiere.util.CLogMgt;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DisplayType;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Trace;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.zk.ui.Desktop;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
|
||||
public final class Dialog {
|
||||
|
||||
private static final CLogger logger = CLogger.getCLogger(Dialog.class);
|
||||
|
||||
private Dialog() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a message from the AD_Message and the additional message
|
||||
*
|
||||
* @param adMessage AD_Message string
|
||||
* @param message additional message
|
||||
* @return The translated AD_Message appended with the additional message
|
||||
*/
|
||||
private static String constructMessage(String adMessage, String message, Object ... args) {
|
||||
StringBuffer out = new StringBuffer();
|
||||
|
||||
if (!Util.isEmpty(adMessage)) {
|
||||
out.append(getADMessage(adMessage, args));
|
||||
}
|
||||
|
||||
if (!Util.isEmpty(message)) {
|
||||
if (out.length() > 0)
|
||||
out.append("<br>");
|
||||
out.append(message);
|
||||
}
|
||||
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
private static String getADMessage(String adMessage, Object ... args) {
|
||||
String message;
|
||||
|
||||
if (args != null && args.length > 0)
|
||||
message = Msg.getMsg(Env.getCtx(), adMessage, args);
|
||||
else
|
||||
message = Msg.getMsg(Env.getCtx(), adMessage);
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display dialog with a warning icon
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
*/
|
||||
|
||||
public static void warn(int windowNo, String adMessage) {
|
||||
warn(windowNo, adMessage, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a dialog with a warning icon
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param title Message box title
|
||||
*/
|
||||
|
||||
public static void warn(int windowNo, String adMessage, String title) {
|
||||
warn(windowNo, adMessage, null, title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a dialog with a warning icon
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional message
|
||||
* @param title If none then one will be generated
|
||||
*/
|
||||
public static void warn(int windowNo, String adMessage, String additionalMessage, String title) {
|
||||
if (logger.isLoggable(Level.INFO))
|
||||
logger.info(adMessage + " - " + additionalMessage);
|
||||
|
||||
String dialogTitle = getDialogTitle(title, windowNo);
|
||||
String out = constructMessage(adMessage, additionalMessage);
|
||||
String message = formatDialogMessage(out);
|
||||
|
||||
Messagebox.showDialog(message, dialogTitle, Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
|
||||
private static String getDialogTitle(String title, int windowNo) {
|
||||
return title == null ? AEnv.getDialogHeader(Env.getCtx(), windowNo) : title;
|
||||
}
|
||||
|
||||
private static String formatDialogMessage(String originalMessage) {
|
||||
return originalMessage.replace("\n", "<br>");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display dialog with an error icon
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
*/
|
||||
|
||||
public static void error(int windowNo, String adMessage) {
|
||||
error(windowNo, adMessage, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display dialog with an error icon
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional message
|
||||
*/
|
||||
public static void error(int windowNo, String adMessage, String additionalMessage) {
|
||||
error(windowNo, adMessage, additionalMessage, (Callback<Integer>)null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display dialog with an error icon
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional message
|
||||
* @param callback
|
||||
*/
|
||||
public static void error(int windowNo, String adMessage, String additionalMessage, Callback<Integer> callback) {
|
||||
error(windowNo, adMessage, additionalMessage, callback, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display dialog with an error icon
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional message
|
||||
* @param title If none then one will be generated
|
||||
*/
|
||||
public static void error(int windowNo, String adMessage, String additionalMessage, String title) {
|
||||
error(windowNo, adMessage, additionalMessage, (Callback<Integer>)null, title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display dialog with an error icon
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional message
|
||||
* @param callback
|
||||
* @param title If none then one will be generated
|
||||
*/
|
||||
public static void error(int windowNo, String adMessage, String additionalMessage, Callback<Integer> callback, String title) {
|
||||
if (logger.isLoggable(Level.INFO))
|
||||
logger.info(adMessage + " - " + additionalMessage);
|
||||
|
||||
if (CLogMgt.isLevelFinest()) {
|
||||
Trace.printStack();
|
||||
}
|
||||
|
||||
String dialogTitle = getDialogTitle(title, windowNo);
|
||||
String out = constructMessage(adMessage, additionalMessage);
|
||||
String message = formatDialogMessage(out);
|
||||
|
||||
Messagebox.showDialog(message, dialogTitle, Messagebox.OK, Messagebox.ERROR, callback);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Ask Question with question icon and (OK) (Cancel) buttons
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @return true, if OK
|
||||
*/
|
||||
public static boolean ask(int windowNo, String adMessage) {
|
||||
return ask(windowNo, adMessage, "");
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Ask Question with question icon and (OK) (Cancel) buttons
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param callback
|
||||
* @return true, if OK
|
||||
*/
|
||||
public static boolean ask(int windowNo, String adMessage, final Callback<Boolean> callback) {
|
||||
return ask(null, windowNo, adMessage, callback);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Ask Question with question icon and (OK) (Cancel) buttons
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional clear text message
|
||||
* @return true, if OK
|
||||
*/
|
||||
public static boolean ask(int windowNo, String adMessage, String additionalMessage) {
|
||||
return ask(windowNo, adMessage, additionalMessage, (Callback<Boolean>)null);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Ask Question with question icon and (OK) (Cancel) buttons
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional clear text message
|
||||
* @param callback
|
||||
* @return true, if OK
|
||||
*/
|
||||
public static boolean ask(int windowNo, String adMessage, String additionalMessage, final Callback<Boolean> callback) {
|
||||
return ask(null, windowNo, adMessage, additionalMessage, callback);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Ask Question with question icon and (OK) (Cancel) buttons
|
||||
*
|
||||
* @param title
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param callback
|
||||
* @param args
|
||||
* @return true, if OK
|
||||
*/
|
||||
public static boolean ask(String title, int windowNo, String adMessage, final Callback<Boolean> callback, Object ... args) {
|
||||
return ask(title, windowNo, adMessage, null, callback, args);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Ask Question with question icon and (OK) (Cancel) buttons
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param title Title of the dialog panel
|
||||
* @param adMessage Message to be translated
|
||||
* @param msg Additional clear text message
|
||||
* @param callback
|
||||
* @return true, if OK
|
||||
*/
|
||||
public static boolean ask(int windowNo, String title, String adMessage, String msg, final Callback<Boolean> callback) {
|
||||
return ask(title, windowNo, adMessage, msg, callback);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Ask Question with question icon and (OK) (Cancel) buttons
|
||||
*
|
||||
* @param title
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional clear text message
|
||||
* @param callback
|
||||
* @param args
|
||||
* @return true, if OK
|
||||
*/
|
||||
public static boolean ask(String title, int windowNo, String adMessage, String additionalMessage, final Callback<Boolean> callback, Object ... args) {
|
||||
Callback<Integer> msgCallback = getMessageCallback(callback);
|
||||
|
||||
String message = constructMessage(adMessage, additionalMessage, args);
|
||||
String dialogTitle = getDialogTitle(title, windowNo);
|
||||
message = formatDialogMessage(message);
|
||||
|
||||
int response = Messagebox.showDialog(message, dialogTitle,
|
||||
Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION, msgCallback, (msgCallback == null));
|
||||
|
||||
return (response == Messagebox.OK);
|
||||
}
|
||||
|
||||
private static Callback<Integer> getMessageCallback(final Callback<Boolean> callback) {
|
||||
Callback<Integer> msgCallback = null;
|
||||
if (callback != null) {
|
||||
msgCallback = new Callback<Integer>() {
|
||||
@Override
|
||||
public void onCallback(Integer result) {
|
||||
boolean b = result != null && result.intValue() == Messagebox.OK;
|
||||
callback.onCallback(b);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return msgCallback;
|
||||
}
|
||||
|
||||
public static void askForInput(final String message, MLookup lookup, int editorType, final Callback<Object> callback, Desktop desktop, int windowNo) {
|
||||
askForInput(message, lookup, editorType, callback, desktop, windowNo, "", null);
|
||||
}
|
||||
|
||||
public static void askForInput(final String message, MLookup lookup, int editorType, final Callback<Object> callback, Desktop desktop, int windowNo, String title, Object defaultValue) {
|
||||
|
||||
final WEditor weditor = getEditor(lookup, editorType);
|
||||
if (weditor != null && defaultValue != null)
|
||||
weditor.setValue(defaultValue);
|
||||
|
||||
Executions.schedule(desktop, new EventListener<Event>() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
Dialog.askForInput(windowNo, weditor, message, title, callback);
|
||||
}
|
||||
}, new Event("onAskForInput"));
|
||||
}
|
||||
|
||||
private static WEditor getEditor(MLookup lookup, int editorType) {
|
||||
switch (editorType) {
|
||||
case DisplayType.String:
|
||||
return new WStringEditor();
|
||||
case DisplayType.Number:
|
||||
return new WNumberEditor();
|
||||
case DisplayType.TableDir:
|
||||
return new WTableDirEditor(lookup, "", "", true, false, true);
|
||||
case DisplayType.Search:
|
||||
return new WSearchEditor(lookup, "", "", true, false, true);
|
||||
case DisplayType.ChosenMultipleSelectionSearch:
|
||||
return new WChosenboxSearchEditor(lookup, "", "", true, false, true);
|
||||
case DisplayType.ChosenMultipleSelectionList:
|
||||
case DisplayType.ChosenMultipleSelectionTable:
|
||||
return new WChosenboxListEditor(lookup, "", "", true, false, true);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void askForInput(int windowNo, WEditor weditor, String adMessage, final Callback<Object> callback) {
|
||||
askForInput(windowNo, weditor, adMessage, "", callback);
|
||||
}
|
||||
|
||||
public static void askForInput(int windowNo, WEditor weditor, String adMessage, String title, final Callback<Object> callback) {
|
||||
Callback<Object> msgCallback = null;
|
||||
if (callback != null) {
|
||||
msgCallback = new Callback<Object>() {
|
||||
@Override
|
||||
public void onCallback(Object result) {
|
||||
callback.onCallback(result);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
String dialogTitle = getDialogTitle(title, windowNo);
|
||||
String message = constructMessage(adMessage, null);
|
||||
message = formatDialogMessage(message);
|
||||
|
||||
Messagebox.showDialog(message, dialogTitle,
|
||||
Messagebox.OK | Messagebox.INPUT, Messagebox.QUESTION, weditor, msgCallback, (msgCallback == null));
|
||||
}
|
||||
|
||||
public static void askForInput(int windowNo, String adMessage, final Callback<String> callback) {
|
||||
askForInput(windowNo, adMessage, "", callback);
|
||||
}
|
||||
|
||||
public static void askForInput(int windowNo, String adMessage, String title, final Callback<String> callback) {
|
||||
Callback<String> msgCallback = null;
|
||||
if (callback != null)
|
||||
{
|
||||
msgCallback = new Callback<String>() {
|
||||
@Override
|
||||
public void onCallback(String result) {
|
||||
callback.onCallback(result);
|
||||
}
|
||||
};
|
||||
}
|
||||
String dialogTitle = getDialogTitle(title, windowNo);
|
||||
String message = constructMessage(adMessage, null);
|
||||
message = formatDialogMessage(message);
|
||||
|
||||
Messagebox.showDialog(message, dialogTitle,
|
||||
Messagebox.OK | Messagebox.INPUT, Messagebox.QUESTION, msgCallback, (msgCallback == null));
|
||||
}
|
||||
|
||||
/**
|
||||
* Confirmation dialog before deleting the records.
|
||||
* @param windowNo
|
||||
* @param weditor
|
||||
* @param adMessage
|
||||
* @param adMessageArgs
|
||||
* @param title
|
||||
* @param correctInput
|
||||
* @param callback
|
||||
*/
|
||||
public static void askForInputTextConfirmation(int windowNo, WEditor weditor, String adMessage, Object[] adMessageArgs, String title, final Callback<Map.Entry<Boolean, String>> callback) {
|
||||
Callback<Map.Entry<Boolean, String>> msgCallback = null;
|
||||
msgCallback = new Callback<Map.Entry<Boolean, String>>() {
|
||||
@Override
|
||||
public void onCallback(Map.Entry<Boolean, String> result) {
|
||||
callback.onCallback(result);
|
||||
}
|
||||
};
|
||||
String dialogTitle = getDialogTitle(title, windowNo);
|
||||
String message = constructMessage(adMessage, null, adMessageArgs);
|
||||
message = formatDialogMessage(message);
|
||||
|
||||
Messagebox.showDialog(message, dialogTitle,
|
||||
Messagebox.OK | Messagebox.CANCEL | Messagebox.INPUT, Messagebox.QUESTION, weditor, msgCallback, (msgCallback == null));
|
||||
}
|
||||
|
||||
public static void askForInputWithCancel(int windowNo, WEditor weditor, String adMessage, String title, final Callback<Map.Entry<Boolean, Object>> callback) {
|
||||
Callback<Map.Entry<Boolean, Object>> msgCallback = null;
|
||||
if (callback != null)
|
||||
{
|
||||
msgCallback = new Callback<Map.Entry<Boolean, Object>>() {
|
||||
@Override
|
||||
public void onCallback(Map.Entry<Boolean, Object> result) {
|
||||
callback.onCallback(result);
|
||||
}
|
||||
};
|
||||
}
|
||||
String dialogTitle = getDialogTitle(title, windowNo);
|
||||
String message = constructMessage(adMessage, null);
|
||||
message = formatDialogMessage(message);
|
||||
|
||||
Messagebox.showDialog(message, dialogTitle,
|
||||
Messagebox.OK | Messagebox.CANCEL | Messagebox.INPUT, Messagebox.QUESTION, weditor, true, msgCallback, (msgCallback == null));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display dialog with information icon.
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
*/
|
||||
public static void info(int windowNo, String adMessage) {
|
||||
info(windowNo, adMessage, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display dialog with information icon.
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional message
|
||||
*/
|
||||
public static void info(int windowNo, String adMessage, String additionalMessage) {
|
||||
info(windowNo, adMessage, additionalMessage, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display dialog with information icon.
|
||||
*
|
||||
* @param windowNo Number of Window
|
||||
* @param adMessage Message to be translated
|
||||
* @param additionalMessage Additional message
|
||||
* @param title If none then one will be generated
|
||||
*/
|
||||
|
||||
public static void info(int windowNo, String adMessage, String additionalMessage, String title) {
|
||||
if (logger.isLoggable(Level.INFO)) logger.info(adMessage + " - " + additionalMessage);
|
||||
|
||||
if (CLogMgt.isLevelFinest()) {
|
||||
Trace.printStack();
|
||||
}
|
||||
|
||||
String dialogTitle = getDialogTitle(title, windowNo);
|
||||
String message = constructMessage(adMessage, null);
|
||||
message = formatDialogMessage(message);
|
||||
|
||||
Messagebox.showDialog(message, dialogTitle, Messagebox.OK, Messagebox.INFORMATION);
|
||||
}
|
||||
|
||||
}
|
|
@ -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 <a href="mailto:agramdass@gmail.com">Ashley G Ramdass</a>
|
||||
* @date Feb 25, 2007
|
||||
* @version $Revision: 0.10 $
|
||||
*/
|
||||
|
||||
@Deprecated(since="10", forRemoval=true)
|
||||
public class FDialog
|
||||
{
|
||||
/** Logger */
|
||||
|
|
|
@ -2386,7 +2386,7 @@ public class FindWindow extends Window implements EventListener<Event>, 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<Event>, 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<Event>, 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<Event>, 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<Event>, 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<Event>, 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<Event>, 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -573,7 +573,7 @@ public class InfoSchedule extends Window implements EventListener<Event>
|
|||
}
|
||||
} 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -760,7 +760,7 @@ public final class WAccountDialog extends Window
|
|||
needconfirm = true;
|
||||
|
||||
if (needconfirm) {
|
||||
FDialog.ask(m_WindowNo, this, "CreateNewAccountCombination?", new Callback<Boolean>() {
|
||||
Dialog.ask(m_WindowNo, "CreateNewAccountCombination?", new Callback<Boolean>() {
|
||||
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
|
||||
|
|
|
@ -411,7 +411,7 @@ public class WAssignmentDialog extends Window implements EventListener<Event>
|
|||
detach();
|
||||
}
|
||||
else
|
||||
FDialog.error(0, this, "ResourceAssignmentNotDeleted");
|
||||
Dialog.error(0, "ResourceAssignmentNotDeleted");
|
||||
}
|
||||
|
||||
// OK - Save
|
||||
|
|
|
@ -183,9 +183,9 @@ public class WCtxHelpSuggestion extends Window implements EventListener<Event> {
|
|||
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();
|
||||
|
|
|
@ -599,14 +599,14 @@ public class WEMailDialog extends Window implements EventListener<Event>, 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<Event>, 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<Event>, 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
|
||||
{
|
||||
|
|
|
@ -162,7 +162,7 @@ public class WFieldSuggestion extends Window implements EventListener<Event> {
|
|||
}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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -727,7 +727,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
|
|||
String msg = validate_OK();
|
||||
if (msg != null) {
|
||||
onSaveError = true;
|
||||
FDialog.error(0, this, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback<Integer>() {
|
||||
Dialog.error(0, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback<Integer>() {
|
||||
@Override
|
||||
public void onCallback(Integer result) {
|
||||
Events.echoEvent("onSaveError", WLocationDialog.this, null);
|
||||
|
@ -746,7 +746,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
|
|||
else
|
||||
{
|
||||
onSaveError = true;
|
||||
FDialog.error(0, this, "CityNotFound", (String)null, new Callback<Integer>() {
|
||||
Dialog.error(0, "CityNotFound", (String)null, new Callback<Integer>() {
|
||||
@Override
|
||||
public void onCallback(Integer result) {
|
||||
Events.echoEvent("onSaveError", WLocationDialog.this, null);
|
||||
|
@ -768,7 +768,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
|
|||
}
|
||||
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<Event>
|
|||
}
|
||||
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<Event>
|
|||
String msg = validate_OK();
|
||||
if (msg != null) {
|
||||
onSaveError = true;
|
||||
FDialog.error(0, this, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback<Integer>() {
|
||||
Dialog.error(0, "FillMandatory", Msg.parseTranslation(Env.getCtx(), msg), new Callback<Integer>() {
|
||||
@Override
|
||||
public void onCallback(Integer result) {
|
||||
Events.echoEvent("onSaveError", WLocationDialog.this, null);
|
||||
|
@ -866,7 +866,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
|
|||
if (!ok)
|
||||
{
|
||||
onSaveError = true;
|
||||
FDialog.error(0, this, "Error", m_location.getErrorMessage(), new Callback<Integer>() {
|
||||
Dialog.error(0, "Error", m_location.getErrorMessage(), new Callback<Integer>() {
|
||||
@Override
|
||||
public void onCallback(Integer result) {
|
||||
Events.echoEvent("onSaveError", WLocationDialog.this, null);
|
||||
|
|
|
@ -616,7 +616,7 @@ public class WLocatorDialog extends Window implements EventListener<Event>
|
|||
|
||||
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<Event>
|
|||
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();
|
||||
|
|
|
@ -284,13 +284,13 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
|
|||
// 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<Event>
|
|||
|
||||
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<Event>
|
|||
//
|
||||
if (mandatory.length() > 0)
|
||||
{
|
||||
FDialog.error(m_WindowNo, this, "FillMandatory", mandatory);
|
||||
Dialog.error(m_WindowNo, "FillMandatory", mandatory);
|
||||
return false;
|
||||
}
|
||||
// Save Model
|
||||
|
|
|
@ -144,7 +144,7 @@ public class WReportExportDialog extends Window implements EventListener<Event>
|
|||
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<Event>
|
|||
}
|
||||
else
|
||||
{
|
||||
FDialog.error(-1, this, "FileInvalidExtension");
|
||||
Dialog.error(-1, "FileInvalidExtension");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ public class WReportUploadDialog extends Window implements EventListener<Event>
|
|||
}
|
||||
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<Event>
|
|||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -611,7 +611,7 @@ public class ZkJRViewer extends Window implements EventListener<Event>, 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<Event>, 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<Event>, 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
|
||||
|
||||
/**
|
||||
|
|
|
@ -257,7 +257,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, 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<Event>, 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<Event>, 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<Event>, 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<Event>, 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<Event>, 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<Event>, ITab
|
|||
{
|
||||
WEditor editor = new WStringEditor();
|
||||
ZKUpdateUtil.setWidth((HtmlBasedComponent)editor.getComponent(), "98%");
|
||||
FDialog.askForInputWithCancel(m_WindowNo, editor, "CreateNewPrintFormat", Msg.getMsg(m_ctx, "CreateNewPrintFormatTitle"), new Callback<Map.Entry<Boolean, Object>>() {
|
||||
Dialog.askForInputWithCancel(m_WindowNo, editor, "CreateNewPrintFormat", Msg.getMsg(m_ctx, "CreateNewPrintFormatTitle"), new Callback<Map.Entry<Boolean, Object>>() {
|
||||
public void onCallback(Map.Entry<Boolean, Object> result) {
|
||||
if((result == null) || (!(result.getValue() instanceof String)) || (!result.getKey())) {
|
||||
comboReport.setSelectedItem(previousSelected);
|
||||
|
@ -1534,7 +1534,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, 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<Map.Entry<Boolean, Object>>() {
|
||||
Dialog.askForInputWithCancel(m_WindowNo, editor, "CreatePrintFormatCopy", Msg.getMsg(m_ctx, "CreatePrintFormatCopyTitle"), new Callback<Map.Entry<Boolean, Object>>() {
|
||||
public void onCallback(Map.Entry<Boolean, Object> result) {
|
||||
if((result == null) || (!(result.getValue() instanceof String)) || (!result.getKey())) {
|
||||
comboReport.setSelectedItem(previousSelected);
|
||||
|
|
Loading…
Reference in New Issue