public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
AccountVO accountVO = (AccountVO)accountController.getLookupVO();
JournalRowVO vo = (JournalRowVO)detailPanel.getVOModel().getValueObject();
vo.setAccountCodeAcc02ACC06(accountVO.getAccountCodeACC02());
vo.setAccountCodeACC06(accountVO.getAccountCodeACC02());
// controlAcode.setValue(accountVO.getAccountCodeACC02());
}
public void beforeLookupAction(ValueObject parentVO) {
accountDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
accountDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
}
public void forceValidate() {}
});
// customer lookup...
customerDataLocator.setGridMethodName("loadCustomers");
customerDataLocator.setValidationMethodName("validateCustomerCode");
controlCcode.setLookupController(customerController);
controlCcode.setControllerMethodName("getCustomersList");
customerController.setForm(headerPanel);
customerController.setLookupDataLocator(customerDataLocator);
customerController.setFrameTitle("customers");
customerController.setLookupValueObjectClassName("org.jallinone.sales.customers.java.GridCustomerVO");
customerController.addLookup2ParentLink("customerCodeSAL07","customerCodeSAL07");
customerController.addLookup2ParentLink("name_1REG04", "name_1REG04");
customerController.addLookup2ParentLink("progressiveREG04", "progressiveREG04");
customerController.setAllColumnVisible(false);
customerController.setVisibleColumn("companyCodeSys01REG04", true);
customerController.setVisibleColumn("customerCodeSAL07", true);
customerController.setVisibleColumn("name_1REG04", true);
customerController.setVisibleColumn("name_2REG04", true);
customerController.setVisibleColumn("cityREG04", true);
customerController.setVisibleColumn("provinceREG04", true);
customerController.setVisibleColumn("countryREG04", true);
customerController.setVisibleColumn("taxCodeREG04", true);
customerController.setHeaderColumnName("cityREG04", "city");
customerController.setHeaderColumnName("provinceREG04", "prov");
customerController.setHeaderColumnName("countryREG04", "country");
customerController.setHeaderColumnName("taxCodeREG04", "taxCode");
customerController.setPreferredWidthColumn("name_1REG04", 200);
customerController.setPreferredWidthColumn("name_2REG04", 150);
customerController.setFramePreferedSize(new Dimension(750,500));
customerDataLocator.getLookupFrameParams().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_VAT");
customerDataLocator.getLookupValidationParameters().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_VAT");
customerController.addLookupListener(new LookupListener() {
public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
GridCustomerVO custVO = (GridCustomerVO)customerController.getLookupVO();
JournalHeaderWithVatVO vo = (JournalHeaderWithVatVO)headerPanel.getVOModel().getValueObject();
vo.setCreditAccountCodeAcc02SAL07(custVO.getCreditAccountCodeAcc02SAL07());
}
public void beforeLookupAction(ValueObject parentVO) {
customerDataLocator.getLookupFrameParams().put(ApplicationConsts.SUBJECT_TYPE,ApplicationConsts.SUBJECT_ORGANIZATION_CUSTOMER);
customerDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
customerDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
customerController.setHeaderColumnName("name_1REG04", "corporateName1");
customerController.setHeaderColumnName("name_2REG04", "corporateName2");
}
public void forceValidate() {}
});
// supplier lookup...
supplierDataLocator.setGridMethodName("loadSuppliers");
supplierDataLocator.setValidationMethodName("validateSupplierCode");
controlScode.setLookupController(supplierController);
controlScode.setControllerMethodName("getSuppliersList");
supplierController.setForm(headerPanel);
supplierController.setLookupDataLocator(supplierDataLocator);
supplierController.setFrameTitle("suppliers");
supplierController.setLookupValueObjectClassName("org.jallinone.purchases.suppliers.java.GridSupplierVO");
supplierController.addLookup2ParentLink("supplierCodePUR01","supplierCodePUR01");
supplierController.addLookup2ParentLink("name_1REG04", "name_1REG04");
supplierController.addLookup2ParentLink("progressiveREG04", "progressiveREG04");
supplierController.setAllColumnVisible(false);
supplierController.setVisibleColumn("companyCodeSys01REG04", true);
supplierController.setVisibleColumn("supplierCodePUR01", true);
supplierController.setVisibleColumn("name_1REG04", true);
supplierController.setVisibleColumn("name_2REG04", true);
supplierController.setVisibleColumn("cityREG04", true);
supplierController.setVisibleColumn("provinceREG04", true);
supplierController.setVisibleColumn("countryREG04", true);
supplierController.setVisibleColumn("taxCodeREG04", true);
supplierController.setHeaderColumnName("name_1REG04", "corporateName1");
supplierController.setHeaderColumnName("cityREG04", "city");
supplierController.setHeaderColumnName("provinceREG04", "prov");
supplierController.setHeaderColumnName("countryREG04", "country");
supplierController.setHeaderColumnName("taxCodeREG04", "taxCode");
supplierController.setPreferredWidthColumn("name_1REG04", 200);
supplierController.setPreferredWidthColumn("name_2REG04", 150);
supplierController.setFramePreferedSize(new Dimension(750,500));
supplierDataLocator.getLookupFrameParams().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_VAT");
supplierDataLocator.getLookupValidationParameters().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_VAT");
supplierController.addLookupListener(new LookupListener() {
public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
GridSupplierVO supplierVO = (GridSupplierVO)supplierController.getLookupVO();
JournalHeaderWithVatVO vo = (JournalHeaderWithVatVO)headerPanel.getVOModel().getValueObject();
vo.setDebitAccountCodeAcc02PUR01(supplierVO.getDebitAccountCodeAcc02PUR01());
}
public void beforeLookupAction(ValueObject parentVO) {
supplierDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
supplierDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());