Returns the necessary html code for the tool subgroups.<p>

@param wp the jsp page to write the code to

@return html code
968297
public String groupHtml(CmsWorkplace wp) {

        List<CmsTool> subTools = OpenCms.getWorkplaceManager().getToolManager().getToolsForPath(
            wp,
            getHandler().getPath(),
            false);
        Iterator<CmsTool> itSubTools = subTools.iterator();
        m_container.clear();
        while (itSubTools.hasNext()) {
            CmsTool subTool = itSubTools.next();
            // locate group
            CmsToolGroup group = null;
            String groupName = CmsToolMacroResolver.resolveMacros(subTool.getHandler().getGroup(), wp);

            // in the parent tool
            group = getToolGroup(groupName);
            if (group == null) {
                // if does not exist, create it
                String gid = "group" + getToolGroups().size();
                group = new CmsToolGroup(gid, groupName);
                addToolGroup(group, subTool.getHandler().getPosition());
            }

            // add to group
            group.addAdminTool(subTool, subTool.getHandler().getPosition());

        }

        StringBuffer html = new StringBuffer(512);
        Iterator<CmsToolGroup> itHtml = getToolGroups().iterator();
        while (itHtml.hasNext()) {
            CmsToolGroup group = itHtml.next();
            html.append(group.groupHtml(wp));
        }
        return CmsToolMacroResolver.resolveMacros(html.toString(), wp);
    }
45249
public CmsTool getCurrentTool(CmsWorkplace wp) {

        return resolveAdminTool(getCurrentRoot(wp).getKey(), getCurrentToolPath(wp));
    }
627415
public String getJsp() {

        if (m_functionBean == null) {
            return "";
        }
        Format format = m_functionBean.getMainFormat();
        CmsDynamicFunctionFormatWrapper wrapper = new CmsDynamicFunctionFormatWrapper(m_cms, format);
        return wrapper.getJsp();
    }
843271
@HtmlSafe
	public String getBodyHtml()
	{
		String body = execution.getResults().trim();

		return body.replaceAll("<html>", "").replaceAll("</html>", "");
	}
37764
public String generateNavBar(String toolPath, CmsWorkplace wp) {

        if (toolPath.equals(getBaseToolPath(wp))) {
            return "<div class='pathbar'>&nbsp;</div>\n";
        }
        CmsTool adminTool = resolveAdminTool(getCurrentRoot(wp).getKey(), toolPath);
        String html = A_CmsHtmlIconButton.defaultButtonHtml(
            CmsHtmlIconButtonStyleEnum.SMALL_ICON_TEXT,
            "nav" + adminTool.getId(),
            adminTool.getHandler().getName(),
            null,
            false,
            null,
            null,
            null);
        String parent = toolPath;
        while (!parent.equals(getBaseToolPath(wp))) {
            parent = getParent(wp, parent);
            adminTool = resolveAdminTool(getCurrentRoot(wp).getKey(), parent);
            if (adminTool == null) {
                break;
            }
            String id = "nav" + adminTool.getId();
            String link = linkForToolPath(wp.getJsp(), parent, adminTool.getHandler().getParameters(wp));
            String onClic = "openPage('" + link + "');";
            String buttonHtml = A_CmsHtmlIconButton.defaultButtonHtml(
                CmsHtmlIconButtonStyleEnum.SMALL_ICON_TEXT,
                id,
                adminTool.getHandler().getName(),
                adminTool.getHandler().getHelpText(),
                true,
                null,
                null,
                onClic);
            html = "<span>" + buttonHtml + NAVBAR_SEPARATOR + "</span>" + html;
        }
        html = CmsToolMacroResolver.resolveMacros(html, wp);
        html = CmsEncoder.decode(html);
        html = CmsToolMacroResolver.resolveMacros(html, wp);
        html = "<div class='pathbar'>\n" + html + "</div>\n";
        return html;
    }
