Search in sources :

Example 1 with AuEcho

use of org.zkoss.zk.au.out.AuEcho in project adempiere by adempiere.

the class WMerge method onEvent.

//	dispose
/**
	 *  Action Listener
	 *  @param e event
	 */
public void onEvent(Event e) {
    if (e.getTarget().getId().equals(ConfirmPanel.A_CANCEL)) {
        dispose();
        return;
    }
    //
    String columnName = null;
    String from_Info = null;
    String to_Info = null;
    int from_ID = 0;
    int to_ID = 0;
    //	get first merge pair
    for (int i = 0; (i < m_columnName.length && from_ID == 0 && to_ID == 0); i++) {
        Object value = m_from[i].getValue();
        if (value != null) {
            if (value instanceof Integer)
                from_ID = ((Integer) value).intValue();
            else
                continue;
            value = m_to[i].getValue();
            if (value != null && value instanceof Integer)
                to_ID = ((Integer) value).intValue();
            else
                from_ID = 0;
            if (from_ID != 0) {
                columnName = m_columnName[i];
                from_Info = m_from[i].getDisplay();
                to_Info = m_to[i].getDisplay();
            }
        }
    }
    if (from_ID == 0 || from_ID == to_ID)
        return;
    m_msg = Msg.getMsg(Env.getCtx(), "MergeFrom") + " = " + from_Info + "\n" + Msg.getMsg(Env.getCtx(), "MergeTo") + " = " + to_Info;
    if (!FDialog.ask(m_WindowNo, form, "MergeQuestion", m_msg))
        return;
    updateDeleteTable(columnName);
    progressWindow = new BusyDialog();
    progressWindow.setPage(form.getPage());
    progressWindow.doHighlighted();
    runnable = new MergeRunnable(columnName, from_ID, to_ID);
    Clients.response(new AuEcho(form, "runProcess", null));
}
Also used : AuEcho(org.zkoss.zk.au.out.AuEcho) BusyDialog(org.adempiere.webui.apps.BusyDialog)

Example 2 with AuEcho

use of org.zkoss.zk.au.out.AuEcho in project adempiere by adempiere.

the class WGenForm method generate.

//	saveSelection
/**************************************************************************
	 *	Generate Shipments
	 */
public void generate() {
    info.setContent(genForm.generate());
    this.lockUI();
    Clients.response(new AuEcho(this, "runProcess", null));
}
Also used : AuEcho(org.zkoss.zk.au.out.AuEcho)

Example 3 with AuEcho

use of org.zkoss.zk.au.out.AuEcho in project adempiere by adempiere.

the class InfoPanel method prepareAndExecuteQuery.

//	autoQuery
/**
	 *  Prepare and Execute the query
	 */
protected void prepareAndExecuteQuery() {
    m_busy = true;
    showBusyDialog();
    Clients.response(new AuEcho(this, "onQueryCallback", null));
}
Also used : AuEcho(org.zkoss.zk.au.out.AuEcho)

Example 4 with AuEcho

use of org.zkoss.zk.au.out.AuEcho in project adempiere by adempiere.

the class ProcessPanel method process.

/**
	 * Save Parameters and process it
	 */
public void process() {
    if (saveParameters() == null) {
        showBusyDialog();
        Clients.response(new AuEcho((Component) parent.getParentContainer(), "runProcess", null));
    }
}
Also used : AuEcho(org.zkoss.zk.au.out.AuEcho) Component(org.zkoss.zk.ui.Component)

Example 5 with AuEcho

use of org.zkoss.zk.au.out.AuEcho in project adempiere by adempiere.

the class WPayment method onEvent.

//	loadCurrencies
/**************************************************************************
	 *	Action Listener
	 *  @param e event
	 */
public void onEvent(Event e) {
    log.fine("WPayment.actionPerformed - " + e.getTarget().getId());
    //	Finish
    if (e.getTarget().getId().equals(ConfirmPanel.A_OK)) {
        if (checkMandatory()) {
            // cannot recover
            saveChanges();
            dispose();
        }
    } else if (e.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
        dispose();
    else //	Payment Method Change
    if (e.getTarget() == paymentCombo) {
        onPaymentComboSelection();
    } else //	Check Currency change
    if (e.getTarget() == sCurrencyCombo) {
        KeyNamePair pp = sCurrencyCombo.getSelectedItem().toKeyNamePair();
        BigDecimal amt = MConversionRate.convert(Env.getCtx(), m_Amount, m_C_Currency_ID, pp.getKey(), m_AD_Client_ID, m_AD_Org_ID);
        sAmountField.setValue(amt);
    } else //	Cash Currency change
    if (e.getTarget() == bCurrencyCombo) {
        KeyNamePair pp = bCurrencyCombo.getSelectedItem().toKeyNamePair();
        BigDecimal amt = MConversionRate.convert(Env.getCtx(), m_Amount, m_C_Currency_ID, pp.getKey(), m_AD_Client_ID, m_AD_Org_ID);
        bAmountField.setValue(amt);
    } else //  Online
    if (e.getTarget() == kOnline || e.getTarget() == sOnline) {
        this.lockUI();
        Clients.response(new AuEcho(this, "runProcessOnline", null));
    }
}
Also used : AuEcho(org.zkoss.zk.au.out.AuEcho) KeyNamePair(org.compiere.util.KeyNamePair) BigDecimal(java.math.BigDecimal)

Aggregations

AuEcho (org.zkoss.zk.au.out.AuEcho)7 BigDecimal (java.math.BigDecimal)1 BusyDialog (org.adempiere.webui.apps.BusyDialog)1 KeyNamePair (org.compiere.util.KeyNamePair)1 Component (org.zkoss.zk.ui.Component)1