IDEMPIERE-3071 Cache Reset process dont work if set Show Help = "Run silently - Take Defaults"
This commit is contained in:
parent
8a22cf781a
commit
8d87994630
|
@ -48,6 +48,7 @@ import org.adempiere.util.Callback;
|
||||||
import org.adempiere.util.IProcessUI;
|
import org.adempiere.util.IProcessUI;
|
||||||
import org.compiere.model.MPInstance;
|
import org.compiere.model.MPInstance;
|
||||||
import org.compiere.model.MPInstancePara;
|
import org.compiere.model.MPInstancePara;
|
||||||
|
import org.compiere.model.MProcess;
|
||||||
import org.compiere.print.ReportCtl;
|
import org.compiere.print.ReportCtl;
|
||||||
import org.compiere.print.ReportEngine;
|
import org.compiere.print.ReportEngine;
|
||||||
import org.compiere.process.ProcessInfo;
|
import org.compiere.process.ProcessInfo;
|
||||||
|
@ -362,14 +363,14 @@ public class ProcessDialog extends CFrame
|
||||||
centerPanel.add(separator, BorderLayout.NORTH);
|
centerPanel.add(separator, BorderLayout.NORTH);
|
||||||
centerPanel.add(parameterPanel, BorderLayout.CENTER);
|
centerPanel.add(parameterPanel, BorderLayout.CENTER);
|
||||||
} else {
|
} else {
|
||||||
if (m_ShowHelp != null && m_ShowHelp.equals("N")) {
|
if (m_ShowHelp != null && MProcess.SHOWHELP_DonTShowHelp.equals(m_ShowHelp)) {
|
||||||
bOK.doClick(); // don't ask first click
|
bOK.doClick(); // don't ask first click
|
||||||
// anyway show resulting window
|
// anyway show resulting window
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the process is a silent one
|
// Check if the process is a silent one
|
||||||
if(m_ShowHelp != null && m_ShowHelp.equals("S"))
|
if(m_ShowHelp != null && MProcess.SHOWHELP_RunSilently_TakeDefaults.equals(m_ShowHelp))
|
||||||
bOK.doClick();
|
bOK.doClick();
|
||||||
|
|
||||||
querySaved();
|
querySaved();
|
||||||
|
@ -548,8 +549,8 @@ public class ProcessDialog extends CFrame
|
||||||
if (m_IsReport && !pi.isError())
|
if (m_IsReport && !pi.isError())
|
||||||
bOK.doClick();
|
bOK.doClick();
|
||||||
|
|
||||||
// If the process is a silent one and no errors occured, close the dialog
|
// If the process is a silent one and no errors occurred, close the dialog
|
||||||
if(m_ShowHelp != null && m_ShowHelp.equals("S"))
|
if(m_ShowHelp != null && MProcess.SHOWHELP_RunSilently_TakeDefaults.equals(m_ShowHelp))
|
||||||
bOK.doClick();
|
bOK.doClick();
|
||||||
} // unlockUI
|
} // unlockUI
|
||||||
|
|
||||||
|
@ -560,7 +561,7 @@ public class ProcessDialog extends CFrame
|
||||||
public boolean isUILocked()
|
public boolean isUILocked()
|
||||||
{
|
{
|
||||||
return m_isLocked;
|
return m_isLocked;
|
||||||
} // isLoacked
|
} // isUILocked
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to be executed async.
|
* Method to be executed async.
|
||||||
|
|
|
@ -33,6 +33,7 @@ import javax.swing.JSeparator;
|
||||||
|
|
||||||
import org.adempiere.exceptions.DBException;
|
import org.adempiere.exceptions.DBException;
|
||||||
import org.adempiere.util.IProcessUI;
|
import org.adempiere.util.IProcessUI;
|
||||||
|
import org.compiere.model.MProcess;
|
||||||
import org.compiere.process.ProcessInfo;
|
import org.compiere.process.ProcessInfo;
|
||||||
import org.compiere.swing.CButton;
|
import org.compiere.swing.CButton;
|
||||||
import org.compiere.swing.CDialog;
|
import org.compiere.swing.CDialog;
|
||||||
|
@ -310,7 +311,7 @@ public class ProcessModalDialog extends CDialog
|
||||||
centerPanel.add(separator, BorderLayout.NORTH);
|
centerPanel.add(separator, BorderLayout.NORTH);
|
||||||
centerPanel.add(parameterPanel, BorderLayout.CENTER);
|
centerPanel.add(parameterPanel, BorderLayout.CENTER);
|
||||||
} else {
|
} else {
|
||||||
if (m_ShowHelp != null && m_ShowHelp.equals("N")) {
|
if (m_ShowHelp != null && MProcess.SHOWHELP_DonTShowHelp.equals(m_ShowHelp)) {
|
||||||
m_autoStart = true;
|
m_autoStart = true;
|
||||||
}
|
}
|
||||||
if (m_autoStart)
|
if (m_autoStart)
|
||||||
|
@ -318,7 +319,7 @@ public class ProcessModalDialog extends CDialog
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the process is a silent one
|
// Check if the process is a silent one
|
||||||
if(m_ShowHelp != null && m_ShowHelp.equals("S"))
|
if(m_ShowHelp != null && MProcess.SHOWHELP_RunSilently_TakeDefaults.equals(m_ShowHelp))
|
||||||
bOK.doClick();
|
bOK.doClick();
|
||||||
|
|
||||||
dialog.revalidate();
|
dialog.revalidate();
|
||||||
|
|
|
@ -555,7 +555,7 @@ public class ProcessParameter extends CDialog
|
||||||
{
|
{
|
||||||
MProcess m_process = new MProcess(Env.getCtx(),
|
MProcess m_process = new MProcess(Env.getCtx(),
|
||||||
m_processInfo.getAD_Process_ID(), null);
|
m_processInfo.getAD_Process_ID(), null);
|
||||||
if(m_process.getShowHelp() != null && m_process.getShowHelp().equals("S"))
|
if(m_process.getShowHelp() != null && MProcess.SHOWHELP_RunSilently_TakeDefaults.equals(m_process.getShowHelp()))
|
||||||
{
|
{
|
||||||
// It is defined as a silent process
|
// It is defined as a silent process
|
||||||
if(saveParameters())
|
if(saveParameters())
|
||||||
|
|
|
@ -221,25 +221,28 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
||||||
m_pi.setTitle(m_Name);
|
m_pi.setTitle(m_Name);
|
||||||
|
|
||||||
parameterPanel = new ProcessParameterPanel(m_WindowNo, m_pi);
|
parameterPanel = new ProcessParameterPanel(m_WindowNo, m_pi);
|
||||||
|
layout();
|
||||||
if ( !parameterPanel.init() ) {
|
if ( !parameterPanel.init() ) {
|
||||||
if (m_ShowHelp != null && m_ShowHelp.equals("N"))
|
if (m_ShowHelp != null && MProcess.SHOWHELP_DonTShowHelp.equals(m_ShowHelp))
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
if (autoStart)
|
if (autoStart)
|
||||||
{
|
{
|
||||||
|
bOK.setDisabled(true);
|
||||||
|
bCancel.setDisabled(true);
|
||||||
autoStart();
|
autoStart();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the process is a silent one
|
// Check if the process is a silent one
|
||||||
if (isValid() && m_ShowHelp != null && m_ShowHelp.equals("S"))
|
if (isValid() && m_ShowHelp != null && MProcess.SHOWHELP_RunSilently_TakeDefaults.equals(m_ShowHelp))
|
||||||
{
|
{
|
||||||
|
bOK.setDisabled(true);
|
||||||
|
bCancel.setDisabled(true);
|
||||||
autoStart();
|
autoStart();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
layout();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.theme.ThemeManager;
|
import org.adempiere.webui.theme.ThemeManager;
|
||||||
import org.adempiere.webui.window.FDialog;
|
import org.adempiere.webui.window.FDialog;
|
||||||
import org.adempiere.webui.window.SimplePDFViewer;
|
import org.adempiere.webui.window.SimplePDFViewer;
|
||||||
|
import org.compiere.model.MProcess;
|
||||||
import org.compiere.model.X_AD_CtxHelp;
|
import org.compiere.model.X_AD_CtxHelp;
|
||||||
import org.compiere.print.ReportEngine;
|
import org.compiere.print.ReportEngine;
|
||||||
import org.compiere.process.ProcessInfo;
|
import org.compiere.process.ProcessInfo;
|
||||||
|
@ -270,6 +271,7 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showBusyMask(Window window) {
|
private void showBusyMask(Window window) {
|
||||||
|
if (getParent() != null) {
|
||||||
getParent().appendChild(getMask());
|
getParent().appendChild(getMask());
|
||||||
StringBuilder script = new StringBuilder("var w=zk.Widget.$('#");
|
StringBuilder script = new StringBuilder("var w=zk.Widget.$('#");
|
||||||
script.append(getParent().getUuid()).append("');");
|
script.append(getParent().getUuid()).append("');");
|
||||||
|
@ -279,6 +281,7 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
||||||
script.append("w.busy=true;");
|
script.append("w.busy=true;");
|
||||||
}
|
}
|
||||||
Clients.response(new AuScript(script.toString()));
|
Clients.response(new AuScript(script.toString()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void hideBusyMask()
|
private void hideBusyMask()
|
||||||
|
@ -322,10 +325,12 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
||||||
|
|
||||||
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Parameter"));
|
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Parameter"));
|
||||||
bOK.setImage(ThemeManager.getThemeResource("images/Reset16.png"));
|
bOK.setImage(ThemeManager.getThemeResource("images/Reset16.png"));
|
||||||
|
bOK.setDisabled(false);
|
||||||
|
|
||||||
bCancel.setLabel(Msg.getMsg(Env.getCtx(), "Close"));
|
bCancel.setLabel(Msg.getMsg(Env.getCtx(), "Close"));
|
||||||
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png"));
|
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png"));
|
||||||
|
bCancel.setDisabled(false);
|
||||||
|
|
||||||
isParameterPage = false;
|
isParameterPage = false;
|
||||||
|
|
||||||
m_ids = pi.getIDs();
|
m_ids = pi.getIDs();
|
||||||
|
@ -458,8 +463,8 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
if (!afterProcessTask()) {
|
if (!afterProcessTask()) {
|
||||||
// If the process is a silent one and no errors occured, close the dialog
|
// If the process is a silent one and no errors occurred, close the dialog
|
||||||
if(getShowHelp() != null && getShowHelp().equals("S"))
|
if(getShowHelp() != null && MProcess.SHOWHELP_RunSilently_TakeDefaults.equals(getShowHelp()))
|
||||||
this.dispose();
|
this.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -570,8 +575,8 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the process is a silent one and no errors occured, close the dialog
|
// If the process is a silent one and no errors occurred, close the dialog
|
||||||
if(getShowHelp() != null && getShowHelp().equals("S"))
|
if(getShowHelp() != null && MProcess.SHOWHELP_RunSilently_TakeDefaults.equals(getShowHelp()))
|
||||||
this.dispose();
|
this.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -653,8 +658,8 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the process is a silent one and no errors occured, close the dialog
|
// If the process is a silent one and no errors occurred, close the dialog
|
||||||
if(getShowHelp() != null && getShowHelp().equals("S"))
|
if(getShowHelp() != null && MProcess.SHOWHELP_RunSilently_TakeDefaults.equals(getShowHelp()))
|
||||||
this.dispose();
|
this.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue