Package org.openbravo.erpCommon.utility

Examples of org.openbravo.erpCommon.utility.ComboTableData


      log4j.debug("Output: dataSheet");
    XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
        "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument();

    StringBuffer resultado = new StringBuffer();
    ComboTableData comboTableData = null;
    boolean isRelatedProjectType = false;
    FieldProvider[] data = null;

    String strCProjectTypeID = vars.getStringParameter("inpcProjecttypeId");
    String strWindowId = vars.getStringParameter("inpwindowId");

    resultado.append("var calloutName='SL_Project_Type';\n\n");
    resultado.append("var respuesta = new Array(");

    if (!strCProjectTypeID.isEmpty()) {
      try {
        comboTableData = new ComboTableData(vars, this, "19", "C_ProjectType_ID", "", "", Utility
            .getReferenceableOrg(vars, vars.getStringParameter("inpadOrgId")), Utility.getContext(
            this, vars, "#User_Client", strWindowId), 0);
        comboTableData.fillParameters(null, strWindowId, "");
        data = comboTableData.select(false);
      } catch (Exception ex) {
        throw new ServletException(ex);
      }

      if (data != null && data.length != 0) {
View Full Code Here


      String PaymentTerm = (strIsSOTrx.equals("Y") ? data[0].cPaymenttermId
          : data[0].poPaymenttermId);
      resultado.append("new Array(\"inpcPaymenttermId\", \"" + PaymentTerm + "\"),");
      FieldProvider[] tdv = null;
      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR",
            "C_BPartner_Location_ID", "", "C_BPartner Location - Bill To", Utility.getContext(this,
                vars, "#AccessibleOrgTree", strWindowId), Utility.getContext(this, vars,
                "#User_Client", strWindowId), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, strWindowId, "");
        tdv = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }

      resultado.append("new Array(\"inpcBpartnerLocationId\", ");
      if (tdv != null && tdv.length > 0) {
        resultado.append("new Array(");
        for (int i = 0; i < tdv.length; i++) {
          resultado.append("new Array(\"" + tdv[i].getField("id") + "\", \""
              + FormatUtilities.replaceJS(tdv[i].getField("name")) + "\", \""
              + (tdv[i].getField("id").equalsIgnoreCase(strLocation) ? "true" : "false") + "\")");
          if (i < tdv.length - 1)
            resultado.append(",\n");
        }
        resultado.append("\n)");
      } else
        resultado.append("null");
      resultado.append("\n),");
      resultado.append("new Array(\"inpsalesrepId\", ");
      FieldProvider[] tld = null;
      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "",
            "AD_User SalesRep", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
                "SEInvoiceBPartner"), Utility.getContext(this, vars, "#User_Client",
                "SEInvoiceBPartner"), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, "SEInvoiceBPartner", "");
        tld = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }

      if (tld != null && tld.length > 0) {
        resultado.append("new Array(");
        for (int i = 0; i < tld.length; i++) {
          resultado.append("new Array(\"" + tld[i].getField("id") + "\", \""
              + FormatUtilities.replaceJS(tld[i].getField("name")) + "\", \""
              + (tld[i].getField("id").equalsIgnoreCase(strUserRep) ? "true" : "false") + "\")");
          if (i < tld.length - 1)
            resultado.append(",\n");
        }
        resultado.append("\n)");
      } else
        resultado.append("null");
      resultado.append("\n),");
      resultado.append("new Array(\"inpcProjectId\", \"\"),");
      resultado.append("new Array(\"inpcProjectId_R\", \"\"),");
      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_User_ID",
            "", "AD_User C_BPartner User/Contacts", Utility.getContext(this, vars,
                "#AccessibleOrgTree", strWindowId), Utility.getContext(this, vars, "#User_Client",
                strWindowId), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, strWindowId, "");
        tdv = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }

      resultado.append("new Array(\"inpcBpartnerContactId\", ");
      if (tdv != null && tdv.length > 0) {
        resultado.append("new Array(");
        for (int i = 0; i < tdv.length; i++) {
          resultado.append("new Array(\"" + tdv[i].getField("id") + "\", \""
              + FormatUtilities.replaceJS(tdv[i].getField("name")) + "\", \""
              + (tdv[i].getField("id").equalsIgnoreCase(strContact) ? "true" : "false") + "\")");
          if (i < tdv.length - 1)
            resultado.append(",\n");
        }
        resultado.append("\n)");
      } else
        resultado.append("null");
      resultado.append("\n),");

      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_User_ID",
            "", "AD_User C_BPartner User/Contacts", Utility.getContext(this, vars,
                "#AccessibleOrgTree", strWindowId), Utility.getContext(this, vars, "#User_Client",
                strWindowId), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, strWindowId, "");
        tdv = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }
