Package org.openswing.swing.message.receive.java

Examples of org.openswing.swing.message.receive.java.Response


      CustomizedWindows cust = ((JAIOUserSessionParameters)userSessionPars).getCustomizedWindows();
      ArrayList customizedFields = cust.getCustomizedFields(ApplicationConsts.ID_VAT_REGISTERS);

      VatRegisters bean = (VatRegisters)JAIOBeanFactory.getInstance().getBean(VatRegisters.class);
      ArrayList companiesList = ((JAIOUserSessionParameters)userSessionPars).getCompanyBa().getCompaniesList("ACC04");
      Response answer = bean.validateVatRegisterCode(validationPars,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername(),companiesList,customizedFields);

      return answer;
    }
    catch (Throwable ex) {
      Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while processing request",ex);
View Full Code Here


      });


      // 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++) {
          vo = (DocumentTypeVO)list.get(i);
          d.addDomainPair(vo.getProgressiveHie02DOC16(),vo.getDescriptionSYS10());
View Full Code Here

          if (e.getStateChange()==e.SELECTED) {
            // pre-set the code...
            HashMap map = new HashMap();
            map.put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
            map.put(ApplicationConsts.PARAM_CODE,ApplicationConsts.OPENING_ACCOUNT);
            Response res = ClientUtils.getData("loadUserParam",map);
            if (!res.isError()) {
              controlOCode.setValue( ((VOResponse)res).getVo() );
              oAccountController.forceValidate();
            }
          }
        }
View Full Code Here

    HashMap map = new HashMap();
    map.put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
    map.put(ApplicationConsts.DATE_FILTER,controlFromDate.getValue());
    map.put(ApplicationConsts.OPENING_ACCOUNT,controlOCode.getValue());
    Response res = ClientUtils.getData("openPAccounts",map);
    if (res.isError()) {
      JOptionPane.showMessageDialog(
          ClientUtils.getParentFrame(this),
          res.getErrorMessage(),
          ClientSettings.getInstance().getResources().getResource("Error"),
          JOptionPane.ERROR_MESSAGE
      );
    }
    else
View Full Code Here

  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    java.util.ArrayList list = (ArrayList)inputPar;
    try {

      VatRegisters bean = (VatRegisters)JAIOBeanFactory.getInstance().getBean(VatRegisters.class);
      Response answer = bean.deleteVatRegisters(list,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());

      return answer;
    }
    catch (Throwable ex) {
      Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while processing request",ex);
View Full Code Here

      String t1 = resources.getDateMask(Consts.TYPE_DATE);
      String t2 = resources.getResource("endorse vat from register");
      String t3 = resources.getResource("period");

      VatRegisters bean = (VatRegisters)JAIOBeanFactory.getInstance().getBean(VatRegisters.class);
      Response answer = bean.vatEndorse(map,t1,t2,t3,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());

      return answer;
    }
    catch (Throwable ex) {
      Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while processing request",ex);
View Full Code Here

      });


      // 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++) {
          vo = (DocumentTypeVO)list.get(i);
          d.addDomainPair(vo.getProgressiveHie02DOC16(),vo.getDescriptionSYS10());
