Package org.jallinone.items.java

Examples of org.jallinone.items.java.ItemToPrintVO


      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);
View Full Code Here



      HashMap params = new HashMap();
      params.put("REPORT_ID",reportId);

      ItemToPrintVO vo = (ItemToPrintVO)grid.getVOListTableModel().getObjectForRow(0);

      map = new HashMap();
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01());
      map.put(ApplicationConsts.FUNCTION_CODE_SYS06,"BARCODE_LABELS");
      map.put(ApplicationConsts.EXPORT_PARAMS,params);
      res = ClientUtils.getData("getJasperReport",map);
      if (!res.isError()) {
        JasperPrint print = (JasperPrint)((VOResponse)res).getVo();
View Full Code Here

  void insertButton_actionPerformed(ActionEvent e) {
    try {
      if (controlItemCode.getValue()!=null &&
          controlQty.getValue()!=null) {
        ItemToPrintVO vo = (ItemToPrintVO)itemPanel.getVOModel().getValueObject();
        Object[][] cells = variantsPanel.getCells();
        if (cells==null) {
          try {
            vo = (ItemToPrintVO) vo.clone();
          }
          catch (CloneNotSupportedException ex) {
          }
          vo.setVariantTypeItm06(ApplicationConsts.JOLLY);
          vo.setVariantTypeItm07(ApplicationConsts.JOLLY);
          vo.setVariantTypeItm08(ApplicationConsts.JOLLY);
          vo.setVariantTypeItm09(ApplicationConsts.JOLLY);
          vo.setVariantTypeItm10(ApplicationConsts.JOLLY);
          vo.setVariantCodeItm11(ApplicationConsts.JOLLY);
          vo.setVariantCodeItm12(ApplicationConsts.JOLLY);
          vo.setVariantCodeItm13(ApplicationConsts.JOLLY);
          vo.setVariantCodeItm14(ApplicationConsts.JOLLY);
          vo.setVariantCodeItm15(ApplicationConsts.JOLLY);
          vo.setQty( (BigDecimal)controlQty.getValue() );
          rows.add(vo);
          grid.reloadData();
        }
        else {
          Object[] row = null;
          VariantsMatrixRowVO rowVO = null;
          VariantsMatrixColumnVO colMatrixVO = null;
          VariantsMatrixVO matrixVO = variantsPanel.getVariantsMatrixVO();
          String descr = vo.getDescriptionSYS10();
          for(int i=0;i<cells.length;i++) {
            row = cells[i];
            for(int j=0;j<row.length;j++) {
              if (cells[i][j]!=null) {
                BigDecimal qty = null;
                try {
                  qty = (BigDecimal) cells[i][j];
                }
                catch (Exception ex2) {
                  qty = new BigDecimal(0);
                }
                if (qty.intValue()>0) {
                  try {
                    vo = (ItemToPrintVO) vo.clone();
                  }
                  catch (CloneNotSupportedException ex) {
                  }
                  vo.setQty(qty);
                  rowVO = (VariantsMatrixRowVO) matrixVO.getRowDescriptors()[i];
                  vo.setDescriptionSYS10(descr+" "+rowVO.getRowDescription());

                  if (variantsPanel.getVariantsMatrixVO().getColumnDescriptors().length==0) {
                    VariantsMatrixUtils.setVariantTypesAndCodes(vo,"",variantsPanel.getVariantsMatrixVO(),rowVO,null);
                  }
                  else {
                    colMatrixVO = (VariantsMatrixColumnVO )variantsPanel.getVariantsMatrixVO().getColumnDescriptors()[j];
                    VariantsMatrixUtils.setVariantTypesAndCodes(vo,"",variantsPanel.getVariantsMatrixVO(),rowVO,colMatrixVO);
                    vo.setDescriptionSYS10(vo.getDescriptionSYS10()+" "+colMatrixVO.getColumnDescription());
                  }


                  rows.add(vo);
                } // end if on qty >0
View Full Code Here

TOP

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

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.