Package org.openswing.swing.message.send.java

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


    return "loadRoleFunctionCompanies";
  }


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

      Roles bean = (Roles)JAIOBeanFactory.getInstance().getBean(Roles.class);
      Response answer = bean.loadRoleFunctionCompanies(params,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());
View Full Code Here


      attribute2dbField.put("accountTypeACC01","ACC01_LEDGER.ACCOUNT_TYPE");

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

      GridParams gridParams = new GridParams();

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

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

      GridParams gridParams = new GridParams();

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

    return LedgerVO.class;
  }


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

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

  /**
   * Retrieve comapnies list and fill in the companies combo box.
   */
  private void init() {
    Response res = ClientUtils.getData("loadCompanies",new GridParams());
    final Domain d = new Domain("COMPANIES");
    if (!res.isError()) {
      CompanyVO vo = null;
      java.util.List list = ((VOListResponse)res).getRows();
      for(int i=0;i<list.size();i++) {
View Full Code Here

   */
  public final void setEmployeeVO(DetailEmployeeVO empVO) {
    this.empVO = empVO;
    new Thread() {
      public void run() {
        GridParams gridParams = new GridParams();
        gridParams.getCurrentSortedColumns().add("startDateSCH07");
        gridParams.getCurrentSortedVersusColumns().add("ASC");
        gridParams.getOtherGridParams().put(ApplicationConsts.DATE_FILTER,currentDay);
        gridParams.getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_REG04,Day.this.empVO.getProgressiveReg04SCH01());
        Response res = ClientUtils.getData("loadEmployeeActivities",gridParams);
        if (res.isError()) {
          JOptionPane.showMessageDialog(
              MDIFrame.getInstance(),
              ClientSettings.getInstance().getResources().getResource(res.getErrorMessage()),
View Full Code Here

    else {
      empVO = (DetailEmployeeVO)((VOResponse)res).getVo();
    }

    // retrieve employee working hours...
    GridParams gridParams = new GridParams();
    gridParams.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,companyCodeSys01SYS03);
    gridParams.getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_REG04,progressiveReg04SYS03);
    res = ClientUtils.getData("loadEmployeeCalendar",gridParams);
    if (res.isError()) {
      JOptionPane.showMessageDialog(
          ClientUtils.getParentFrame(this),
          res.getErrorMessage(),
View Full Code Here

    controlActType.setDomainId("ACTIVITY_TYPE");
  }


  void findButton_actionPerformed(ActionEvent e) {
    GridParams gridPars = new GridParams();
    gridPars.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,empVO.getCompanyCodeSys01SCH01());
    gridPars.getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_REG04,empVO.getProgressiveReg04SCH01());
    if (controlFromDate.getValue()!=null)
      gridPars.getOtherGridParams().put(ApplicationConsts.START_DATE,controlFromDate.getValue());
    if (controlSubjectType.getValue()!=null && controlSubjectType.getValue().equals(ApplicationConsts.SUBJECT_ORGANIZATION))
      gridPars.getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_REG04_SUBJECT,filterOrgButton.getValue());
    else if (controlSubjectType.getValue()!=null && controlSubjectType.getValue().equals(ApplicationConsts.SUBJECT_PEOPLE))
      gridPars.getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_REG04_SUBJECT,filterPeopleButton.getValue());
    if (controlActType.getValue()!=null)
      gridPars.getOtherGridParams().put(ApplicationConsts.ACTIVITY_TYPE,"'"+controlActType.getValue()+"'");

    Response res = ClientUtils.getData("loadEmployeeActivities",gridPars);
    if (res.isError()) {
      JOptionPane.showMessageDialog(
          ClientUtils.getParentFrame(this),
View Full Code Here

      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());
          Response res = ClientUtils.getData("loadVariantsPrices",gridParams);
          if (!res.isError()) {
            pricesMatrix = ((VOListResponse)res).getRows();
          }
          else
View Full Code Here

  /**
   * Retrieve item types and fill in the item types combo box.
   */
  private void init() {
    Response res = ClientUtils.getData("loadAgentTypes",new GridParams());
    Domain d = new Domain("AGENT_TYPES");
    if (!res.isError()) {
      AgentTypeVO vo = null;
      java.util.List list = ((VOListResponse)res).getRows();
      for(int i=0;i<list.size();i++) {
View Full Code Here

TOP

Related Classes of org.openswing.swing.message.send.java.GridParams

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.