View Full Code Here

      pos++;
    }
    else if (pos==1) {
      DbConnVO vo = createConn();
      vo.setCheckDbVersion(true);
      Response res = ClientUtils.getData("createConfigFile",vo);
      if (!res.isError()) {
        Boolean b = (Boolean)((VOResponse)res).getVo();
        if (b.booleanValue()) {

          pos=4;
          cardLayout1.show(mainPanel,"END");
          dxButton.setEnabled(false);
          exitButton.setEnabled(false);
          sxButton.setEnabled(false);
          endLabel.setText("Database structure creation has successfully completed.");
          dxButton.setText("End");
          dxButton.setEnabled(true);
          return;
        }
      }

      sxButton.setEnabled(true);
      cardLayout1.show(mainPanel,"APPSETUP");
      pos++;
      sxButton.setEnabled(true);
    }
    else if (pos==2) {
      if (companyCodeTF.getText().trim().length()==0) {
        JOptionPane.showMessageDialog(
            this,
            "You must specify a company code",
            "Error",
            JOptionPane.ERROR_MESSAGE
        );
        return;
      }
      if (companyDescrTF.getText().trim().length()==0) {
        JOptionPane.showMessageDialog(
            this,
            "You must specify a company description (e.g. corporate name...)",
            "Error",
            JOptionPane.ERROR_MESSAGE
        );
        return;
      }
      if (languageCodeTF.getText().trim().length()==0) {
        JOptionPane.showMessageDialog(
            this,
            "You must specify a language code (e.g. 'EN', 'IT', ...)",
            "Error",
            JOptionPane.ERROR_MESSAGE
        );
        return;
      }
      if (companyCodeTF.getText().trim().length()==0) {
        JOptionPane.showMessageDialog(
            this,
            "You must specify a language description (e.g. 'English', 'Italiano', ...)",
            "Error",
            JOptionPane.ERROR_MESSAGE
        );
        return;
      }
      if (adminPasswdTF.getText().trim().length()==0) {
        JOptionPane.showMessageDialog(
            this,
            "You must specify a password for administrator user",
            "Error",
            JOptionPane.ERROR_MESSAGE
        );
        return;
      }

      if (currencyCodeTF.getText().trim().length()==0) {
        JOptionPane.showMessageDialog(
            this,
            "You must specify a currency code",
            "Error",
            JOptionPane.ERROR_MESSAGE
        );
        return;
      }
      if (symbTF.getText().trim().length()==0) {
        JOptionPane.showMessageDialog(
            this,
            "You must specify a currency symbol",
            "Error",
            JOptionPane.ERROR_MESSAGE
        );
        return;
      }
      if (decSymTF.getText().trim().length()==0) {
        JOptionPane.showMessageDialog(
            this,
            "You must specify a decimal symbol for the currency",
            "Error",
            JOptionPane.ERROR_MESSAGE
        );
        return;
      }
      if (thTF.getText().trim().length()==0) {
        JOptionPane.showMessageDialog(
            this,
            "You must specify a thousand symbol for the currency",
            "Error",
            JOptionPane.ERROR_MESSAGE
        );
        return;
      }
      if (decTF.getText().trim().length()==0) {
        JOptionPane.showMessageDialog(
            this,
            "You must specify the number of decimal for the currency",
            "Error",
            JOptionPane.ERROR_MESSAGE
        );
        return;
      }
      pos++;
      cardLayout1.show(mainPanel,"VARIANTS");
    }
    else if (pos==3) {
      pos++;
      cardLayout1.show(mainPanel,"END");
      dxButton.setEnabled(false);
      exitButton.setEnabled(false);
      sxButton.setEnabled(false);
      new Thread() {
        public void run() {
          if (!saveSettings()) {
            cardLayout1.show(mainPanel,"DB");
            pos = 1;
            dxButton.setEnabled(true);
            exitButton.setEnabled(true);
            return;
          }
          endLabel.setText("Database structure creation has successfully completed.");
          dxButton.setText("End");
          dxButton.setEnabled(true);
        }
      }.start();
    }
    else if (pos==4) {
      setVisible(false);

      Response res = ClientUtils.getData("getBeansFactoryName",new Object[0]);
      if (res.isError()) {
          JOptionPane.showMessageDialog(
                  this,
                  res.getErrorMessage(),
                  "Error",
                  JOptionPane.ERROR_MESSAGE
              );
              return;
      }
View Full Code Here

      ServerResourcesFactory factory = (ServerResourcesFactory)context.getAttribute(Controller.RESOURCES_FACTORY);
      String serverLanguageId = ((JAIOUserSessionParameters)userSessionPars).getServerLanguageId();
      String t1 = factory.getResources(serverLanguageId).getResource("there is already another organization with the same corporate name.");

      Companies bean = (Companies)JAIOBeanFactory.getInstance().getBean(Companies.class);
      Response answer = bean.insertCompany(vo,t1,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());

      VariantDescriptionsVO d = new VariantDescriptionsVO();
      ((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().put(vo.getCompanyCodeSys01REG04(),d);

      return answer;
View Full Code Here

  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    JournalHeaderWithVatVO vo = (JournalHeaderWithVatVO)inputPar;
    try {
      InsertJournalItem bean = (InsertJournalItem)JAIOBeanFactory.getInstance().getBean(InsertJournalItem.class);
      Response answer = bean.insertJournalItem(vo,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());
      return answer;
    }
    catch (Throwable ex) {
      Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while processing request",ex);
      return new ErrorResponse(ex.getMessage());
View Full Code Here

TOP

Related Classes of org.openswing.swing.message.receive.java.Response

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.