View Full Code Here

    if (strPUOM.startsWith("\""))
      strPUOM = strPUOM.substring(1, strPUOM.length() - 1);
    if (vars.getLanguage().equals("en_US")) {
      FieldProvider[] tld = null;
      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "",
            "M_Product_UOM", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
                "SLOrderProduct"),
            Utility.getContext(this, vars, "#User_Client", "SLOrderProduct"), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, "SLOrderProduct", "");
        tld = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }

      if (tld != null && tld.length > 0) {
        resultado.append("new Array(");
        for (int i = 0; i < tld.length; i++) {
          resultado.append("new Array(\"" + tld[i].getField("id") + "\", \""
              + FormatUtilities.replaceJS(tld[i].getField("name")) + "\", \""
              + (tld[i].getField("id").equalsIgnoreCase(strPUOM) ? "true" : "false") + "\")");
          if (i < tld.length - 1)
            resultado.append(",\n");
        }
        resultado.append("\n)");
      } else
        resultado.append("null");
      resultado.append("\n),");
    } else {
      FieldProvider[] tld = null;
      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "",
            "M_Product_UOM", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
                "SLOrderProduct"),
            Utility.getContext(this, vars, "#User_Client", "SLOrderProduct"), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, "SLOrderProduct", "");
        tld = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }
View Full Code Here

                + "\")\n");
        }
        // Added by gorkaion remove when feature request 4350 is done
        FieldProvider[] l = null;
        try {
          ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "",
              "C_Order InvoiceRule", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
                  "SLOrderDocType"), Utility.getContext(this, vars, "#User_Client",
                  "SLOrderDocType"), 0);
          Utility.fillSQLParameters(this, vars, null, comboTableData, "SLOrderDocType", "");
          l = comboTableData.select(false);
          comboTableData = null;
        } catch (Exception ex) {
          throw new ServletException(ex);
        }
        resultado.append(", new Array(\"inpinvoicerule\", ");
