Package org.jallinone.items.java

Examples of org.jallinone.items.java.ItemTypeVO


   */
  private void init() {
    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 && detailPanel.getMode()!=Consts.READONLY) {
          DetailPurchaseDocRowVO vo = (DetailPurchaseDocRowVO)detailPanel.getVOModel().getValueObject();
          vo.setItemCodeItm01DOC07(null);
          vo.setSupplierItemCodePur02DOC07(null);
          vo.setDescriptionSYS10(null);
          vo.setUmCodePur02DOC07(null);
          vo.setVatCodeItm01DOC07(null);
          vo.setVatDescriptionDOC07(null);
          vo.setDeductibleReg01DOC07(null);
          vo.setValueReg01DOC07(null);
          vo.setValuePur04DOC07(null);
          vo.setQtyDOC07(null);

          int selIndex = ((JComboBox)e.getSource()).getSelectedIndex();
          Object selValue = d.getDomainPairList()[selIndex].getCode();
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC07());
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);

          detailPanel.pull(controlItemCode.getAttributeName());
          try {
            controlItemCode.validateCode(null);
View Full Code Here


   */
  private void init() {
    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());
      }
    }
    colItemType.setDomain(d);
    colItemType.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange()==e.SELECTED) {
          SupplierPriceVO vo = (SupplierPriceVO)pricesGrid.getVOListTableModel().getObjectForRow(pricesGrid.getSelectedRow());
          SupplierPricelistVO pricelistVO = (SupplierPricelistVO)grid.getVOListTableModel().getObjectForRow(0);
          vo.setItemCodeItm01PUR04(null);
          int selIndex = ((JComboBox)e.getSource()).getSelectedIndex();
          Object selValue = d.getDomainPairList()[selIndex].getCode();
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);
          itemDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,pricelistVO.getCompanyCodeSys01PUR03());
          itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,pricelistVO.getCompanyCodeSys01PUR03());
          itemDataLocator.getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_REG04,pricelistVO.getProgressiveReg04PUR03());
          itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_REG04,pricelistVO.getProgressiveReg04PUR03());
          vo.setCompanyCodeSys01PUR04(pricelistVO.getCompanyCodeSys01PUR03());
          vo.setPricelistCodePur03PUR04(pricelistVO.getPricelistCodePUR03());
        }
      }
    });
  }
