/**
   * Returns a HTML with the description for the given node
   *
   * @param node
   * @return a HTML String with the description for the given node
   */
  public String getHTMLDescription(String node) {
    try {

      ModuleReferenceDataClientTreeData[] data =
          ModuleReferenceDataClientTreeData.selectDescription(conn, lang, node);
      String discard[] = {""};
      if (data != null
          && data.length > 0
          && data[0].linkname != null
          && !data[0].linkname.equals("")) data[0].statusName = "";
      if (data != null
          && data.length > 0
          && (data[0].updateAvailable == null || data[0].updateAvailable.equals("")))
        discard[0] = "update";

      XmlDocument xmlDocument =
          xmlEngine
              .readXmlTemplate("org/openbravo/erpCommon/modules/ModuleTreeDescription", discard)
              .createXmlDocument();
      xmlDocument.setData("structureDesc", data);
      return xmlDocument.print();

    } catch (Exception e) {
      e.printStackTrace();
      return "";
    }
  }
 /** sets to data the root tree */
 public void setRootTree() {
   try {
     data = ModuleReferenceDataClientTreeData.select(conn, (lang.equals("") ? "en_US" : lang));
     // addLinks();
     setLevel(0);
     setIcons();
   } catch (ServletException ex) {
     ex.printStackTrace();
     data = null;
   }
 }
 /**
  * Generates a subtree with nodeId as root node
  *
  * @param nodeId
  */
 public void setSubTree(String nodeId, String level) {
   setIsSubTree(true);
   try {
     data =
         ModuleReferenceDataClientTreeData.selectSubTree(
             conn, (lang.equals("") ? "en_US" : lang), nodeId);
     // addLinks();
     setLevel(new Integer(level).intValue());
     setIcons();
   } catch (ServletException ex) {
     ex.printStackTrace();
     data = null;
   }
 }