Examples of GridParams


Examples of org.openswing.swing.message.send.java.GridParams

  /**
   * Retrieve call-out types and fill in the call-out types combo box.
   */
  private void init() {
    Response res = ClientUtils.getData("loadItemTypes",new GridParams());
    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);

    res = ClientUtils.getData("loadCallOutTypes",new GridParams());
    d = new Domain("CALL_OUT_TYPES");
    if (!res.isError()) {
      CallOutTypeVO vo = null;
      itemTypes = ((VOListResponse)res).getRows();
      for(int i=0;i<itemTypes.size();i++) {
View Full Code Here

Examples of org.openswing.swing.message.send.java.GridParams

  /**
   * Retrieve call-out types and fill in the call-out types combo box.
   */
  private void init() {
    Response res = ClientUtils.getData("loadCallOutTypes",new GridParams());
    Domain d = new Domain("CALL_OUT_TYPES");
    if (!res.isError()) {
      CallOutTypeVO vo = null;
      list = ((VOListResponse)res).getRows();
      for(int i=0;i<list.size();i++) {
View Full Code Here

Examples of org.openswing.swing.message.send.java.GridParams

      if (validationPars.getLookupValidationParameters().get(ApplicationConsts.TASK_CODE_REG07)!=null) {
        sql += " and SCH01_EMPLOYEES.TASK_CODE_REG07='"+validationPars.getLookupValidationParameters().get(ApplicationConsts.TASK_CODE_REG07)+"'";
      }


      GridParams gridParams = new GridParams();

      // read from SCH01 table...
      Response answer = QueryUtil.getQuery(
          conn,
          new UserSessionParameters(username),
View Full Code Here

Examples of org.openswing.swing.message.send.java.GridParams

    return "loadEmployees";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    GridParams gridParams = (GridParams)inputPar;
    try {
      CustomizedWindows cust = ((JAIOUserSessionParameters)userSessionPars).getCustomizedWindows();
      ArrayList customizedFields = cust.getCustomizedFields(new BigDecimal(662));

      Employees bean = (Employees)JAIOBeanFactory.getInstance().getBean(Employees.class);
View Full Code Here

Examples of org.openswing.swing.message.send.java.GridParams

    return "loadEmployeeCalendar";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    GridParams gridParams = (GridParams)inputPar;
    try {

      Employees bean = (Employees)JAIOBeanFactory.getInstance().getBean(Employees.class);
      Response answer = bean.loadEmployeeCalendar(gridParams,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());
View Full Code Here

Examples of org.openswing.swing.message.send.java.GridParams

      public void forceValidate() {}

    });


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

          DetailSaleDocRowVO vo = (DetailSaleDocRowVO)detailPanel.getVOModel().getValueObject();
          vo.setItemCodeItm01DOC02(null);
          vo.setDescriptionSYS10(null);
          vo.setMinSellingQtyUmCodeReg02DOC02(null);
          vo.setVatCodeItm01DOC02(null);
          vo.setVatDescriptionDOC02(null);
          vo.setDeductibleReg01DOC02(null);
          vo.setValueReg01DOC02(null);
          vo.setValueSal02DOC02(null);
          vo.setQtyDOC02(null);

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

          detailPanel.pull(controlItemCode.getAttributeName());
          try {
            controlItemCode.validateCode(null);
          }
          catch (Exception ex) {
          }
        }
      }
    });

    // set buttons disabilitation...
    HashSet buttonsToDisable = new HashSet();
    buttonsToDisable.add(insertButton1);
    buttonsToDisable.add(editButton1);
    buttonsToDisable.add(deleteButton1);
    buttonsToDisable.add(copyButton1);
    detailPanel.addButtonsNotEnabled(buttonsToDisable,frame);
    grid.addButtonsNotEnabled(buttonsToDisable,frame);



    variantsPanel.setVariantsPanelController(new ProductVariantsPanelController() {

      public boolean validateCell(int rowNumber,int colNumber,String attributeName,Number oldValue,Number newValue) {

        if (newValue==null)
          return true;

        if (pricesMatrix!=null) {
          CustomValueObject vo = (CustomValueObject)pricesMatrix.get(rowNumber);
          Object lastPrice = null;
          Object currentPrice = null;
          try {
            lastPrice = CustomValueObject.class.getMethod("getAttributeNameN"+(colNumber-1),new Class[0]).invoke(vo,new Object[0]);
          }
          catch (Exception ex) {
          }
          Object[][] cells = variantsPanel.getCells();
          for(int i=0;i<cells.length;i++) {
            vo = (CustomValueObject)pricesMatrix.get(i);
            for(int j=0;j<cells[i].length;j++) {

              if (i==rowNumber && colNumber-1==j)
                continue;
              if (cells[i][j]==null)
                continue;

              try {
                currentPrice = CustomValueObject.class.getMethod("getAttributeNameN"+j,new Class[0]).invoke(vo,new Object[0]);
              }
              catch (Exception ex) {
              }
              if (currentPrice!=null && lastPrice==null ||
                  currentPrice==null && lastPrice!=null ||
                  currentPrice!=null && !currentPrice.equals(lastPrice)) {
                JOptionPane.showMessageDialog(
                    ClientUtils.getParentFrame(variantsPanel),
                    ClientSettings.getInstance().getResources().getResource("it is not allowed to insert variants having different unit prices"),
                    ClientSettings.getInstance().getResources().getResource("Attention"),
                    JOptionPane.WARNING_MESSAGE
                );
                return false;
              }
            } // end innner for
          } // end outer for

          if(lastPrice!=null) {
            controlPriceUnit.setValue(lastPrice);
            variantsPanel.getForm().getVOModel().setValue(controlPriceUnit.getAttributeName(),lastPrice);
          }
          else {
            lastPrice = ((PriceItemVO)variantsPanel.getLookupController().getLookupVO()).getValueSAL02();
            controlPriceUnit.setValue(lastPrice);
            variantsPanel.getForm().getVOModel().setValue(controlPriceUnit.getAttributeName(),lastPrice);
          }
        }

        return true;
      }

      public void loadDataCompleted(boolean error) {
        if (!error) {
          // load also variants prices, if available...
          GridParams gridParams = new GridParams();
          gridParams.getOtherGridParams().put(ApplicationConsts.VARIANTS_MATRIX_VO,variantsPanel.getVariantsMatrixVO());
//          gridParams.getOtherGridParams().put(ApplicationConsts.PRICELIST,parentVO.getPricelistCodeSal01DOC01());
          gridParams.getOtherGridParams().put(ApplicationConsts.PRICELIST,controlPricelistCode.getValue());
          Response res = ClientUtils.getData("loadVariantsPrices",gridParams);
          if (!res.isError()) {
            pricesMatrix = ((VOListResponse)res).getRows();
          }
          else
View Full Code Here

Examples of org.openswing.swing.message.send.java.GridParams

      ArrayList values = new ArrayList();
      values.add(serverLanguageId);
      values.add(serverLanguageId);

      GridParams gridParams = new GridParams();

      // read from ACC04 table...
      Response answer = CustomizeQueryUtil.getQuery(
          conn,
          new UserSessionParameters(username),
View Full Code Here

Examples of org.openswing.swing.message.send.java.GridParams

    return "loadVatRegisters";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    GridParams gridParams = (GridParams)inputPar;
    try {
      CustomizedWindows cust = ((JAIOUserSessionParameters)userSessionPars).getCustomizedWindows();
      ArrayList customizedFields = cust.getCustomizedFields(ApplicationConsts.ID_VAT_REGISTERS);

      VatRegisters bean = (VatRegisters)JAIOBeanFactory.getInstance().getBean(VatRegisters.class);
View Full Code Here

Examples of org.openswing.swing.message.send.java.GridParams

      });


      // set item types in call-out items grid...
      Response res = ClientUtils.getData("loadItemTypes",new GridParams());
      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);


      // set document types in doc.type column...
      res = ClientUtils.getData("loadDocumentTypes",new GridParams());
      d = new Domain("DOC_TYPES_DOC16");
      if (!res.isError()) {
        DocumentTypeVO vo = null;
        java.util.List list = ((VOListResponse)res).getRows();
        for(int i=0;i<list.size();i++) {
View Full Code Here

Examples of org.openswing.swing.message.send.java.GridParams

      });


      // set document types in doc.type column...
      Response res = ClientUtils.getData("loadDocumentTypes",new GridParams());
      Domain d = new Domain("DOC_TYPES_DOC16");
      if (!res.isError()) {
        DocumentTypeVO vo = null;
        java.util.List list = ((VOListResponse)res).getRows();
        for(int i=0;i<list.size();i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.