View Full Code Here

    // item type...
    Response res = ClientUtils.getData("loadItemTypes",new GridParams());
    Domain d = new Domain("ITEM_TYPES");
    if (!res.isError()) {
      ItemTypeVO vo = null;
      itemTypesList = ((VOListResponse)res).getRows();
      for(int i=0;i<itemTypesList.size();i++) {
        vo = (ItemTypeVO)itemTypesList.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) {
          ReorderFromMinStockFilterVO vo = (ReorderFromMinStockFilterVO)filterPanel.getVOModel().getValueObject();
          vo.setProgressiveHie02ITM01((BigDecimal)controlItemType.getValue());
        }
      }
    });
    if (d.getDomainPairList().length>=1)
      controlItemType.getComboBox().setSelectedIndex(0);
    else
      controlItemType.getComboBox().setSelectedIndex(-1);


    // warehouse lookup...
    wareDataLocator.setGridMethodName("loadWarehouses");
    wareDataLocator.setValidationMethodName("validateWarehouseCode");

    controlWarehouse.setLookupController(wareController);
    controlWarehouse.setControllerMethodName("getWarehousesList");
    wareController.setForm(filterPanel);
    wareController.setLookupDataLocator(wareDataLocator);
    wareController.setFrameTitle("warehouses");
    wareController.setLookupValueObjectClassName("org.jallinone.warehouse.java.WarehouseVO");
    wareController.addLookup2ParentLink("companyCodeSys01WAR01", "companyCode");
    wareController.addLookup2ParentLink("warehouseCodeWAR01", "warehouseCode");
    wareController.addLookup2ParentLink("descriptionWAR01","warehouseDescription");
    wareController.setAllColumnVisible(false);
    wareController.setVisibleColumn("warehouseCodeWAR01", true);
    wareController.setVisibleColumn("descriptionWAR01", true);
    wareController.setVisibleColumn("addressWAR01", true);
    wareController.setVisibleColumn("cityWAR01", true);
    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) {
        if (wareController.getLookupVO()==null) {
          controlSupplierCode.setValue(null);
          supplierController.forceValidate();
          controlSupplierCode.setEnabled(false);
          warehouseVO = null;
        }
        else {
          warehouseVO = (WarehouseVO)wareController.getLookupVO();
          supplierDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,warehouseVO.getCompanyCodeSys01WAR01());
          supplierDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,warehouseVO.getCompanyCodeSys01WAR01());
          grid.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,warehouseVO.getCompanyCodeSys01WAR01());
          controlSupplierCode.setEnabled(true);

          Response res =  ClientUtils.getData("loadCompany",warehouseVO.getCompanyCodeSys01WAR01());
          if (!res.isError()) {
            OrganizationVO compVO = (OrganizationVO)((VOResponse)res).getVo();
            if (compVO!=null && compVO.getCurrencyCodeReg03()!=null && !compVO.getCurrencyCodeReg03().equals("")) {
              controlCurrency.setValue(compVO.getCurrencyCodeReg03());
              controlCurrency.getLookupController().forceValidate();
            }
          }

        }
      }

      public void beforeLookupAction(ValueObject parentVO) { }

      public void forceValidate() {}

    });


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

    controlSupplierCode.setLookupController(supplierController);
    controlSupplierCode.setControllerMethodName("getSuppliersList");
    supplierController.setForm(filterPanel);
    supplierController.setLookupDataLocator(supplierDataLocator);
    supplierController.setFrameTitle("suppliers");
    supplierController.setLookupValueObjectClassName("org.jallinone.purchases.suppliers.java.GridSupplierVO");
    supplierController.addLookup2ParentLink("supplierCodePUR01","supplierCode");
    supplierController.addLookup2ParentLink("progressiveREG04","progressiveREG04");
    supplierController.addLookup2ParentLink("name_1REG04", "name_1REG04");
    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));


    // supplier lookup for column...
    supplierDataLocator2.setGridMethodName("loadSuppliers");
    supplierDataLocator2.setValidationMethodName("validateSupplierCode");

    colSupplierCode.setLookupController(supplierController2);
    colSupplierCode.setControllerMethodName("getSuppliersList");
    supplierController2.setForm(filterPanel);
    supplierController2.setLookupDataLocator(supplierDataLocator2);
    supplierController2.setFrameTitle("suppliers");
    supplierController2.setLookupValueObjectClassName("org.jallinone.purchases.suppliers.java.GridSupplierVO");
    supplierController2.addLookup2ParentLink("supplierCodePUR01","supplierCode");
    supplierController2.addLookup2ParentLink("name_1REG04", "name_1REG04");
    supplierController2.setAllColumnVisible(false);
    supplierController2.setVisibleColumn("companyCodeSys01REG04", true);
    supplierController2.setVisibleColumn("supplierCodePUR01", true);
    supplierController2.setVisibleColumn("name_1REG04", true);
    supplierController2.setVisibleColumn("name_2REG04", true);
    supplierController2.setVisibleColumn("cityREG04", true);
    supplierController2.setVisibleColumn("provinceREG04", true);
    supplierController2.setVisibleColumn("countryREG04", true);
    supplierController2.setVisibleColumn("taxCodeREG04", true);
    supplierController2.setHeaderColumnName("name_1REG04", "corporateName1");
    supplierController2.setHeaderColumnName("cityREG04", "city");
    supplierController2.setHeaderColumnName("provinceREG04", "prov");
    supplierController2.setHeaderColumnName("countryREG04", "country");
    supplierController2.setHeaderColumnName("taxCodeREG04", "taxCode");
    supplierController2.setPreferredWidthColumn("name_1REG04", 200);
    supplierController2.setPreferredWidthColumn("name_2REG04", 150);
    supplierController2.setFramePreferedSize(new Dimension(750,500));
    supplierController2.addLookupListener(new LookupListener() {

      public void codeValidated(boolean validated) {}

      public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
        ReorderFromMinStockVO vo = (ReorderFromMinStockVO)grid.getVOListTableModel().getObjectForRow(grid.getSelectedRow());
        GridSupplierVO lookupVO = (GridSupplierVO)supplierController2.getLookupVO();
        if (lookupVO!=null && lookupVO.getProgressiveREG04()!=null) {
          vo.setProgressiveREG04(lookupVO.getProgressiveREG04());

          // retrieve pricelist...
          GridParams gridParams = new GridParams();
          gridParams.getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_REG04,lookupVO.getProgressiveREG04());
          gridParams.getOtherGridParams().put(ApplicationConsts.DATE_FILTER,new java.sql.Date(System.currentTimeMillis()));
          gridParams.getOtherGridParams().put(ApplicationConsts.ITEM_PK,new ItemPK(vo.getCompanyCodeSys01(),vo.getItemCode()));
          Response res = ClientUtils.getData("loadSupplierPrices",gridParams);
          if (res.isError())
            vo.setPricelistCodePUR03(null);
          else {
            SupplierPriceVO priceVO = (SupplierPriceVO)((VOListResponse)res).getRows().get(0);
            vo.setPricelistCodePUR03(priceVO.getPricelistCodePur03PUR04());
            vo.setPricelistDescription(priceVO.getPricelistDescriptionSYS10());
          }
        }
        else
          vo.setProgressiveREG04(null);
      }

      public void beforeLookupAction(ValueObject parentVO) {
        ReorderFromMinStockVO vo = (ReorderFromMinStockVO)grid.getVOListTableModel().getObjectForRow(grid.getSelectedRow());
        supplierDataLocator2.getLookupFrameParams().put(ApplicationConsts.ITEM,vo.getItemCode());
        supplierDataLocator2.getLookupValidationParameters().put(ApplicationConsts.ITEM,vo.getItemCode());
      }

      public void forceValidate() {}

    });
