use of org.zkoss.zul.impl.InputElement in project adempiere by adempiere.
the class WPAttributeDialog method cmd_newEdit.
// cmd_select
/**
* Instance New/Edit
*/
private void cmd_newEdit() {
boolean rw = cbNewEdit.isChecked();
log.config("R/W=" + rw + " " + m_masi);
//
fieldLotString.setReadonly(!(rw && m_masi.getM_Lot_ID() == 0));
if (fieldLot != null)
fieldLot.setEnabled(rw);
bLot.setEnabled(rw);
fieldSerNo.setReadonly(!rw);
bSerNo.setEnabled(rw);
fieldGuaranteeDate.setReadonly(!rw);
//
for (int i = 0; i < m_editors.size(); i++) {
HtmlBasedComponent editor = m_editors.get(i);
if (editor instanceof InputElement)
((InputElement) editor).setReadonly(!rw);
else if (editor instanceof Listbox)
((Listbox) editor).setEnabled(rw);
else if (editor instanceof NumberBox)
((NumberBox) editor).setEnabled(rw);
}
}
Aggregations