Package org.jallinone.warehouse.java

Examples of org.jallinone.warehouse.java.InventoryItemVO


   * @param row selected row index
   * @param attributeName attribute name that identifies the selected grid column
   * @return <code>true</code> if the selected cell is editable, <code>false</code> otherwise
   */
  public boolean isCellEditable(GridControl grid,int row,String attributeName) {
    InventoryItemVO vo = (InventoryItemVO)grid.getVOListTableModel().getObjectForRow(row);
    if (attributeName.equals("realQtyWAR07") ||
        attributeName.equals("realProgressiveHie01WAR07"))
      return vo.getStateWAR07().equals(ApplicationConsts.CONFIRMED);
    return super.isCellEditable(grid,row,attributeName);
  }
View Full Code Here


   * Callback method invoked when the user has clicked on the insert button
   * @param valueObject empty value object just created: the user can manage it to fill some attribute values
   */
  public void createValueObject(ValueObject valueObject) throws Exception {
    InventoryVO inventoryVO = frame.getInventory();
    InventoryItemVO vo = (InventoryItemVO)valueObject;
    vo.setCompanyCodeSys01WAR07(inventoryVO.getCompanyCodeSys01WAR06());
    vo.setProgressiveWar06WAR07(inventoryVO.getProgressiveWAR06());
    vo.setQtyWAR07(new BigDecimal(1));
    vo.setStateWAR07(ApplicationConsts.OPENED);
  }
View Full Code Here

   * @param newValue new cell value (just edited)
   * @return <code>true</code> if cell value is valid, <code>false</code> otherwise
   */
  public boolean validateCell(int rowNumber,String attributeName,Object oldValue,Object newValue) {
    if ("qtyWAR07".equals(attributeName) || "realQtyWAR07".equals(attributeName)) {
      InventoryItemVO vo = (InventoryItemVO)frame.getGrid().getVOListTableModel().getObjectForRow(rowNumber);
      if (vo.getQtyWAR07()!=null && vo.getRealQtyWAR07()!=null)
        vo.setDeltaQtyWAR07(vo.getRealQtyWAR07().subtract(vo.getQtyWAR07()));
    }
    return true;
  }
View Full Code Here

    return "insertInventoryItem";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    InventoryItemVO vo = (InventoryItemVO)inputPar;
    try {
      Inventories bean = (Inventories)JAIOBeanFactory.getInstance().getBean(Inventories.class);
      vo = bean.insertInventoryItem(vo,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());

      return new VOResponse(vo);
View Full Code Here

    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

TOP

Related Classes of org.jallinone.warehouse.java.InventoryItemVO

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.