View Full Code Here

   */
  private void init() {
    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());
      }
    }
    colItemType.setDomain(d);
    colItemType.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange()==e.SELECTED) {
          PriceVO vo = (PriceVO)pricesGrid.getVOListTableModel().getObjectForRow(pricesGrid.getSelectedRow());
          PricelistVO pricelistVO = (PricelistVO)getPricesGrid().getOtherGridParams().get(ApplicationConsts.PRICELIST);
          vo.setItemCodeItm01SAL02(null);
          int selIndex = ((JComboBox)e.getSource()).getSelectedIndex();
          Object selValue = d.getDomainPairList()[selIndex].getCode();
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.COMPANY_CODE_SYS01,pricelistVO.getCompanyCodeSys01SAL01());
          itemDataLocator.getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);
          itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);
          itemDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,pricelistVO.getCompanyCodeSys01SAL01());
          itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,pricelistVO.getCompanyCodeSys01SAL01());
          vo.setCompanyCodeSys01SAL02(pricelistVO.getCompanyCodeSys01SAL01());
          vo.setPricelistCodeSal01SAL02(pricelistVO.getPricelistCodeSAL01());
        }
      }
    });
  }
View Full Code Here

   */
  private void init() {
    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());
      }
    }
    colItemType.setDomain(d);

    HashSet buttonsToDisable = new HashSet();
View Full Code Here

   */
  private void init() {
    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());
      }
    }
    colItemType.setDomain(d);
    colItemType.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange()==e.SELECTED && grid.getMode()!=Consts.READONLY) {
          GridInDeliveryNoteRowVO vo = (GridInDeliveryNoteRowVO)grid.getVOListTableModel().getObjectForRow(grid.getSelectedRow());
          vo.setItemCodeItm01DOC09(null);
          vo.setSupplierItemCodePur02DOC09(null);
          vo.setDescriptionSYS10(null);
          vo.setUmCodeREG02(null);
          vo.setUmCodeReg02PUR02(null);
          vo.setQtyDOC09(null);
          vo.setSupplierQtyDOC09(null);
          vo.setQtyDOC09(null);

          int selIndex = ((JComboBox)e.getSource()).getSelectedIndex();
          Object selValue = d.getDomainPairList()[selIndex].getCode();
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);
          itemDataLocator.getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);
