Package org.xdams.utility

Examples of org.xdams.utility.TitleManager


      JspWriter out = pageContext.getOut();
      if (targetServlet.equals("")) {
        targetServlet = "_top";
      }
      TitleManager titleManager = new TitleManager(confBean.getTheXMLConfTitle());
      int numeroLivelli = hierPath.depth();
      String divHierPath = "";
      if (getHierMode().equals("")) {
        for (int i = 0; i < numeroLivelli - 1; i++) {
          int spaziatore = 18 * (i - 1);
          int theFatherTemp = hierPath.docNumber(i + 1);
          divHierPath += "<div class=\"hierPath\">";
          divHierPath += "<a href=\"" + pageContext.findAttribute("contextPath") + "/hier/" + workFlowBean.getAlias() + "/hierBrowser.html?docToggle=" + theFatherTemp + "&amp;docStart=" + theFatherTemp + "\" target=\"" + targetServlet + "\">";
          String strTitoloManager = titleManager.defaultParsedTitle(hierPath.getTitle(i + 1), "hierTitle");
          divHierPath += strTitoloManager;
          divHierPath += "</a>";
        }
        for (int i = 0; i < numeroLivelli - 1; i++) {
          divHierPath += "</div>";
        }
        out.println(divHierPath);
      } else if (getHierMode().equals("tooltip")) {
        for (int i = 0; i < numeroLivelli - 1; i++) {
          divHierPath += "<div class=\"hierPath\">";
          String strTitoloManager = titleManager.defaultParsedTitle(hierPath.getTitle(i + 1), "hierTitle");
          divHierPath += strTitoloManager;
        }
        for (int i = 0; i < numeroLivelli - 1; i++) {
          divHierPath += "</div>";
        }
View Full Code Here


      MultiEditingManager editingManager = new MultiEditingManager(req.getParameterMap(), confBean, userBean, workFlowBean);
      editingManager.setTheXML(new XMLBuilder(xwconn.getSingleXMLFromNumDoc(Integer.parseInt(physDoc)), "ISO-8859-1"));
      confBean = editingManager.rewriteMultipleConf(confControl);

      if (actionType.equals("cut") || actionType.equals("paste") || actionType.equals("no_rel") || actionType.equals("only_hier")) {
        TitleManager titleManager = new TitleManager(confBean.getTheXMLConfTitle());
      //  System.out.println("AjaxCutPasteCopyCommand.execute() getTheXMLConfTitle " + confBean.getTheXMLConfTitle().getXML("ISO-8859-1"));
        try {
          managingBean.setCutPhysDoc(Integer.parseInt(physDoc));
          String titoloDoc = xwconn.getTitleFromNumDoc(Integer.parseInt(physDoc));
          System.out.println("AjaxCutPasteCopyCommand.execute() titoloDoc " + titoloDoc);
          managingBean.setCutTitle(titoloDoc);
        } catch (Exception e) {
          e.printStackTrace();
        }
        String azioneDescr = "";
        if (actionType.equals("cut")) {
          azioneDescr = "tagliato";
        } else if (actionType.equals("paste")) {
          azioneDescr = "copiato";
        } else if (actionType.equals("no_rel")) {
          azioneDescr = "copiato";
        } else if (actionType.equals("only_hier")) {
          azioneDescr = "copiato";
        }

        String contenitoreIni = "\n<div class=\"cont_ul2\"><ul class=\"bottoniMenu\">";
        String string0 = "";
        String string1 = "";
        String string2 = "";
        if (!actionType.equals("no_rel")) {
          string0 = "<li><a href=\"#\" target=\"\" onclick=\"ajaxSetSessionDocsToCut('" + managingBean.getCutPhysDoc() + "','@@physDocToPaste@@','" + actionType + "_as_son','" + workFlowBean.getAlias() + "');\" >INC.FIGLIO</a></li>";
          string1 = "<li><a href=\"#\" target=\"\" onclick=\"ajaxSetSessionDocsToCut('" + managingBean.getCutPhysDoc() + "','@@physDocToPaste@@','" + actionType + "_as_before','" + workFlowBean.getAlias() + "');\" >INC.PRIMA</a></li>";
          string2 = "<li><a href=\"#\" target=\"\" onclick=\"ajaxSetSessionDocsToCut('" + managingBean.getCutPhysDoc() + "','@@physDocToPaste@@','" + actionType + "_as_after','" + workFlowBean.getAlias() + "');\" >INC.DOPO</a></li>";
        }

        String string3 = "";
        // if(actionType.equals("paste") || actionType.equals("no_rel")){
        if (actionType.equals("no_rel")) {
          actionType = "paste";
          string3 = "<li><a href=\"#\" target=\"\" onclick=\"ajaxSetSessionDocsToCut('" + managingBean.getCutPhysDoc() + "','@@physDocToPaste@@','" + actionType + "_as_norel','" + workFlowBean.getAlias() + "');\" >NO REL</a></li>";
        }

        String string4 = "<li><a href=\"#\" target=\"\" onclick=\"ajaxSetSessionDocsToCut('" + managingBean.getCutPhysDoc() + "','@@physDocToPaste@@','" + actionType + "_delete','" + workFlowBean.getAlias() + "');\" >ANNULLA</a></li>";
        String contenitoreEnd = "</ul></div><div class=\"cutPasteClazz\">elemento " + azioneDescr + " " + (titleManager.defaultParsedTitle(managingBean.getCutTitle(), "hierTitle")) + "</div>";
        String string = contenitoreIni + string0 + string1 + string2 + string3 + string4 + contenitoreEnd;
        ajaxBean.setStrXmlOutput(string);
        managingBean.setCutHtmlOutput(string);
        // managingBean.setCutHtmlOutput(managingBean.getCutHtmlOutput(String.valueOf(managingBean.getCutPhysDoc())));
      }
View Full Code Here

      if (qr.elements > 0) { /*
                   * se ha dei figli CALCOLO ESTREMI CRONOLOGICI
                   */
        try {
          TitleManager titleManager = new TitleManager(confBean.getTheXMLConfTitle());
          String normalDatePath = confBean.getTheXMLConfQuery().valoreNodoNoEscape("/root/infoDoc/element[@type='normalDatePath']/text()");
          if (normalDatePath.equals("")) {
            normalDatePath = "/c/did/unittitle/unitdate";
          }
          String laSel = qr.id;
          String ilMaggiore = "";
          String ilMinore = "";
          String laFrase = "([?SEL]=\"" + laSel + "\") and not ([XML," + normalDatePath + "]=\"s.d.\")";
          String ordinamento = "";
          qr = xwconn.selectQR(laFrase);
          laSel = qr.id;
          java.util.Vector chiaviFrom = xwconn.selectFilteredKey(qr, "XML," + normalDatePath + "/#from", qr.elements, "down", "0");
          java.util.Vector chiaviTo = xwconn.selectFilteredKey(qr, "XML," + normalDatePath + "/#to", qr.elements, "up", "0");
          // System.out.println("chiaviFromchiaviFromchiaviFromchiaviFrom
          // "+chiaviFrom);
          // System.out.println("chiaviTochiaviTochiaviTochiaviTochiaviTo
          // "+chiaviTo);
          for (int i = 0; i < chiaviFrom.size(); i++) {
            Key key = (Key) chiaviFrom.elementAt(i);
            ilMinore = key.key.toString();
            if (!ilMinore.equals("00000000")) {
              break;
            }
          }

          for (int i = 0; i < chiaviTo.size(); i++) {
            Key key = (Key) chiaviTo.elementAt(i);
            ilMaggiore = key.key.toString();
          }

          laFrase = "([?SEL]=\"" + laSel + "\") and ([XML," + normalDatePath + "/#from]=\"" + ilMinore + "\")";
          ordinamento = "XML(xpart:" + normalDatePath + "/@normal)";
          qr = xwconn.selectQR(laFrase, ordinamento, it.highwaytech.broker.ServerCommand.find_SORT, -1);

          for (int i = 0; i < qr.elements; i++) {
            it.highwaytech.db.Title ilTitolo = xwconn.getTitle(xwconn.connection, xwconn.getTheDb(), qr, i);
            String ilTitoloString = ilTitolo.getTitle();
            String laData = titleManager.defaultParsedTitle(ilTitoloString, "dataTitle");
            if (!(laData.trim()).equals("")) {
              ilMinore = titleManager.defaultParsedTitle(ilTitoloString, "defaultTitle");
              break;
            }
          }

          laFrase = "([?SEL]=\"" + laSel + "\") and ([XML," + normalDatePath + "/#to]=\"" + ilMaggiore + "\")";
          ordinamento = "xml(xpart:" + normalDatePath + "/@normal)";
          qr = xwconn.selectQR(laFrase, ordinamento, it.highwaytech.broker.ServerCommand.find_SORT, -1);

          it.highwaytech.db.Title ilTitolo = xwconn.getTitle(xwconn.connection, xwconn.getTheDb(), qr, qr.elements - 1);
          String ilTitoloString = ilTitolo.getTitle();

          String laData = titleManager.defaultParsedTitle(ilTitoloString, "dataTitle");
          if (!(laData.trim()).equals("")) {
            ilMaggiore = titleManager.defaultParsedTitle(ilTitoloString, "defaultTitle");
          }

          if (!ilMinore.trim().equals("")) {
            valori += "<li>Elemento collegato con data minore: <strong>" + ilMinore + "</strong></li>";
          }
View Full Code Here

TOP

Related Classes of org.xdams.utility.TitleManager

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.