Generates the HTML for the online help frameset or redirects to the help body, depending on the build frameset flag.<p>

@return the HTML for the online help frameset or an empty String (redirect)
@throws IOException if redirection fails
974352
public String displayHelp() throws IOException {

        String result = "";
        // change to online project to allow static export / export links
        try {
            getJsp().getRequestContext().setCurrentProject(m_onlineProject);

            if (isBuildFrameset()) {
                // build the online help frameset
                result = displayFrameset();
            } else {
                // redirect to the help body
                StringBuffer bodyLink = new StringBuffer(8);
                bodyLink.append(TEMPLATEPATH);
                bodyLink.append("help_body.jsp?");
                bodyLink.append(CmsHelpTemplateBean.PARAM_HELPRESOURCE);
                bodyLink.append("=");
                bodyLink.append(getJsp().getRequestContext().getUri());
                bodyLink.append("&");
                bodyLink.append(CmsLocaleManager.PARAMETER_LOCALE);
                bodyLink.append("=");
                bodyLink.append(getLocale());
                // add the other parameters too!
                String bodyLinkWithParams = attachRequestString(bodyLink.toString());
                String redirectLink = getJsp().link(bodyLinkWithParams);
                // set back to current project
                getJsp().getResponse().sendRedirect(redirectLink);
            }
            return result;
        } finally {
            getJsp().getRequestContext().setCurrentProject(m_onlineProject);
        }
    }
1185928
public String getListHTML(String base,
                              boolean parent)
        throws IOException
    {
        if (!isDirectory())
            return null;
        
      
        String[] ls = list();
        if (ls==null)
            return null;
        Arrays.sort(ls);
        
        String title = "Directory: "+URI.decodePath(base);
        title=StringUtil.replace(StringUtil.replace(title,"<","&lt;"),">","&gt;");
        StringBuffer buf=new StringBuffer(4096);
        buf.append("<HTML><HEAD><TITLE>");
        buf.append(title);
        buf.append("</TITLE></HEAD><BODY>\n<H1>");
        buf.append(title);
        buf.append("</H1><TABLE BORDER=0>");
        
        if (parent)
        {
            buf.append("<TR><TD><A HREF=");
            buf.append(URI.encodePath(URI.addPaths(base,"../")));
            buf.append(">Parent Directory</A></TD><TD></TD><TD></TD></TR>\n");
        }
        
        DateFormat dfmt=DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
                                                       DateFormat.MEDIUM);
        for (int i=0 ; i< ls.length ; i++)
        {   
            String encoded=URI.encodePath(ls[i]);
            Resource item = addPath(encoded);
            
            buf.append("<TR><TD><A HREF=\"");
            
            String path=URI.addPaths(base,encoded);
            
            if (item.isDirectory() && !path.endsWith("/"))
                path=URI.addPaths(path,"/");
            buf.append(path);
            buf.append("\">");
            buf.append(StringUtil.replace(StringUtil.replace(ls[i],"<","&lt;"),">","&gt;"));
            buf.append("&nbsp;");
            buf.append("</TD><TD ALIGN=right>");
            buf.append(item.length());
            buf.append(" bytes&nbsp;</TD><TD>");
            buf.append(dfmt.format(new Date(item.lastModified())));
            buf.append("</TD></TR>\n");
        }
        buf.append("</TABLE>\n");
	buf.append("</BODY></HTML>\n");
        
        return buf.toString();
    }
