Package org.openswing.swing.lookup.client

Examples of org.openswing.swing.lookup.client.LookupListener


    pricelistController.setAllColumnVisible(false);
    pricelistController.setVisibleColumn("pricelistCodeSAL01", true);
    pricelistController.setVisibleColumn("descriptionSYS10", true);
    pricelistController.setPreferredWidthColumn("descriptionSYS10", 250);
    pricelistController.setFramePreferedSize(new Dimension(420,500));
    pricelistController.addLookupListener(new LookupListener() {

      public void codeValidated(boolean validated) {}

      public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
        try {
View Full Code Here


      expController.setColumnDynamicSettings("alreadyPayedDOC19",payCurrencySettings);

      expController.setPreferredWidthColumn("descriptionDOC19",250);
      expController.setPreferredWidthColumn("paymentDescriptionSYS10",160);
      expController.setFramePreferedSize(new Dimension(750,400));
      expController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          ExpirationVO vo = (ExpirationVO)expController.getLookupVO();
          PaymentDistributionVO pVO = (PaymentDistributionVO)grid.getVOListTableModel().getObjectForRow(grid.getSelectedRow());
          if (vo!=null && vo.getProgressiveDOC19()!=null) {
            BigDecimal res = vo.getValueDOC19().subtract(vo.getAlreadyPayedDOC19());
            CurrencyConvVO convVO = null;
            if (vo.getCurrencyCodeReg03DOC19().equals(controlCurrency.getValue()))
              pVO.setPaymentValueDOC28( res );
            else {
              for(int i=0;i<currConvs.size();i++) {
                convVO = (CurrencyConvVO)currConvs.get(i);
                if (convVO.getCurrencyCode2Reg03REG06().equals(vo.getCurrencyCodeReg03DOC19())) {
                  pVO.setPaymentValueDOC28( res.divide(convVO.getValueREG06(),vo.getDecimalsREG03().intValue(),BigDecimal.ROUND_HALF_UP) );
                  break;
                }
              }
            }
          }
          else {
            pVO.setPaymentValueDOC28(null);
          }
        }

        public void beforeLookupAction(ValueObject parentVO) {
          PaymentVO vo = (PaymentVO)payForm.getVOModel().getValueObject();
          expDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC27());
          expDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC27());
          expDataLocator.getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_REG04,vo.getProgressiveReg04DOC27());
          expDataLocator.getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_REG04,vo.getProgressiveReg04DOC27());
          expDataLocator.getLookupFrameParams().put(ApplicationConsts.PAYED,"N");
          expDataLocator.getLookupValidationParameters().put(ApplicationConsts.PAYED,"N");
          expDataLocator.getLookupFrameParams().put(ApplicationConsts.CURRENCY_CODE_REG03,vo.getCurrencyCodeReg03DOC27());
          expDataLocator.getLookupValidationParameters().put(ApplicationConsts.CURRENCY_CODE_REG03,vo.getCurrencyCodeReg03DOC27());
          expDataLocator.getLookupFrameParams().put(ApplicationConsts.DATE_FILTER,vo.getPaymentDateDOC27());
          expDataLocator.getLookupValidationParameters().put(ApplicationConsts.DATE_FILTER,vo.getPaymentDateDOC27());
        }

        public void forceValidate() {}

      });

      // banks lookup...
      bankDataLocator.setGridMethodName("loadBanks");
      bankDataLocator.setValidationMethodName("validateBankCode");
      controlBankCode.setLookupController(bankController);
      controlBankCode.setControllerMethodName("getBanksList");
      bankController.setLookupDataLocator(bankDataLocator);
      bankController.setFrameTitle("banks");
      bankController.setLookupValueObjectClassName("org.jallinone.registers.bank.java.BankVO");
      bankController.addLookup2ParentLink("bankCodeREG12", "bankCodeReg12DOC27");
      bankController.addLookup2ParentLink("descriptionREG12","descriptionREG12");
      bankController.setAllColumnVisible(false);
      bankController.setVisibleColumn("bankCodeREG12", true);
      bankController.setVisibleColumn("descriptionREG12", true);
      bankController.setPreferredWidthColumn("descriptionREG12",200);
      new CustomizedColumns(new BigDecimal(232),bankController);

      // customer lookup...
      customerDataLocator.setGridMethodName("loadCustomers");
      customerDataLocator.setValidationMethodName("validateCustomerCode");

      controlCodCustomer.setLookupController(customerController);
      controlCodCustomer.setControllerMethodName("getCustomersList");
      customerController.setLookupDataLocator(customerDataLocator);
