public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
// fill in the grid v.o., according to the selected war settings...
MovementVO vo = (MovementVO)manualMovForm.getVOModel().getValueObject();
if (vo.getWarehouseCodeWar01WAR02()==null || vo.getWarehouseCodeWar01WAR02().equals("")) {
controlItem.setValue(null);
controlItemDescr.setValue(null);
controlUmCode.setValue(null);
controlQty.setValue(null);
controlQty.setEnabled(false);
controlItem.setEnabled(false);
controlPositionCode.setValue(null);
controlPositionCode.setEnabled(false);
}
else {
controlItem.setValue(null);
controlItemDescr.setValue(null);
controlUmCode.setValue(null);
controlQty.setValue(null);
controlQty.setEnabled(false);
controlItem.setEnabled(true);
controlPositionCode.setEnabled(true);
WarehouseVO lookupVO = (WarehouseVO)warController.getLookupVO();
treeLevelPosDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,lookupVO.getProgressiveHie02WAR01());
// set root level as default position...
Response res = ClientUtils.getData("getCompanyRootLevel",new Object[]{lookupVO.getCompanyCodeSys01WAR01(),lookupVO.getProgressiveHie02WAR01()});
if (!res.isError()) {
CompanyHierarchyLevelVO posVO = (CompanyHierarchyLevelVO)((VOResponse)res).getVo();
vo.setProgressiveHie01WAR02(posVO.getProgressiveHIE01());
vo.setLocationDescriptionSYS10(posVO.getDescriptionSYS10());
}
}
}
public void beforeLookupAction(ValueObject parentVO) { }
public void forceValidate() {}
});
// item code lookup...
itemDataLocator.setGridMethodName("loadItems");
itemDataLocator.setValidationMethodName("validateItemCode");
itemDataLocator.getLookupFrameParams().put(ApplicationConsts.SHOW_ONLY_MOVABLE_ITEMS,Boolean.TRUE);
itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.SHOW_ONLY_MOVABLE_ITEMS,Boolean.TRUE);
controlItem.setLookupController(itemController);
controlItem.setControllerMethodName("getItemsList");
itemController.setLookupDataLocator(itemDataLocator);
itemController.setFrameTitle("items");
itemController.setCodeSelectionWindow(itemController.TREE_GRID_FRAME);
treeLevelDataLocator.setServerMethodName("loadCompanyHierarchy");
itemDataLocator.setTreeDataLocator(treeLevelDataLocator);
itemDataLocator.setNodeNameAttribute("descriptionSYS10");
itemController.setLookupValueObjectClassName("org.jallinone.items.java.GridItemVO");
itemController.addLookup2ParentLink("itemCodeITM01", "itemCodeItm01WAR02");
itemController.addLookup2ParentLink("descriptionSYS10", "itemDescriptionSYS10");
itemController.setAllColumnVisible(false);
itemController.setVisibleColumn("companyCodeSys01ITM01", true);
itemController.setVisibleColumn("itemCodeITM01", true);
itemController.setVisibleColumn("descriptionSYS10", true);
itemController.setPreferredWidthColumn("descriptionSYS10", 200);
itemController.setFramePreferedSize(new Dimension(650,500));
itemController.addLookupListener(new LookupListener() {
public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
MovementVO vo = (MovementVO)manualMovForm.getVOModel().getValueObject();
GridItemVO lookupVO = (GridItemVO)itemController.getLookupVO();
if (vo.getItemCodeItm01WAR02()==null || vo.getItemCodeItm01WAR02().equals("") ) {
controlUmCode.setValue(null);
controlQty.setValue(null);
controlQty.setEnabled(false);
}
else {
controlUmCode.setValue(lookupVO.getMinSellingQtyUmCodeReg02ITM01());
controlQty.setValue(null);
controlQty.setEnabled(true);
serialNumbersRequired = lookupVO.getSerialNumberRequiredITM01().booleanValue();
controlQty.setDecimals(lookupVO.getDecimalsREG02().intValue());
}
}
public void beforeLookupAction(ValueObject parentVO) {
MovementVO vo = (MovementVO)manualMovForm.getVOModel().getValueObject();
itemDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01WAR02());
itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01WAR02());
itemDataLocator.getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_HIE02,controlItemType.getValue());
itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_HIE02,controlItemType.getValue());
treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01WAR02());
treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,controlItemType.getValue());
}
public void forceValidate() {}
});
// warehouse position code lookup...
controlPositionCode.setLookupController(posController);
posController.setLookupDataLocator(posDataLocator);
posController.setFrameTitle("warehouse positions");
posController.setCodeSelectionWindow(posController.TREE_FRAME);
treeLevelPosDataLocator.setServerMethodName("loadCompanyHierarchy");
posDataLocator.setTreeDataLocator(treeLevelPosDataLocator);
posDataLocator.setNodeNameAttribute("descriptionSYS10");
posController.setLookupValueObjectClassName("org.jallinone.hierarchies.java.CompanyHierarchyLevelVO");
posController.addLookup2ParentLink("progressiveHIE01", "progressiveHie01WAR02");
posController.addLookup2ParentLink("descriptionSYS10","locationDescriptionSYS10");
posController.setFramePreferedSize(new Dimension(400,400));
// warehouse motive code lookup...
motiveDataLocator.setGridMethodName("loadWarehouseMotives");
motiveDataLocator.setValidationMethodName("validateWarehouseMotiveCode");
controlMotiveCode.setLookupController(motiveController);
controlMotiveCode.setControllerMethodName("getWarehouseMotivesList");
motiveController.setLookupDataLocator(motiveDataLocator);
motiveController.setFrameTitle("warehouse motives");
motiveController.setLookupValueObjectClassName("org.jallinone.warehouse.tables.motives.java.MotiveVO");
motiveController.addLookup2ParentLink("warehouseMotiveWAR04", "warehouseMotiveWar04WAR02");
motiveController.addLookup2ParentLink("descriptionSYS10", "motiveDescriptionSYS10");
motiveController.setAllColumnVisible(false);
motiveController.setVisibleColumn("warehouseMotiveWAR04", true);
motiveController.setVisibleColumn("descriptionSYS10", true);
motiveController.setPreferredWidthColumn("descriptionSYS10", 250);
motiveController.setFramePreferedSize(new Dimension(360,500));
motiveController.addLookupListener(new LookupListener() {
public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
MovementVO vo = (MovementVO)manualMovForm.getVOModel().getValueObject();
controlNote.setValue(vo.getMotiveDescriptionSYS10());
}
public void beforeLookupAction(ValueObject parentVO) {}
public void forceValidate() {}