687565
public String displayBody() {

        StringBuffer result = new StringBuffer(256);

        // change to online project to allow static export
        try {
            getJsp().getRequestContext().setCurrentProject(m_onlineProject);
            result.append(buildHtmlHelpStart("onlinehelp.css", true));
            result.append("<body>\n");
            result.append("<a name=\"top\"></a>\n");
            result.append("<table class=\"helpcontent\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n");
            result.append("<tr>\n");
            result.append("\t<td class=\"helpnav\">\n");
            result.append(
                "\t\t<a class=\"navhelphead\" href=\"javascript:top.body.location.href=top.head.homeLink;\">");
            result.append(key(Messages.GUI_HELP_NAVIGATION_HEAD_0));
            result.append("</a>\n");
            result.append(buildHtmlHelpNavigation());
            result.append("</td>\n");
            result.append("\t<td class=\"helpcontent\">\n");
            result.append("\t\t<h1>");
            result.append(
                getJsp().property(
                    CmsPropertyDefinition.PROPERTY_TITLE,
                    getParamHelpresource(),
                    key(Messages.GUI_HELP_FRAMESET_TITLE_0)));
            result.append("</h1>\n");
            // print navigation if property template-elements is set to sitemap
            result.append(getJsp().getContent(getParamHelpresource(), "body", getLocale()));
            try {
                // additionally allow appending content of dynamic pages whose path may be specified
                // as value of property PROPERTY_TEMPLATE_ELEMENTS (currently sitemap.jsp and search.jsp are used)
                CmsProperty elements = getCms().readPropertyObject(
                    getParamHelpresource(),
                    CmsPropertyDefinition.PROPERTY_TEMPLATE_ELEMENTS,
                    false);
                if (!elements.isNullProperty()) {
                    try {
                        // trigger an exception here as getContent won't throw anything!
                        getJsp().getCmsObject().readFile(elements.getValue());
                        // Ok, ressource exists: switsch from the online project to turn of static export links.
                        String elementName = elements.getValue();
                        // check, wether the "dynamic resource" wants to be exported or not:
                        boolean export = false;
                        CmsProperty exportProp = getCms().readPropertyObject(
                            elementName,
                            CmsPropertyDefinition.PROPERTY_EXPORT,
                            true);

                        if (!exportProp.isNullProperty()) {
                            export = Boolean.valueOf(exportProp.getValue(CmsStringUtil.FALSE)).booleanValue();
                        }
                        if (!export) {
                            // switch back from online project to avoid export:
                            getJsp().getRequestContext().setCurrentProject(m_offlineProject);
                        }
                        result.append(getJsp().getContent(elements.getValue()));

                    } catch (Throwable t) {
                        CmsVfsResourceNotFoundException e2 = new CmsVfsResourceNotFoundException(
                            Messages.get().container(
                                Messages.GUI_HELP_ERR_CONTENT_APPEND_2,
                                getParamHelpresource(),
                                elements.getValue(),
                                CmsPropertyDefinition.PROPERTY_TEMPLATE_ELEMENTS),
                            t);
                        throw e2;
                    }
                }
            } catch (CmsException e1) {

                if (LOG.isErrorEnabled()) {
                    LOG.error(e1);
                }
                result.append("<br>\n<div class=\"dialogerror\">");
                // getLocale() does not work in this context!?!
                result.append(e1.getMessageContainer().key(Locale.GERMAN));
                result.append("</div>");
            }
            result.append("\t</td>\n");
            result.append("</tr>\n");
            result.append("</table>\n");
            result.append(buildHtmlHelpEnd());
            return result.toString();
        } finally {
            getJsp().getRequestContext().setCurrentProject(m_offlineProject);
        }
    }