//      customerController.setForm(filterPanel);
      customerController.setFrameTitle("customers");
      customerController.setLookupValueObjectClassName("org.jallinone.sales.customers.java.GridCustomerVO");
      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,"DOC01_ORDERS");
//      customerDataLocator.getLookupValidationParameters().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"DOC01_ORDERS");
      customerController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          GridCustomerVO vo = (GridCustomerVO)customerController.getLookupVO();
          if (vo.getCustomerCodeSAL07()==null || vo.getCustomerCodeSAL07().equals("")) {
            controlCustName1.setText("");
            controlCustName2.setText("");
            payGrid.getOtherGridParams().remove(ApplicationConsts.COMPANY_CODE_SYS01);
            payGrid.getOtherGridParams().remove(ApplicationConsts.PROGRESSIVE_REG04);
            buttonSearch.setEnabled(false);
            payGrid.clearData();
            payForm.setMode(Consts.READONLY);
            compVO = null;

            insertButton1.setEnabled(false);
            saveButton.setEnabled(false);
            reloadButton.setEnabled(false);
            grid.clearData();
          }
          else {
            controlCodCustomer.setValue(vo.getCustomerCodeSAL07());
            controlCustName1.setText(vo.getName_1REG04());
            controlCustName2.setText(vo.getName_2REG04());
            controlCodSupplier.setValue("");
            controlSupplierName1.setText("");
            controlSupplierName2.setText("");
            payGrid.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01REG04());
            payGrid.getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_REG04,vo.getProgressiveREG04());
            buttonSearch.setEnabled(true);
            payGrid.clearData();
            payForm.setMode(Consts.READONLY);
            grid.clearData();

            Response res =  ClientUtils.getData("loadCompany",vo.getCompanyCodeSys01REG04());
            if (!res.isError())
              compVO = (OrganizationVO)((VOResponse)res).getVo();
            else
              compVO = null;

            insertButton1.setEnabled(true);
            saveButton.setEnabled(false);
            reloadButton.setEnabled(true);
          }
        }

        public void beforeLookupAction(ValueObject parentVO) {}

        public void forceValidate() {}

      });


      // supplier lookup...
      supplierDataLocator.setGridMethodName("loadSuppliers");
      supplierDataLocator.setValidationMethodName("validateSupplierCode");

      controlCodSupplier.setLookupController(supplierController);
      controlCodSupplier.setControllerMethodName("getSuppliersList");
      supplierController.setLookupDataLocator(supplierDataLocator);
//      supplierController.setForm(filterPanel);
      supplierController.setFrameTitle("suppliers");
      supplierController.setLookupValueObjectClassName("org.jallinone.purchases.suppliers.java.GridSupplierVO");
      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,"DOC06_ORDERS");