1100332
protected Content getFramesJavaScript() {
        HtmlTree scriptTree = HtmlTree.SCRIPT();
        String scriptCode = "\n" +
                "    tmpTargetPage = \"\" + window.location.search;\n" +
                "    if (tmpTargetPage != \"\" && tmpTargetPage != \"undefined\")\n" +
                "        tmpTargetPage = tmpTargetPage.substring(1);\n" +
                "    if (tmpTargetPage.indexOf(\":\") != -1 || (tmpTargetPage != \"\" && !validURL(tmpTargetPage)))\n" +
                "        tmpTargetPage = \"undefined\";\n" +
                "    targetPage = tmpTargetPage;\n" +
                "    function validURL(url) {\n" +
                "        try {\n" +
                "            url = decodeURIComponent(url);\n" +
                "        }\n" +
                "        catch (error) {\n" +
                "            return false;\n" +
                "        }\n" +
                "        var pos = url.indexOf(\".html\");\n" +
                "        if (pos == -1 || pos != url.length - 5)\n" +
                "            return false;\n" +
                "        var allowNumber = false;\n" +
                "        var allowSep = false;\n" +
                "        var seenDot = false;\n" +
                "        for (var i = 0; i < url.length - 5; i++) {\n" +
                "            var ch = url.charAt(i);\n" +
                "            if ('a' <= ch && ch <= 'z' ||\n" +
                "                    'A' <= ch && ch <= 'Z' ||\n" +
                "                    ch == '$' ||\n" +
                "                    ch == '_' ||\n" +
                "                    ch.charCodeAt(0) > 127) {\n" +
                "                allowNumber = true;\n" +
                "                allowSep = true;\n" +
                "            } else if ('0' <= ch && ch <= '9'\n" +
                "                    || ch == '-') {\n" +
                "                if (!allowNumber)\n" +
                "                     return false;\n" +
                "            } else if (ch == '/' || ch == '.') {\n" +
                "                if (!allowSep)\n" +
                "                    return false;\n" +
                "                allowNumber = false;\n" +
                "                allowSep = false;\n" +
                "                if (ch == '.')\n" +
                "                     seenDot = true;\n" +
                "                if (ch == '/' && seenDot)\n" +
                "                     return false;\n" +
                "            } else {\n" +
                "                return false;\n" +
                "            }\n" +
                "        }\n" +
                "        return true;\n" +
                "    }\n" +
                "    function loadFrames() {\n" +
                "        if (targetPage != \"\" && targetPage != \"undefined\")\n" +
                "             top.classFrame.location = top.targetPage;\n" +
                "    }\n";
        RawHtml scriptContent = new RawHtml(scriptCode.replace("\n", DocletConstants.NL));
        scriptTree.addContent(scriptContent);
        return scriptTree;
    }
1281395
public Map<String, String[]> initAdminTool() throws CmsRoleViolationException {

        Map<String, String[]> params = new HashMap<String, String[]>(getParameterMap());
        // initialize
        getToolManager().initParams(this);

        // adjust parameters if called as default
        if (!useNewStyle()) {
            params.put(PARAM_STYLE, new String[] {CmsToolDialog.STYLE_NEW});
            setParamStyle(CmsToolDialog.STYLE_NEW);
        }

        try {
            // a dialog just to access the close link parameter
            CmsDialog wp = (CmsDialog)this;
            // set close link
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(wp.getParamCloseLink())) {
                if (!getToolManager().getBaseToolPath(this).equals(getToolManager().getCurrentToolPath(this))) {
                    Map<String, String[]> args = getToolManager().resolveAdminTool(
                        getParamRoot(),
                        getParentPath()).getHandler().getParameters(wp);
                    wp.setParamCloseLink(CmsToolManager.linkForToolPath(getJsp(), getParentPath(), args));
                    params.put(CmsDialog.PARAM_CLOSELINK, new String[] {wp.getParamCloseLink()});
                }
            }
        } catch (Exception e) {
            // ignore
        }

        if (!getToolManager().getCurrentTool(this).getHandler().isEnabled(this)) {
            throw new CmsRoleViolationException(Messages.get().container(Messages.ERR_ADMIN_INSUFFICIENT_RIGHTS_0));
        }

        return params;
    }
484261
public String getCurrentToolPath(CmsWorkplace wp) {

        CmsToolUserData userData = getUserData(wp);
        String path = getBaseToolPath(wp);
        if (userData != null) {
            path = userData.getCurrentToolPath(getCurrentRoot(wp).getKey());
        }
        return path;
    }
856221
private void convertHTMLCode(ArrayList<ArrayList<TextPiece>> wordsByPage) {
	DocInfo docInfo = new DocInfo();
	String[] html2Char = docInfo.getHtml2CharMapping(); // Only define this
							    // mapping string
							    // when we detect
							    // the files in HTML
							    // codes
	int pageNum = 0;

	for (ArrayList<TextPiece> wordsOfAPage : wordsByPage) {
	    pageNum++;
	    for (int i = 0; i < wordsOfAPage.size(); i++) {
		TextPiece currentWord = wordsOfAPage.get(i);
		String realText = "";
		String textinHTMLCode = currentWord.getText();

	    }
	}
    }
