Search in sources :

Example 1 with WAccountDialog

use of org.adempiere.webui.window.WAccountDialog in project adempiere by adempiere.

the class WAccountEditor method cmd_button.

/**
	 *	Button - Start Dialog
	 */
public void cmd_button() {
    int C_AcctSchema_ID = Env.getContextAsInt(Env.getCtx(), gridField.getWindowNo(), "C_AcctSchema_ID");
    // Try to get C_AcctSchema_ID from global context - teo_sarca BF [ 1830531 ]
    if (C_AcctSchema_ID <= 0) {
        C_AcctSchema_ID = Env.getContextAsInt(Env.getCtx(), "$C_AcctSchema_ID");
    }
    WAccountDialog ad = new WAccountDialog(gridField.getHeader(), m_mAccount, C_AcctSchema_ID);
    //
    Integer newValue = ad.getValue();
    if (newValue == null)
        return;
    Object oldValue = m_value;
    //	set & redisplay
    setValue(newValue);
    ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
    fireValueChange(changeEvent);
}
Also used : ValueChangeEvent(org.adempiere.exceptions.ValueChangeEvent) WAccountDialog(org.adempiere.webui.window.WAccountDialog)

Aggregations

ValueChangeEvent (org.adempiere.exceptions.ValueChangeEvent)1 WAccountDialog (org.adempiere.webui.window.WAccountDialog)1