//      supplierDataLocator.getLookupValidationParameters().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"DOC06_ORDERS");
      supplierController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          GridSupplierVO vo = (GridSupplierVO)supplierController.getLookupVO();
          if (vo.getSupplierCodePUR01()==null || vo.getSupplierCodePUR01().equals("")) {
            controlSupplierName1.setText("");
            controlSupplierName2.setText("");
            payGrid.getOtherGridParams().remove(ApplicationConsts.COMPANY_CODE_SYS01);
            payGrid.getOtherGridParams().remove(ApplicationConsts.PROGRESSIVE_REG04);
            buttonSearch.setEnabled(false);
            payGrid.clearData();
            payForm.setMode(Consts.READONLY);

            insertButton1.setEnabled(false);
            saveButton.setEnabled(false);
            reloadButton.setEnabled(false);
          }
          else {
            controlCodSupplier.setValue(vo.getSupplierCodePUR01());
            controlSupplierName1.setText(vo.getName_1REG04());
            controlSupplierName2.setText(vo.getName_2REG04());
            controlCodCustomer.setValue("");
            controlCustName1.setText("");
            controlCustName2.setText("");
            payGrid.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01REG04());
            payGrid.getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_REG04,vo.getProgressiveREG04());
            buttonSearch.setEnabled(true);
            payGrid.clearData();
            payForm.setMode(Consts.READONLY);

            Response res =  ClientUtils.getData("loadCompany",vo.getCompanyCodeSys01REG04());
            if (!res.isError())
              compVO = (OrganizationVO)((VOResponse)res).getVo();
            else
              compVO = null;

            insertButton1.setEnabled(true);
            reloadButton.setEnabled(true);
            saveButton.setEnabled(false);
          }
        }

        public void beforeLookupAction(ValueObject parentVO) {}

        public void forceValidate() {}

      });

      controlStartDate.addDateChangedListener(new DateChangedListener() {
        public void dateChanged(Date oldDate,Date newDate) {
          if (newDate!=null)
            payGrid.getOtherGridParams().put(ApplicationConsts.START_DATE,newDate);
          else
            payGrid.getOtherGridParams().remove(ApplicationConsts.START_DATE);
        }
      });

      controlEndDate.addDateChangedListener(new DateChangedListener() {
        public void dateChanged(Date oldDate,Date newDate) {
          if (newDate!=null)
            payGrid.getOtherGridParams().put(ApplicationConsts.END_DATE,newDate);
          else
            payGrid.getOtherGridParams().remove(ApplicationConsts.END_DATE);
        }
      });


      colValueDOC27.setDynamicSettings(payGridCurrencySettings);

      colValue.setDynamicSettings(expCurrencySettings);
      colPayedValue.setDynamicSettings(payCurrencySettings);
      colAlreadyPayed.setDynamicSettings(expCurrencySettings);

      // payment lookup...
      payTypeDataLocator.setGridMethodName("loadPaymentTypes");
      payTypeDataLocator.setValidationMethodName("validatePaymentTypeCode");

      controlPayCode.setLookupController(payTypeController);
      controlPayCode.setControllerMethodName("getPaymentTypesList");
      payTypeController.setLookupDataLocator(payTypeDataLocator);
      payTypeController.setFrameTitle("payment types");
      payTypeController.setLookupValueObjectClassName("org.jallinone.registers.payments.java.PaymentTypeVO");
      payTypeController.addLookup2ParentLink("paymentTypeCodeREG11", "paymentTypeCodeReg11DOC27");
      payTypeController.addLookup2ParentLink("descriptionSYS10","paymentDescriptionSYS10");
      payTypeController.setAllColumnVisible(false);
      payTypeController.setVisibleColumn("paymentTypeCodeREG11", true);
      payTypeController.setVisibleColumn("descriptionSYS10", true);
      new CustomizedColumns(new BigDecimal(222),payTypeController);
      payTypeController.addLookupListener(new LookupListener() {

        public void beforeLookupAction(ValueObject parentVO) {
        }

        public void codeChanged(ValueObject parentVO,
                                Collection parentChangedAttributes) {
          PaymentTypeVO vo = (PaymentTypeVO)payTypeController.getLookupVO();
          PaymentVO payVO = (PaymentVO)parentVO;
          if (vo==null || vo.getAccountCodeAcc02REG11()==null) {
            payVO.setAccountCodeAcc02DOC27(null);
            payVO.setAcc02DescriptionSYS10(null);
          }
          else {
            payVO.setAccountCodeAcc02DOC27(vo.getAccountCodeAcc02REG11());
            payVO.setAcc02DescriptionSYS10(vo.getAcc02DescriptionSYS10());
          }
        }

        public void codeValidated(boolean validated) {
        }

        public void forceValidate() {
        }

      });


      // account lookup...
      accDataLocator.setGridMethodName("loadAccounts");
      accDataLocator.setValidationMethodName("validateAccountCode");

      controlAccCode.setLookupController(accController);
      controlAccCode.setControllerMethodName("getAccounts");
      accController.setLookupDataLocator(accDataLocator);
      accController.setFrameTitle("accounts");
      accController.setLookupValueObjectClassName("org.jallinone.accounting.accounts.java.AccountVO");
      accController.addLookup2ParentLink("accountCodeACC02", "accountCodeAcc02DOC27");
      accController.addLookup2ParentLink("descriptionSYS10","acc02DescriptionSYS10");
      accController.setAllColumnVisible(false);
      accController.setVisibleColumn("accountCodeACC02", true);
      accController.setVisibleColumn("descriptionSYS10", true);
      accController.setPreferredWidthColumn("descriptionSYS10", 200);
      accController.setFramePreferedSize(new Dimension(340,400));
      accController.setSortedColumn("accountCodeACC02","ASC",1);
      accController.setFilterableColumn("accountCodeACC02",true);
      accController.setFilterableColumn("descriptionSYS10",true);


      // currency lookup...
      currDataLocator.setGridMethodName("loadCurrencies");
      currDataLocator.setValidationMethodName("validateCurrencyCode");
      controlCurrency.setLookupController(currController);
      controlCurrency.setControllerMethodName("getCurrencies");
      currController.setLookupDataLocator(currDataLocator);
      currController.setFrameTitle("currencies");
      currController.setLookupValueObjectClassName("org.jallinone.registers.currency.java.CurrencyVO");
      currController.addLookup2ParentLink("currencyCodeREG03", "currencyCodeReg03DOC27");
      currController.addLookup2ParentLink("currencySymbolREG03","currencySymbolREG03");
      currController.addLookup2ParentLink("decimalsREG03","decimalsREG03");
      currController.setAllColumnVisible(false);
      currController.setVisibleColumn("currencyCodeREG03", true);
      currController.setVisibleColumn("currencySymbolREG03", true);
      currController.addLookupListener(new LookupListener() {

        public void beforeLookupAction(ValueObject parentVO) {
        }

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
View Full Code Here

      itemController.setPreferredWidthColumn("itemDescriptionSYS10", 200);
      itemController.setPreferredWidthColumn("minSellingQtyITM01", 60);
      itemController.setPreferredWidthColumn("minSellingQtyUmCodeReg02ITM01", 50);
      itemController.setColumnDynamicSettings("valueSAL02",this);
      itemController.setFramePreferedSize(new Dimension(750,500));
      itemController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          // fill in the detail form, according to the selected item settings...
          DetailSaleDocRowVO vo = (DetailSaleDocRowVO)detailPanel.getVOModel().getValueObject();
          if (vo.getItemCodeItm01DOC02()==null || vo.getItemCodeItm01DOC02().equals("")) {
            vo.setDescriptionSYS10(null);
            vo.setMinSellingQtyUmCodeReg02DOC02(null);
            vo.setMinSellingQtyItm01DOC02(null);
            vo.setDecimalsReg02DOC02(null);
            vo.setVatCodeItm01DOC02(null);
            vo.setVatDescriptionDOC02(null);
            vo.setDeductibleReg01DOC02(null);
            vo.setValueReg01DOC02(null);
            vo.setValueSal02DOC02(null);
            vo.setQtyDOC02(null);
            serialNumberRequired = false;
          }
          else {
            vo.setVariantTypeItm06DOC02(ApplicationConsts.JOLLY);
            vo.setVariantTypeItm07DOC02(ApplicationConsts.JOLLY);
            vo.setVariantTypeItm08DOC02(ApplicationConsts.JOLLY);
            vo.setVariantTypeItm09DOC02(ApplicationConsts.JOLLY);
            vo.setVariantTypeItm10DOC02(ApplicationConsts.JOLLY);
            vo.setVariantCodeItm11DOC02(ApplicationConsts.JOLLY);
            vo.setVariantCodeItm12DOC02(ApplicationConsts.JOLLY);
            vo.setVariantCodeItm13DOC02(ApplicationConsts.JOLLY);
            vo.setVariantCodeItm14DOC02(ApplicationConsts.JOLLY);
            vo.setVariantCodeItm15DOC02(ApplicationConsts.JOLLY);

            vo.setQtyDOC02(vo.getMinSellingQtyItm01DOC02());
            controlQty.setMinValue(vo.getMinSellingQtyItm01DOC02().doubleValue());
            controlQty.setDecimals(vo.getDecimalsReg02DOC02().intValue());

            PriceItemVO lookupVO = (PriceItemVO)itemController.getLookupVO();
            bookedItemsPanel.getControlItemType().setValue(lookupVO.getProgressiveHie02ITM01());
            bookedItemsPanel.getControlItemCode().setValue(vo.getItemCodeItm01DOC02());
            bookedItemsPanel.getControlItemCode().getLookupController().forceValidate();
            if (lookupVO.getNoWarehouseMovITM01().booleanValue())
              bookedItemsPanel.getGrid().clearData();
            else
              bookedItemsPanel.getGrid().reloadData();
            orderedItemsPanel.getControlItemType().setValue(lookupVO.getProgressiveHie02ITM01());
            orderedItemsPanel.getControlItemCode().setValue(vo.getItemCodeItm01DOC02());
            orderedItemsPanel.getControlItemCode().getLookupController().forceValidate();
            if (lookupVO.getNoWarehouseMovITM01().booleanValue())
              orderedItemsPanel.getGrid().clearData();
            else
              orderedItemsPanel.getGrid().reloadData();

            serialNumberRequired = ((PriceItemVO)itemController.getLookupVO()).getSerialNumberRequiredITM01().booleanValue();

            DetailSaleDocVO pVO = (DetailSaleDocVO)SaleDeskDocRowsGridPanel.this.parentVO;
            if (pVO!=null && pVO.getCustomerVatCodeReg01DOC01()!=null && !pVO.getCustomerVatCodeReg01DOC01().equals("")) {
              vo.setVatCodeItm01DOC02(pVO.getCustomerVatCodeReg01DOC01());
              vo.setVatDescriptionDOC02(pVO.getVatDescriptionSYS10());
              vo.setDeductibleReg01DOC02(pVO.getDeductibleREG01());
              vo.setValueReg01DOC02(pVO.getValueREG01());
              detailPanel.pull();
            }

          }
          updateTotals();
        }

        public void beforeLookupAction(ValueObject parentVO) {}

        public void forceValidate() {}

      });


      // barcode validation...
      controlBarCode.setTrimText(true);
      controlBarCode.setUpperCase(true);
      controlBarCode.addFocusListener(new FocusAdapter() {
        public void focusLost(FocusEvent e) {
          checkBarcode();
        }
      });
      controlBarCode.addKeyListener(new KeyAdapter() {
        public void keyPressed(KeyEvent e) {
          if (e.getKeyCode()==e.VK_ENTER)
            checkBarcode();
        }
      });


      // serial number lookup...
      serialNumberLocator.setGridMethodName("loadStoredSerialNumbers");
      serialNumberLocator.setValidationMethodName("validateStoredSerialNumber");

      controlSN.setAutoCompletitionWaitTime(0);
      controlSN.setLookupController(serialNumberController);
      serialNumberController.setLookupDataLocator(serialNumberLocator);
      serialNumberController.setFrameTitle("serialNumbers");
      serialNumberController.setLookupValueObjectClassName("org.jallinone.warehouse.java.StoredSerialNumberVO");

      serialNumberController.setAllColumnVisible(false);
      serialNumberController.setVisibleColumn("itemCodeItm01WAR05", true);
      serialNumberController.setVisibleColumn("serialNumberWAR05", true);
      serialNumberController.setVisibleColumn("barCodeWAR05", true);
      serialNumberController.setFramePreferedSize(new Dimension(350,500));
      serialNumberController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          try {
View Full Code Here

    pricelistController.setAllColumnVisible(false);
    pricelistController.setVisibleColumn("pricelistCodeSAL01", true);
    pricelistController.setVisibleColumn("descriptionSYS10", true);
    pricelistController.setPreferredWidthColumn("descriptionSYS10", 250);
    pricelistController.setFramePreferedSize(new Dimension(420,500));
    pricelistController.addLookupListener(new LookupListener() {

      public void codeValidated(boolean validated) {}

      public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
        try {
View Full Code Here

    itemController.setAllColumnVisible(false);
    itemController.setVisibleColumn("itemCodeITM01", true);
    itemController.setVisibleColumn("descriptionSYS10", true);
    itemController.setPreferredWidthColumn("descriptionSYS10", 200);
    itemController.setFramePreferedSize(new Dimension(550,500));
    itemController.addLookupListener(new LookupListener() {

      public void codeValidated(boolean validated) {}

      public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
        // fill in the detail form, according to the selected item settings...
View Full Code Here

      discountController.setPreferredWidthColumn("minValueSAL03", 70);
      discountController.setPreferredWidthColumn("maxValueSAL03", 70);
      discountController.setPreferredWidthColumn("minPercSAL03", 70);
      discountController.setPreferredWidthColumn("maxPercSAL03", 70);
      discountController.setFramePreferedSize(new Dimension(650,500));
      discountController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          SaleDocDiscountVO vo = (SaleDocDiscountVO)parentVO;
View Full Code Here

      activityController.setPreferredWidthColumn("vatCodeReg01SAL09", 80);
      activityController.setPreferredWidthColumn("vatDescriptionSYS10", 150);
      activityController.setPreferredWidthColumn("vatValueREG01", 60);
      activityController.setPreferredWidthColumn("vatDeductibleREG01", 60);
      activityController.setFramePreferedSize(new Dimension(650,500));
      activityController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          SaleDocActivityVO vo = (SaleDocActivityVO)parentVO;
          if (vo.getActivityCodeSal09DOC13()==null || vo.getActivityCodeSal09DOC13().equals("")) {
            vo.setValueDOC13(null);
            vo.setDurationDOC13(null);
          }
          else {
            SaleActivityVO lookupVO = (SaleActivityVO)activityController.getLookupVO();
            vo.setValueDOC13(lookupVO.getValueSAL09());
          }
        }

        public void beforeLookupAction(ValueObject parentVO) {
          activityDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,SaleDocActivitiesPanel.this.parentVO.getCompanyCodeSys01DOC01());
          activityDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,SaleDocActivitiesPanel.this.parentVO.getCompanyCodeSys01DOC01());
          activityDataLocator.getLookupFrameParams().put(ApplicationConsts.CURRENCY_CODE_REG03,SaleDocActivitiesPanel.this.parentVO.getCurrencyCodeReg03DOC01());
          activityDataLocator.getLookupValidationParameters().put(ApplicationConsts.CURRENCY_CODE_REG03,SaleDocActivitiesPanel.this.parentVO.getCurrencyCodeReg03DOC01());
        }

        public void forceValidate() {}

      });


      // scheduled activity lookup...
      schActivityDataLocator.setGridMethodName("loadScheduledActivities");
      schActivityDataLocator.setValidationMethodName("");

      colScheduledAct.setLookupController(schActivityController);
      colScheduledAct.setControllerMethodName("getScheduledActivitiesList");
      schActivityController.setLookupDataLocator(schActivityDataLocator);
      schActivityController.setFrameTitle("scheduled activities");

      schActivityController.setLookupValueObjectClassName("org.jallinone.scheduler.activities.java.ScheduledActivityVO");
      schActivityController.addLookup2ParentLink("progressiveSCH06", "progressiveSch06DOC13");
      schActivityController.addLookup2ParentLink("descriptionSCH06", "descriptionSCH06");
      schActivityController.addLookup2ParentLink("durationSCH06", "durationDOC13");

      schActivityController.setAllColumnVisible(false);
      schActivityController.setVisibleColumn("descriptionSCH06", true);
      schActivityController.setVisibleColumn("descriptionSCH06", true);
      schActivityController.setVisibleColumn("durationSCH06", true);
      schActivityController.setVisibleColumn("startDateSCH06", true);
      schActivityController.setVisibleColumn("endDateSCH06", true);
      schActivityController.setSortedColumn("startDateSCH06", "ASC");
      schActivityController.setFramePreferedSize(new Dimension(650,500));
      schActivityController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) { }