353714
protected String defaultActionHtml() {

        StringBuffer result = new StringBuffer(32);

        result.append(htmlStart());
        result.append(bodyStart(null));
        result.append(dialogStart());
        result.append(dialogContentStart(""));
        result.append("<form name=\"main\" class=\"nomargin\" action=\"");
        result.append(getJsp().link(getDialogReturnUri()));
        result.append("\" method=\"post\" onsubmit=\"submitAction('");
        result.append(DIALOG_OK);
        result.append("', null, 'main');\" enctype=\"multipart/form-data\">\n");
        result.append(paramsAsHidden());
        if (getParamFramename() == null) {
            result.append("<input type=\"hidden\" name=\"");
            result.append(PARAM_FRAMENAME);
            result.append("\" value=\"\">");
        }
        result.append(createDialogErrorMessage());
        result.append(dialogBlockStart(getStarttext()));
        result.append("<table border=\"0\" width=\"100%\">\n");
        result.append("<tr>\n\t<td style=\"white-space: nowrap;\" unselectable=\"on\">");
        result.append(getImportMessage());
        result.append(":</td>\n");
        result.append("\t<td class=\"maxwidth\">");
        result.append("<input type=\"file\" name=\"");
        result.append(PARAM_IMPORTFILE);
        result.append("\" class=\"maxwidth\" accept=\"application/zip\">");
        result.append("</td>\n</tr>");
        result.append(getAdditionalParameters());
        result.append("</table>\n");
        result.append(dialogBlockEnd());

        result.append(dialogContentEnd());
        result.append(dialogButtonsOkCancel());
        result.append("</form>\n");
        result.append(dialogEnd());
        result.append(bodyEnd());
        result.append(htmlEnd());
        return result.toString();
    }
194614
public void doGet(HttpServletRequest request, HttpServletResponse response) 
        throws ServletException, IOException
    {
        response.setContentType("text/html");
        response.setHeader("Pragma", "no-cache");
        response.setHeader("Cache-Control", "no-cache,no-store");

        String url=request.getParameter("URL");
        if (url!=null && url.length()>0)
        {
            response.sendRedirect(url);
        }
        else
        {
            PrintWriter pout = response.getWriter();
            Page page=null;
            
            try{
                page = new Page();
                page.title("SendRedirect Servlet");     
                
                page.add(new Heading(1,"SendRedirect Servlet"));
                
                page.add(new Heading(1,"Form to generate Dump content"));
                TableForm tf = new TableForm
                    (response.encodeURL(URI.addPaths(request.getContextPath(),
                                                     request.getServletPath())+
                                        "/action"));
                tf.method("GET");
                tf.addTextField("URL","URL",40,request.getContextPath()+"/dump");
                tf.addButton("Redirect","Redirect");
                page.add(tf);
                page.write(pout);
                pout.close();
            }
            catch (Exception e)
            {
                log.warn(LogSupport.EXCEPTION,e);
            }
        }
    }
473551
protected String defaultActionHtmlContent() {

        StringBuffer result = new StringBuffer(2048);
        result.append("<form name=\"EDITOR\" id=\"EDITOR\" method=\"post\" action=\"").append(getDialogRealUri());
        result.append("\" class=\"nomargin\" onsubmit=\"return submitAction('").append(DIALOG_OK).append(
            "', null, 'EDITOR');\">\n");
        result.append(dialogContentStart(getDialogTitle()));
        result.append(buildDialogForm());
        result.append(dialogContentEnd());
        result.append(dialogButtonsCustom());
        result.append(paramsAsHidden());
        if (getParamFramename() == null) {
            result.append("\n<input type=\"hidden\" name=\"").append(PARAM_FRAMENAME).append("\" value=\"\">\n");
        }
        result.append("</form>\n");
        result.append(getWidgetHtmlEnd());
        return result.toString();
    }
1305594
function getHelpHTML() {
  if (HelpHTML) return HelpHTML

  var helpFile = path.join(__dirname, utils.COMMAND + ".help.txt" )
  var content  = fs.readFileSync(helpFile, "utf8")

  var homepage = "<a href='" + utils.HOMEPAGE + "'>" + utils.HOMEPAGE + "</a>"

  content = content.replace(/%COMMAND%/g,     utils.COMMAND    )
  content = content.replace(/%PACKAGE%/g,     utils.PACKAGE    )
  content = content.replace(/%VERSION%/g,     utils.VERSION    )
  content = content.replace(/%DESCRIPTION%/g, utils.DESCRIPTION)
  content = content.replace(/%HOMEPAGE%/g,    homepage   )

  HelpHTML = "<pre>" + content + "</pre>"
  return HelpHTML
}
382193
@Override
    public void setHTML(final String html) {
        getElement().setInnerHTML(SourceCodeHelper.parseCode(html).asString());
    }