View Full Code Here

      message.append(Utility.messageBD(this, "NoBPLocation", vars.getLanguage()));
    }

    FieldProvider[] tdv = null;
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR",
          "C_BPartner_Location_ID", "", "C_BPartner Location - Ship To", Utility.getContext(this,
              vars, "#AccessibleOrgTree", strWindowId), Utility.getContext(this, vars,
              "#User_Client", strWindowId), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, strWindowId, "");
      tdv = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    resultado.append("new Array(\"inpcBpartnerLocationId\", ");
    if (tdv != null && tdv.length > 0) {
      resultado.append("new Array(");
      for (int i = 0; i < tdv.length; i++) {
        resultado.append("new Array(\"" + tdv[i].getField("id") + "\", \""
            + FormatUtilities.replaceJS(tdv[i].getField("name")) + "\", \""
            + (tdv[i].getField("id").equalsIgnoreCase(strLocation) ? "true" : "false") + "\")");
        if (i < tdv.length - 1)
          resultado.append(",\n");
      }
      resultado.append("\n)");
    } else
      resultado.append("null");
    resultado.append("\n),");
    FieldProvider[] td = null;
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "M_Warehouse_ID",
          "", "", Utility.getContext(this, vars, "#AccessibleOrgTree", strWindowId), Utility
              .getContext(this, vars, "#User_Client", strWindowId), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, strWindowId, "");
      td = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    resultado.append("new Array(\"inpmWarehouseId\", ");
    if (td != null && td.length > 0) {
      resultado.append("new Array(");
      for (int i = 0; i < td.length; i++) {
        resultado.append("new Array(\"" + td[i].getField("id") + "\", \""
            + FormatUtilities.replaceJS(td[i].getField("name")) + "\", \""
            + (td[i].getField("id").equalsIgnoreCase(strMwarehouse) ? "true" : "false") + "\")");
        if (i < td.length - 1)
          resultado.append(",\n");
      }
      resultado.append("\n)");
    } else
      resultado.append("null");
    resultado.append("\n),");
    resultado.append("new Array(\"inpsalesrepId\", ");
    FieldProvider[] tld = null;
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "",
          "AD_User SalesRep", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
              "SEOrderBPartner"),
          Utility.getContext(this, vars, "#User_Client", "SEOrderBPartner"), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, "SEOrderBPartner", "");
      tld = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    if (tld != null && tld.length > 0) {
      resultado.append("new Array(");
      for (int i = 0; i < tld.length; i++) {
        resultado.append("new Array(\"" + tld[i].getField("id") + "\", \""
            + FormatUtilities.replaceJS(tld[i].getField("name")) + "\", \""
            + (tld[i].getField("id").equalsIgnoreCase(strUserRep) ? "true" : "false") + "\")");
        if (i < tld.length - 1)
          resultado.append(",\n");
      }
      resultado.append("\n)");
    } else
      resultado.append("null");
    resultado.append("\n),");
    FieldProvider[] l = null;
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "",
          "C_Order InvoiceRule", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
              "SEOrderBPartner"),
          Utility.getContext(this, vars, "#User_Client", "SEOrderBPartner"), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, "SEOrderBPartner", "");
      l = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    resultado.append("new Array(\"inpinvoicerule\", ");
    if (l != null && l.length > 0) {
      resultado.append("new Array(");
      for (int i = 0; i < l.length; i++) {
        resultado.append("new Array(\"" + l[i].getField("id") + "\", \""
            + FormatUtilities.replaceJS(l[i].getField("name")) + "\", \""
            + (l[i].getField("id").equalsIgnoreCase(strInvoiceRule) ? "true" : "false") + "\")");
        if (i < l.length - 1)
          resultado.append(",\n");
      }
      resultado.append("\n)");
    } else
      resultado.append("null");
    resultado.append("\n),");
    resultado.append("new Array(\"inpcProjectId\", \"\"),");
    resultado.append("new Array(\"inpcProjectId_R\", \"\"),");
    FieldProvider[] tlv = null;
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "",
          "C_BPartner Location", "C_BPartner Location - Bill To", Utility.getContext(this, vars,
              "#AccessibleOrgTree", strWindowId), Utility.getContext(this, vars, "#User_Client",
              strWindowId), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, strWindowId, "");
      tlv = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    resultado.append("new Array(\"inpbilltoId\", ");
    if (tlv != null && tlv.length > 0) {
      resultado.append("new Array(");
      for (int i = 0; i < tlv.length; i++) {
        resultado.append("new Array(\"" + tlv[i].getField("id") + "\", \""
            + FormatUtilities.replaceJS(tlv[i].getField("name")) + "\", \""
            + (tlv[i].getField("id").equalsIgnoreCase(strLocation) ? "true" : "false") + "\")");
        if (i < tlv.length - 1)
          resultado.append(",\n");
      }
      resultado.append("\n)");
    } else
      resultado.append("null");
    resultado.append("\n),");
    resultado.append("new Array(\"inppaymentrule\", \"" + strPaymentrule + "\"),");
    resultado.append("new Array(\"inpcPaymenttermId\", \""
        + (strPaymentterm.equals("") ? SEOrderBPartnerData.selectPaymentTerm(this, Utility
            .getContext(this, vars, "#User_Client", strWindowId)) : strPaymentterm) + "\"),");
    resultado.append("new Array(\"inpdeliveryrule\", ");
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "",
          "C_Order DeliveryRule", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
              "SEOrderBPartner"),
          Utility.getContext(this, vars, "#User_Client", "SEOrderBPartner"), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, "SEOrderBPartner", "");
      l = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    if (strIsSOTrx.equals("N")) {
      resultado.append("\"")
          .append(
              (strDeliveryRule.equals("") ? ((l != null && l.length > 0) ? l[0].getField("id")
                  : "null") : strDeliveryRule)).append("\"");
    } else {
      if (l != null && l.length > 0) {
        resultado.append("new Array(");
        for (int i = 0; i < l.length; i++) {
          resultado.append("new Array(\"" + l[i].getField("id") + "\", \""
              + FormatUtilities.replaceJS(l[i].getField("name")) + "\", \""
              + (l[i].getField("id").equalsIgnoreCase(strDeliveryRule) ? "true" : "false") + "\")");
          if (i < l.length - 1)
            resultado.append(",\n");
        }
        resultado.append("\n)");
      } else
        resultado.append("null");
    }
    resultado.append("\n),");
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_User_ID", "",
          "AD_User C_BPartner User/Contacts", Utility.getContext(this, vars, "#AccessibleOrgTree",
              strWindowId), Utility.getContext(this, vars, "#User_Client", strWindowId), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, strWindowId, "");
      tdv = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