View Full Code Here

   */
  private void init() {
    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);
  }
View Full Code Here

   */
  private void init() {
    Response res = ClientUtils.getData("loadItemTypes",new GridParams());
    Domain d = new Domain("ITEM_TYPES");
    if (!res.isError()) {
      ItemTypeVO vo = null;
      itemTypesList = ((VOListResponse)res).getRows();
      for(int i=0;i<itemTypesList.size();i++) {
        vo = (ItemTypeVO)itemTypesList.get(i);
        d.addDomainPair(vo.getProgressiveHie02ITM02(),vo.getDescriptionSYS10());
      }
    }
    controlLOB.setDomain(d);
    controlLOB.getComboBox().addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
          progressiveHIE01 = null;
          controlDescr.setText(null);
      }
    });
    if (d.getDomainPairList().length>=1)
      controlLOB.getComboBox().setSelectedIndex(0);
    else
      controlLOB.getComboBox().setSelectedIndex(-1);


    // col item type...
    colItemType.setDomain(d);
    colItemType.addItemListener(new ItemListener() {

      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange()==e.SELECTED) {
          InventoryItemVO vo = (InventoryItemVO)grid.getVOListTableModel().getObjectForRow(grid.getSelectedRow());
          vo.setItemCodeItm01WAR07(null);
          vo.setDescriptionSYS10(null);
          itemController.getLookupDataLocator().getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02WAR07());
          itemController.getLookupDataLocator().getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02WAR07());
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02WAR07());
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01WAR07());
          itemController.getLookupDataLocator().getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01WAR07());
          itemController.getLookupDataLocator().getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01WAR07());
        }
      }

    });


    // items level lookup...
    filterLevelDataLocator.setGridMethodName("loadCompanyHierarchy");
    filterLevelDataLocator.setValidationMethodName("");
    filterTreeLevelDataLocator.setServerMethodName("loadCompanyHierarchy");
    filterTreeLevelDataLocator.setNodeNameAttribute("descriptionSYS10");
    filterLevelDataLocator.setTreeDataLocator(filterTreeLevelDataLocator);
    filterLevelDataLocator.setNodeNameAttribute("descriptionSYS10");

    controlItemLevel.setLookupController(levelController);
    levelController.setCodeSelectionWindow(levelController.TREE_FRAME);
    levelController.setAllowTreeLeafSelectionOnly(false);
    levelController.setForm(filterPanel);
    levelController.setLookupDataLocator(filterLevelDataLocator);
    levelController.setFrameTitle("level");
    levelController.setLookupValueObjectClassName("org.jallinone.hierarchies.java.CompanyHierarchyLevelVO");
    levelController.setAllColumnVisible(false);
    levelController.setVisibleColumn("descriptionSYS10", true);
    levelController.setPreferredWidthColumn("descriptionSYS10",200);
    levelController.setFramePreferedSize(new Dimension(400,400));
    levelController.addLookupListener(new LookupListener() {

      public void codeValidated(boolean validated) {}

      public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
        CompanyHierarchyLevelVO vo = (CompanyHierarchyLevelVO)controlItemLevel.getLookupController().getLookupVO();
        controlDescr.setText(vo==null?null:vo.getDescriptionSYS10());
        progressiveHIE01 = vo==null?null:vo.getProgressiveHIE01();
      }

      public void beforeLookupAction(ValueObject parentVO) {
        ItemTypeVO vo = (ItemTypeVO)itemTypesList.get(controlLOB.getSelectedIndex());

        filterTreeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01ITM02());
        filterTreeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,controlLOB.getValue());
      }

      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);

    colItemCode.setLookupController(itemController);
    itemController.setLookupDataLocator(itemDataLocator);
    itemController.setFrameTitle("items");
    itemController.setShowErrorMessage(false);

    itemController.setCodeSelectionWindow(itemController.TREE_GRID_FRAME);
    treeLevelDataLocator.setServerMethodName("loadCompanyHierarchy");
    itemDataLocator.setTreeDataLocator(treeLevelDataLocator);
    itemDataLocator.setNodeNameAttribute("descriptionSYS10");

    itemController.setLookupValueObjectClassName("org.jallinone.items.java.GridItemVO");
    itemController.addLookup2ParentLink("companyCodeSys01ITM01", "companyCodeSys01WAR07");
    itemController.addLookup2ParentLink("itemCodeITM01", "itemCodeItm01WAR07");
    itemController.addLookup2ParentLink("descriptionSYS10", "descriptionSYS10");

    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) {}

      public void beforeLookupAction(ValueObject parentVO) {
        InventoryItemVO vo = (InventoryItemVO)parentVO;
        vo.setCompanyCodeSys01WAR07(inventoryVO.getCompanyCodeSys01WAR06());
        itemDataLocator.getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02WAR07());
        itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02WAR07());
        treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02WAR07());
        itemController.getLookupDataLocator().getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02WAR07());
        itemController.getLookupDataLocator().getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02WAR07());
        treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02WAR07());
        treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01WAR07());
        itemController.getLookupDataLocator().getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01WAR07());
        itemController.getLookupDataLocator().getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01WAR07());
        itemController.getLookupDataLocator().getLookupValidationParameters().put(ApplicationConsts.SHOW_ITEMS_WITHOUT_VARIANTS,Boolean.TRUE);
        itemController.getLookupDataLocator().getLookupFrameParams().put(ApplicationConsts.SHOW_ITEMS_WITHOUT_VARIANTS,Boolean.TRUE);
      }

      public void forceValidate() {}

    });



    // domain for locations...
    HashMap map = new HashMap();
    map.put(ApplicationConsts.COMPANY_CODE_SYS01,inventoryVO.getCompanyCodeSys01WAR06());
    map.put(ApplicationConsts.PROGRESSIVE_HIE02,inventoryVO.getProgressiveHie02WAR01());
    res = ClientUtils.getData("loadCompanyLeaves",map);
    d = new Domain("WAR_LOCATIONS");
    if (!res.isError()) {
      java.util.List rows = null;
      CompanyHierarchyLevelVO vo = null;
      rows = ((VOListResponse)res).getRows();
      for(int i=0;i<rows.size();i++) {
        vo = (CompanyHierarchyLevelVO)rows.get(i);
        d.addDomainPair(vo.getProgressiveHIE01(),vo.getDescriptionSYS10());
      }
    }
    colProg.setDomain(d);
    colRealProg.setDomain(d);