671418
protected void generateHelpFile() throws DocFileIOException {
        String title = configuration.getText("doclet.Window_Help_title");
        HtmlTree body = getBody(true, getWindowTitle(title));
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
                ? HtmlTree.HEADER()
                : body;
        addTop(htmlTree);
        addNavLinks(true, htmlTree);
        if (configuration.allowTag(HtmlTag.HEADER)) {
            body.addContent(htmlTree);
        }
        addHelpFileContents(body);
        if (configuration.allowTag(HtmlTag.FOOTER)) {
            htmlTree = HtmlTree.FOOTER();
        }
        addNavLinks(false, htmlTree);
        addBottom(htmlTree);
        if (configuration.allowTag(HtmlTag.FOOTER)) {
            body.addContent(htmlTree);
        }
        printHtmlDocument(null, true, body);
    }
242975
protected void buildAllClassesFile(boolean wantFrames) throws IOException {
        String label = configuration.getText("doclet.All_Classes");
        Content body = getBody(false, getWindowTitle(label));
        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING,
                HtmlStyle.bar, allclassesLabel);
        body.addContent(heading);
        Content ul = new HtmlTree(HtmlTag.UL);
        // Generate the class links and add it to the tdFont tree.
        addAllClasses(ul, wantFrames);
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
                ? HtmlTree.MAIN(HtmlStyle.indexContainer, ul)
                : HtmlTree.DIV(HtmlStyle.indexContainer, ul);
        body.addContent(htmlTree);
        printHtmlDocument(null, false, body);
    }
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();
    }
471854
public Html getHtml() {
        if (html == null) {
            html = new Html(rawText, request.getUrl());
        }
        return html;
    }
417720
protected Content getFrameDetails() {
        HtmlTree frameset = HtmlTree.FRAMESET("20%,80%", null, "Documentation frame",
                "top.loadFrames()");
        if (noOfPackages <= 1) {
            addAllClassesFrameTag(frameset);
        } else if (noOfPackages > 1) {
            HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames",
                "top.loadFrames()");
            addAllPackagesFrameTag(leftFrameset);
            addAllClassesFrameTag(leftFrameset);
            frameset.addContent(leftFrameset);
        }
        addClassFrameTag(frameset);
        addFrameWarning(frameset);
        return frameset;
    }
984091
protected void generatePackageTreeFile() throws IOException {
        Content body = getPackageTreeHeader();
        Content headContent = getResource("doclet.Hierarchy_For_Package",
                Util.getPackageName(packagedoc));
        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
                HtmlStyle.title, headContent);
        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
        if (configuration.packages.length > 1) {
            addLinkToMainTree(div);
        }
        body.addContent(div);
        HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
        divTree.addStyle(HtmlStyle.contentContainer);
        addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree);
        addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree);
        addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
        addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree);
        body.addContent(divTree);
        addNavLinks(false, body);
        addBottom(body);
        printHtmlDocument(null, true, body);
    }
332013
public String htmlSource() {
        try {
            return driver.getPageSource();
        } catch (Exception e) {
            log.warn(e);
            return null;
        }
    }
34935
public function CreateHtml()
	{
		$className = $this->ClassName ;
		if ( !empty( $className ) )
			$className = ' class="' . $className . '"' ;

		$id = $this->Id ;
		if ( !empty( $id ) )
			$id = ' id="' . $id . '"' ;

		return '<iframe src="' . $this->_BuildUrl() . '" width="' . $this->Width . '" ' .
			'height="' . $this->Height . '"' . $className . $id . ' frameborder="0" scrolling="no"></iframe>' ;
	}
517471
public static String generatePageEndSimple() {

        StringBuffer result = new StringBuffer(128);
        result.append("</td></tr>\n");
        result.append("</table></div>\n");
        result.append("</body>\n</html>");
        return result.toString();
    }