View Full Code Here

    // String strmProductUOMId =
    // SLOrderProductData.strMProductUOMID(this,strMProductID,strUOM);

    FieldProvider[] tld = null;
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "", "M_Product_UOM",
          "", Utility.getContext(this, vars, "#AccessibleOrgTree", "SLOrderProduct"), Utility
              .getContext(this, vars, "#User_Client", "SLOrderProduct"), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, "SLOrderProduct", "");
      tld = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
View Full Code Here

    resultado.append("var calloutName='SL_InOut_BPartner';\n\n");
    resultado.append("var respuesta = new Array(");

    FieldProvider[] tdv = null;
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR",
          "C_BPartner_Location_ID", "", "C_BPartner Location - Ship To", Utility.getContext(this,
              vars, "#AccessibleOrgTree", strWindowId), Utility.getContext(this, vars,
              "#User_Client", strWindowId), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, strWindowId, "");
      tdv = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    resultado.append("new Array(\"inpcBpartnerLocationId\", ");
    if (tdv != null && tdv.length > 0) {
      resultado.append("new Array(");
      for (int i = 0; i < tdv.length; i++) {
        resultado.append("new Array(\"" + tdv[i].getField("id") + "\", \""
            + FormatUtilities.replaceJS(Replace.replace(tdv[i].getField("name"), "\"", "\\\""))
            + "\", \"" + (tdv[i].getField("id").equalsIgnoreCase(strLocation) ? "true" : "false")
            + "\")");
        if (i < tdv.length - 1)
          resultado.append(",\n");
      }
      resultado.append("\n)");
    } else
      resultado.append("null");
    resultado.append("\n),");
    resultado.append("new Array(\"inpsalesrepId\", ");
    FieldProvider[] tld = null;
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "SalesRep_ID",
          "AD_User SalesRep", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
              "SEOrderBPartner"),
          Utility.getContext(this, vars, "#User_Client", "SEOrderBPartner"), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, "SEOrderBPartner", "");
      tld = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    if (tld != null && tld.length > 0) {
      resultado.append("new Array(");
      for (int i = 0; i < tld.length; i++) {
        resultado.append("new Array(\"" + tld[i].getField("id") + "\", \""
            + FormatUtilities.replaceJS(tld[i].getField("name")) + "\", \""
            + (tld[i].getField("id").equalsIgnoreCase(strUserRep) ? "true" : "false") + "\")");
        if (i < tld.length - 1)
          resultado.append(",\n");
      }
      resultado.append("\n)");
    } else
      resultado.append("null");
    resultado.append("\n),");
    resultado.append("new Array(\"inpcProjectId\", \"\"),");
    resultado.append("new Array(\"inpcProjectId_R\", \"\"),");
    try {
      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_User_ID", "",
          "AD_User C_BPartner User/Contacts", Utility.getContext(this, vars, "#AccessibleOrgTree",
              strWindowId), Utility.getContext(this, vars, "#User_Client", strWindowId), 0);
      Utility.fillSQLParameters(this, vars, null, comboTableData, strWindowId, "");
      tdv = comboTableData.select(false);
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
View Full Code Here

    String strmProductUOMId = SLGlobalUseProductData.strMProductUOMID(this, strMProductID,
        strProductUom);
    if (vars.getLanguage().equals("en_US")) {
      FieldProvider[] tld = null;
      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "",
            "M_Product_UOM", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
                "SLOrderProduct"),
            Utility.getContext(this, vars, "#User_Client", "SLOrderProduct"), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, "SLOrderProduct", "");
        tld = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }

      if (tld != null && tld.length > 0) {
        resultado.append("new Array(");
        for (int i = 0; i < tld.length; i++) {
          resultado.append("new Array(\"" + tld[i].getField("id") + "\", \""
              + FormatUtilities.replaceJS(tld[i].getField("name")) + "\", \""
              + (tld[i].getField("id").equalsIgnoreCase(strmProductUOMId) ? "true" : "false")
              + "\")");
          if (i < tld.length - 1)
            resultado.append(",\n");
        }
        resultado.append("\n)");
      } else
        resultado.append("null");
      resultado.append("\n),");
    } else {
      FieldProvider[] tld = null;
      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "",
            "M_Product_UOM", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
                "SLOrderProduct"),
            Utility.getContext(this, vars, "#User_Client", "SLOrderProduct"), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, "SLOrderProduct", "");
        tld = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }
