Search in sources :

Example 1 with WImageDialog

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

the class WImageEditor method onEvent.

public void onEvent(Event event) throws Exception {
    if (Events.ON_CLICK.equals(event.getName()) && readwrite) {
        WImageDialog vid = new WImageDialog(m_mImage);
        if (!vid.isCancel()) {
            int AD_Image_ID = vid.getAD_Image_ID();
            Object oldValue = getValue();
            Integer newValue = null;
            if (AD_Image_ID != 0)
                newValue = new Integer(AD_Image_ID);
            //
            //	force reload
            m_mImage = null;
            //	set explicitly
            setValue(newValue);
            //
            ValueChangeEvent vce = new ValueChangeEvent(this, gridField.getColumnName(), oldValue, newValue);
            fireValueChange(vce);
        }
    }
}
Also used : ValueChangeEvent(org.adempiere.exceptions.ValueChangeEvent) WImageDialog(org.adempiere.webui.window.WImageDialog)

Aggregations

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