View Full Code Here

      ledgerController.setFramePreferedSize(new Dimension(400,400));
      ledgerController.setAllColumnVisible(false);
      ledgerController.setVisibleColumn("ledgerCodeACC01",true);
      ledgerController.setVisibleColumn("descriptionSYS10",true);
      ledgerController.setPreferredWidthColumn("descriptionSYS10",290);
      ledgerController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          LedgerVO vo = (LedgerVO)parentVO;
View Full Code Here

//      saleCustomerHeadPanel1.getCustomerDataLocator().getLookupFrameParams().put(ApplicationConsts.SUBJECT_TYPE,ApplicationConsts.SUBJECT_PEOPLE_CUSTOMER);
//      saleCustomerHeadPanel1.getCustomerDataLocator().getLookupValidationParameters().put(ApplicationConsts.SUBJECT_TYPE,ApplicationConsts.SUBJECT_PEOPLE_CUSTOMER);


      saleIdHeadPanel1.getControlDocRifLookup().getLookupController().addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          GridSaleDocVO vo = (GridSaleDocVO)saleIdHeadPanel1.getControlDocRifLookup().getLookupController().getLookupVO();
View Full Code Here

      wareController.setVisibleColumn("zipWAR01", true);
      wareController.setVisibleColumn("provinceWAR01", true);
      wareController.setVisibleColumn("countryWAR01", true);
      wareController.setPreferredWidthColumn("descriptionWAR01",200);
      wareController.setFramePreferedSize(new Dimension(750,500));
      wareController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {}
View Full Code Here

TOP

Related Classes of org.openswing.swing.lookup.client.LookupListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.