1347530
public String getHtmlMenudesc()
    {
        Record recMenu = this.getMainRecord();
        if (recMenu.getField(MenusModel.COMMENT).getLength() > 0)
            return recMenu.getField(MenusModel.COMMENT).toString();
        else
            return super.getHtmlMenudesc();
    }
1283838
public String htmlMultiActionBar() {

        StringBuffer html = new StringBuffer(1024);
        html.append("<td class='misc'>\n");
        html.append("\t<div>\n");
        Iterator<CmsListMultiAction> itActions = m_multiActions.elementList().iterator();
        while (itActions.hasNext()) {
            CmsListMultiAction multiAction = itActions.next();
            html.append("\t\t");
            html.append(multiAction.buttonHtml());
            if (itActions.hasNext()) {
                html.append("&nbsp;&nbsp;");
            }
            html.append("\n");
        }
        html.append("\t</div>\n");
        html.append("</td>\n");
        return html.toString();
    }
377304
private String getResourcesHTML(CmsPublishJobBase job) throws CmsException {

        String ret = "";
        if (job instanceof CmsPublishJobEnqueued) {
            //job is enqueued ->go over publish list
            List<CmsResource> resources = ((CmsPublishJobEnqueued)job).getPublishList().getAllResources();
            for (CmsResource res : resources) {
                ret += res.getRootPath() + "<br/>";
            }
        } else {
            //job is running or finished
            List<CmsPublishedResource> resources = A_CmsUI.getCmsObject().readPublishedResources(
                job.getPublishHistoryId());
            for (CmsPublishedResource res : resources) {
                ret += res.getRootPath() + "<br/>";
            }
        }
        return ret;
    }
973956
public String generateHtml() {

        StringBuffer result = new StringBuffer(2048);
        result.append(htmlStart(null));
        result.append(CmsListExplorerColumn.getExplorerStyleDef());
        result.append(bodyStart("dialog", null));
        result.append(dialogStart());
        result.append(dialogContentStart(getParamTitle()));
        result.append(m_list.printableHtml());
        result.append(dialogContentEnd());
        result.append(dialogEnd());
        result.append(bodyEnd());
        result.append(htmlEnd());
        return result.toString();
    }
1352507
function getHTMLWH(html) {
  const temp = document.createElement('template');
  const span = document.createElement('span');
  temp.innerHTML = html;
  document.body.appendChild(span);
  if (temp.content) {
    span.appendChild(temp.content, span.lastElementChild);
  } else {
    span.insertAdjacentHTML('beforeend', html);
  }
  span.style.position = 'absolute';
  span.style.zIndex = '-1';
  span.style.display = 'block';
  const whArray = getDomWH(span);
  const result = {
    width: whArray[0],
    height: whArray[1],
  };
  span.parentNode.removeChild(span);
  return result;
}
738078
public String getWholeText() {
	// dynamic load to support jre 1.4 and 1.5
	try {
	    Method m = section.getClass().getMethod("getWholeText", new Class[] {});
	    return Caster.toString(m.invoke(section, ArrayUtil.OBJECT_EMPTY));
	}
	catch (Exception e) {
	    throw new PageRuntimeException(Caster.toPageException(e));
	}
    }
733050
protected String defaultActionHtmlContent() {

        StringBuffer result = new StringBuffer(2048);
        result.append("<table id='twolists' cellpadding='0' cellspacing='0' align='center' width='100%'>\n");
        Iterator<A_CmsListDialog> i = m_wps.iterator();
        while (i.hasNext()) {
            A_CmsListDialog wp = i.next();
            result.append("\t<tr>\n");
            result.append("\t\t<td valign='top'>\n");
            result.append("\t\t\t").append(wp.defaultActionHtmlContent()).append("\n");
            result.append("\t\t</td>\n");
            result.append("\t</tr>\n");
            result.append("\t<tr><td height='20'/></tr>\n");
        }
        result.append("</table>\n");
        return result.toString();
    }
1226008
public String html() {
        StringBuilder sb = StringUtil.borrowBuilder();
        try {
            html(sb, (new Document("")).outputSettings()); // output settings a bit funky, but this html() seldom used
        } catch (IOException e) { // ought never happen
            throw new SerializationException(e);
        }
        return StringUtil.releaseBuilder(sb);
    }