public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
// fill in the detail form, according to the selected item settings...
ItemToPrintVO vo = (ItemToPrintVO)itemPanel.getVOModel().getValueObject();
if (vo.getItemCodeItm01()==null || vo.getItemCodeItm01().equals("")) {
vo.setItemCodeItm01(null);
vo.setDescriptionSYS10(null);
vo.setQty(null);
}
}
public void beforeLookupAction(ValueObject parentVO) {
Object companyCodeSys01 = controlCompaniesCombo.getValue();
if (companyCodeSys01==null) {
if (controlCompaniesCombo.getDomain()!=null && controlCompaniesCombo.getDomain().getDomainPairList().length>0)
companyCodeSys01 = controlCompaniesCombo.getDomain().getDomainPairList()[0].getCode();
else {
ClientApplet applet = ( (ApplicationClientFacade) MDIFrame.getInstance().getClientFacade()).getMainClass();
ButtonCompanyAuthorizations bca = applet.getAuthorizations().getCompanyBa();
ArrayList companiesList = bca.getCompaniesList(controlCompaniesCombo.getFunctionCode());
companyCodeSys01 = companiesList.get(0).toString();
}
}
itemDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,companyCodeSys01);
itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,companyCodeSys01);
}
public void forceValidate() {}
});
// retrieve item types and fill in the item types combo box and set buttons disabilitation...
Response res = ClientUtils.getData("loadItemTypes",new GridParams());
final Domain d = new Domain("ITEM_TYPES");
if (!res.isError()) {
ItemTypeVO vo = null;
java.util.List list = ((VOListResponse)res).getRows();
for(int i=0;i<list.size();i++) {
vo = (ItemTypeVO)list.get(i);
d.addDomainPair(vo.getProgressiveHie02ITM02(),vo.getDescriptionSYS10());
}
}
controlItemType.setDomain(d);
controlItemType.getComboBox().addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange()==e.SELECTED) {
ItemToPrintVO vo = (ItemToPrintVO)itemPanel.getVOModel().getValueObject();
vo.setItemCodeItm01(null);
vo.setDescriptionSYS10(null);
vo.setQty(null);
int selIndex = ((JComboBox)e.getSource()).getSelectedIndex();
Object selValue = d.getDomainPairList()[selIndex].getCode();
treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);