public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
GridItemVO vo = (GridItemVO)itemController.getLookupVO();
if (vo.getItemCodeITM01()!=null) {
SupplierItemVO supplierVO = (SupplierItemVO)parentVO;
supplierVO.setSupplierItemCodePUR02(vo.getItemCodeITM01());
}
}
public void beforeLookupAction(ValueObject parentVO) {}
public void forceValidate() {}
});
// purchase um lookup...
umDataLocator.setGridMethodName("loadMeasures");
umDataLocator.setValidationMethodName("validateMeasureCode");
colUmCode.setLookupController(umController);
colUmCode.setControllerMethodName("getMeasureUnitsList");
umController.setLookupDataLocator(umDataLocator);
umController.setFrameTitle("measures");
umController.setLookupValueObjectClassName("org.jallinone.registers.measure.java.MeasureVO");
umController.addLookup2ParentLink("umCodeREG02", "umCodeReg02PUR02");
umController.addLookup2ParentLink("decimalsREG02","decimalsREG02");
umController.setAllColumnVisible(false);
umController.setVisibleColumn("umCodeREG02", true);
umController.setVisibleColumn("decimalsREG02", true);
new CustomizedColumns(ApplicationConsts.ID_UM_GRID,umController);
umController.addLookupListener(new LookupListener() {
public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
MeasureVO vo = (MeasureVO)umController.getLookupVO();
if (vo.getUmCodeREG02()!=null) {
colMinQty.setDecimals(vo.getDecimalsREG02().intValue());
colMultipleQty.setDecimals(vo.getDecimalsREG02().intValue());
SupplierItemVO supplierVO = (SupplierItemVO)parentVO;
if (supplierVO.getMinPurchaseQtyPUR02()!=null)
supplierVO.setMinPurchaseQtyPUR02(supplierVO.getMinPurchaseQtyPUR02().setScale(vo.getDecimalsREG02().intValue(),BigDecimal.ROUND_HALF_UP));
if (supplierVO.getMultipleQtyPUR02()!=null)
supplierVO.setMultipleQtyPUR02(supplierVO.getMultipleQtyPUR02().setScale(vo.getDecimalsREG02().intValue(),BigDecimal.ROUND_HALF_UP));
}
}
public void beforeLookupAction(ValueObject parentVO) {}