Search in sources :

Example 1 with ProcessModalDialog

use of org.compiere.apps.ProcessModalDialog in project adempiere by adempiere.

the class Viewer method launchProcessPara.

//	cmd_find
/**
	 * FR [ 295 ]
	 * Launch Parameters for re-query
	 * @return isOk
	 */
private boolean launchProcessPara() {
    if (m_reportEngine.getProcessInfo() == null)
        return false;
    //	Create new Instance
    ProcessInfo pi = new ProcessInfo(m_reportEngine.getProcessInfo().getTitle(), m_reportEngine.getProcessInfo().getAD_Process_ID(), m_reportEngine.getProcessInfo().getTable_ID(), m_reportEngine.getProcessInfo().getRecord_ID());
    //	Launch dialog
    ProcessModalDialog para = new ProcessModalDialog(Env.getFrame((Container) this), m_WindowNo, pi);
    if (para.isValidDialog()) {
        para.validate();
        para.pack();
        AEnv.showCenterWindow(Env.getWindow(m_WindowNo), para);
        if (para.isOK()) {
            //	execute
            ProcessCtl worker = new ProcessCtl(null, m_WindowNo, pi, true, null);
            //synchrous
            worker.run();
            //	
            ReportEngine re = ReportEngine.get(Env.getCtx(), pi);
            //	
            m_reportEngine.setQuery(re.getQuery());
            //	
            return true;
        }
    }
    //	Default
    return false;
}
Also used : Container(java.awt.Container) ProcessCtl(org.compiere.apps.ProcessCtl) ProcessInfo(org.compiere.process.ProcessInfo) ProcessModalDialog(org.compiere.apps.ProcessModalDialog)

Example 2 with ProcessModalDialog

use of org.compiere.apps.ProcessModalDialog in project adempiere by adempiere.

the class ProcessPopupAction method showDialog.

protected void showDialog(ProcessInfoHandler pib) {
    //	FR [ 265 ]
    //	Change for Standard dialog
    ProcessModalDialog para = new ProcessModalDialog(Env.getFrame((Container) window), Env.getWindowNo(window), pib.getProcessInfo());
    if (para.isValidDialog()) {
        para.validate();
        para.pack();
        AEnv.showCenterWindow(Env.getFrame((Container) window), para);
        if (!para.isOK()) {
            setError(pib.getProcessInfo().getSummary());
            setIgnoreChange(true);
            return;
        }
    }
}
Also used : Container(java.awt.Container) ProcessModalDialog(org.compiere.apps.ProcessModalDialog)

Aggregations

Container (java.awt.Container)2 ProcessModalDialog (org.compiere.apps.ProcessModalDialog)2 ProcessCtl (org.compiere.apps.ProcessCtl)1 ProcessInfo (org.compiere.process.ProcessInfo)1