View Full Code Here

    // (product) item type...
    Domain d = new Domain("ITEM_TYPES");
    Response res = ClientUtils.getData("loadItemTypes",new GridParams());
    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());
      }
    }
    colItemType.setDomain(d);
    colItemType.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange() == e.SELECTED) {
          ProdOrderProductVO vo = (ProdOrderProductVO)productsGrid.getVOListTableModel().getObjectForRow(productsGrid.getSelectedRow());
//          if (formPanel.getMode()==Consts.EDIT || formPanel.getMode()==Consts.INSERT) {
//            controlLevel.getCodBox().setText(null);
//            controlLevelDescr.setText("");
//          }
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02, vo.getProgressiveHie02DOC23());
        }
      }
    });
  }
View Full Code Here

   */
  private void init() {
    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 && detailPanel.getMode()!=Consts.READONLY) {
          DetailPurchaseDocRowVO vo = (DetailPurchaseDocRowVO)detailPanel.getVOModel().getValueObject();
          vo.setItemCodeItm01DOC07(null);
          vo.setDescriptionSYS10(null);
          vo.setUmCodePur02DOC07(null);
          vo.setVatCodeItm01DOC07(null);
          vo.setVatDescriptionDOC07(null);
          vo.setDeductibleReg01DOC07(null);
          vo.setValueReg01DOC07(null);
          vo.setValuePur04DOC07(null);
          vo.setQtyDOC07(null);

          int selIndex = ((JComboBox)e.getSource()).getSelectedIndex();
          Object selValue = d.getDomainPairList()[selIndex].getCode();
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC07());
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);
        }
      }
    });

View Full Code Here

TOP

Related Classes of org.jallinone.items.java.ItemTypeVO

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.