Package org.openswing.swing.form.client

Examples of org.openswing.swing.form.client.Form


          c = c.getParent();
        }
        if (c != null) {
          functionCode = ( (Form) c).getFunctionId();
        }
        final Form form = (Form)c;

        // set domain in combo box...
        ClientApplet applet = ( (ApplicationClientFacade) MDIFrame.getInstance().getClientFacade()).getMainClass();
        ButtonCompanyAuthorizations bca = applet.getAuthorizations().getCompanyBa();
        final ArrayList companiesList = bca.getCompaniesList(functionCode);
        Domain domain = new Domain("DOMAIN_" + functionCode);
        for (int i = 0; i < companiesList.size(); i++) {
          if (applet.getAuthorizations().getCompanyBa().isInsertEnabled(
              functionCode,companiesList.get(i).toString()
          ))
            domain.addDomainPair(companiesList.get(i),companiesList.get(i).toString());
        }
        super.setDomain(domain);

        if (applet.getAuthorizations().isOneCompany()) {
          new Thread() {
            public void run() {
              yield();

              CompaniesComboControl.this.getParent().remove(CompaniesComboControl.this);
              if (getLinkLabel() != null) {
                getLinkLabel().getParent().remove(getLinkLabel());
              }

              if (form!=null) {
                try {
                  if (form.getVOModel().getValueObject() == null) {
                    form.getVOModel().setValueObject((ValueObject)form.getVOModel().getValueObjectType().newInstance());
                  }
                }
                catch (Throwable ex1) {
                  ex1.printStackTrace();
                }
                if (companiesList.size()>0)
                  form.getVOModel().setValue(getAttributeName(),companiesList.get(0));
                try {
                  form.unbind(CompaniesComboControl.this);
                }
                catch (Exception ex) {
                  ex.printStackTrace();
                }
              }
View Full Code Here


          Container c = PurchaseSupplierHeadPanel.this.getParent();
          while (c != null && ! (c instanceof Form)) {
            c = c.getParent();
          }
          if (c != null) {
            Form form = (Form)c;
            DetailPurchaseDocVO vo = (DetailPurchaseDocVO)form.getVOModel().getValueObject();
            pricelistDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC06());
            pricelistDataLocator.getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_REG04,vo.getProgressiveReg04DOC06());
            pricelistDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC06());
            pricelistDataLocator.getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_REG04,vo.getProgressiveReg04DOC06());
          }
        }

        public void forceValidate() {}

      });


      // payment lookup...
      payDataLocator.setGridMethodName("loadPayments");
      payDataLocator.setValidationMethodName("validatePaymentCode");

      controlPaymentCode.setLookupController(payController);
      controlPaymentCode.setControllerMethodName("getPaymentsList");
      payController.setForm(form);
      payController.setLookupDataLocator(payDataLocator);
      payController.setFrameTitle("payments");
      payController.setLookupValueObjectClassName("org.jallinone.registers.payments.java.PaymentVO");
      payController.addLookup2ParentLink("paymentCodeREG10", "paymentCodeReg10DOC06");
      payController.addLookup2ParentLink("descriptionSYS10","paymentDescriptionDOC06");
      payController.setAllColumnVisible(false);
      payController.setVisibleColumn("paymentCodeREG10", true);
      payController.setVisibleColumn("descriptionSYS10", true);
      payController.setPreferredWidthColumn("descriptionSYS10", 250);
      payController.setFramePreferedSize(new Dimension(350,500));
      payController.addLookupListener(new LookupListener() {

        public void beforeLookupAction(org.openswing.swing.message.receive.java.ValueObject parentVO) {
          DetailPurchaseDocVO vo = (DetailPurchaseDocVO)form.getVOModel().getValueObject();
          payDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC06());
          payDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC06());
        }

        public void codeChanged(org.openswing.swing.message.receive.java.ValueObject parentVO,Collection parentChangedAttributes) {  }
View Full Code Here

TOP

Related Classes of org.openswing.swing.form.client.Form

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.