View Full Code Here

      String strHasSecondaryUOM = SLRequisitionLineProductData.hasSecondaryUOM(this, strMProductID);
      resultado.append("new Array(\"inphasseconduom\", " + strHasSecondaryUOM + "),\n");
      resultado.append("new Array(\"inpmProductUomId\", ");
      FieldProvider[] tld = null;
      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR",
            "M_Product_UOM_ID", "", "M_Product_UOM_ID", Utility.getContext(this, vars, "#AccessibleOrgTree",
                "SLRequisitionLineProduct"), Utility.getContext(this, vars, "#User_Client",
                "SLRequisitionLineProduct"), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, strTabId, "");
        tld = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }
View Full Code Here

      strPUOM = strPUOM.substring(1, strPUOM.length() - 1);
    resultado.append("new Array(\"inpmProductUomId\", ");
    if (vars.getLanguage().equals("en_US")) {
      FieldProvider[] tld = null;
      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "",
            "M_Product_UOM", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
                "SLInternalConsumptionProduct"), Utility.getContext(this, vars, "#User_Client",
                "SLInternalConsumptionProduct"), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, "SLInternalConsumptionProduct",
            "");
        tld = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }

      if (tld != null && tld.length > 0) {
        resultado.append("new Array(");
        for (int i = 0; i < tld.length; i++) {
          resultado.append("new Array(\"" + tld[i].getField("id") + "\", \""
              + FormatUtilities.replaceJS(tld[i].getField("name")) + "\", \""
              + ((tld[i].getField("id").equals(strPUOM)) ? "true" : "false") + "\")");
          if (i < tld.length - 1)
            resultado.append(",\n");
        }
        resultado.append("\n)");
      } else
        resultado.append("null");
      resultado.append("\n),");
    } else {
      FieldProvider[] tld = null;
      try {
        ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "",
            "M_Product_UOM", "", Utility.getContext(this, vars, "#AccessibleOrgTree",
                "SLInternalConsumptionProduct"), Utility.getContext(this, vars, "#User_Client",
                "SLInternalConsumptionProduct"), 0);
        Utility.fillSQLParameters(this, vars, null, comboTableData, "SLInternalConsumptionProduct",
            "");
        tld = comboTableData.select(false);
        comboTableData = null;
      } catch (Exception ex) {
        throw new ServletException(ex);
      }
View Full Code Here

TOP

Related Classes of org.openbravo.erpCommon.utility.ComboTableData

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.