Generates the dialog starting html code.<p>

@return html code

@throws JspException if something goes wrong
439995
protected String defaultActionHtmlStart() throws JspException {

        StringBuffer result = new StringBuffer(2048);
        result.append(htmlStart("administration/index.html"));
        result.append("<script type=\"text/javascript\" src=\"").append(getResourceUri()).append(
            "editors/xmlcontent/edit.js\"></script>\n");
        result.append("<script type=\"text/javascript\" src=\"").append(getResourceUri()).append(
            "editors/xmlcontent/help.js\"></script>\n");
        result.append(getWidgetIncludes());
        result.append("<script type=\"text/javascript\">\n<!--\n");
        result.append("// flag indicating if form initialization is finished\n");
        result.append("var initialized = false;\n");
        result.append("// the OpenCms context path\n");
        result.append("var contextPath = \"").append(OpenCms.getSystemInfo().getOpenCmsContext()).append("\";\n\n");
        result.append("// action parameters of the form\n");
        result.append("var actionAddElement = \"").append(EDITOR_ACTION_ELEMENT_ADD).append("\";\n");
        result.append("var actionRemoveElement = \"").append(EDITOR_ACTION_ELEMENT_REMOVE).append("\";\n");
        result.append("function init() {\n");
        result.append(getWidgetInitCalls());
        result.append("\tsetTimeout(\"scrollForm();\", 200);\n");
        result.append("\tinitialized = true;\n");
        result.append("\twindow.onbeforeunload=exitEditor;\n");
        result.append("}\n\n");
        result.append("window.exitEditorCalled = false;\n");
        result.append("function exitEditor() {\n");
        result.append("\tif (window.exitEditorCalled) return;\n");
        result.append("\twindow.exitEditorCalled = true; \n");
        result.append("\ttry {\n");
        result.append("\t\t// close file selector popup if present\n");
        result.append("\t\tcloseTreeWin();\n");
        result.append("\t} catch (e) {}\n");
        result.append("}\n");
        result.append(getWidgetInitMethods());
        result.append("\n// -->\n</script>\n");
        result.append(bodyStart(null, "onload='init();'  onunload='exitEditor();'"));
        result.append(dialogStart());
        return result.toString();
    }
105196
public void displayDialog() throws Exception {

        initAdminTool();
        getToolManager().setCurrentToolPath(this, getParentPath());

        JspWriter out = getJsp().getJspContext().getOut();
        out.print(htmlStart());
        out.print(bodyStart(null));
        out.print("<form name='editor' method='post' target='_top' action='");
        out.print(getJsp().link("/system/workplace/editors/editor.jsp"));
        out.print("'>\n");
        out.print(allParamsAsHidden());
        out.print("</form>\n");
        out.print("<script type='text/javascript'>\n");
        out.print("document.forms['editor'].submit();\n");
        out.print("</script>\n");
        out.print(dialogContentStart(getParamTitle()));
        out.print(dialogContentEnd());
        out.print(dialogEnd());
        out.print(bodyEnd());
        out.print(htmlEnd());
    }
452738
protected String htmlBegin() {

        StringBuffer html = new StringBuffer(512);
        // help & confirmation text for actions if needed
        if (!isPrintable() && (m_visibleItems != null) && !m_visibleItems.isEmpty()) {
            Iterator<CmsListColumnDefinition> cols = getMetadata().getColumnDefinitions().iterator();
            while (cols.hasNext()) {
                CmsListColumnDefinition col = cols.next();
                Iterator<I_CmsListDirectAction> actions = col.getDirectActions().iterator();
                while (actions.hasNext()) {
                    I_CmsListDirectAction action = actions.next();
                    action.setItem(m_visibleItems.get(0));
                    html.append(action.helpTextHtml());
                    html.append(action.confirmationTextHtml());
                }
                Iterator<CmsListDefaultAction> defActions = col.getDefaultActions().iterator();
                while (defActions.hasNext()) {
                    I_CmsListDirectAction action = defActions.next();
                    action.setItem(m_visibleItems.get(0));
                    html.append(action.helpTextHtml());
                    html.append(action.confirmationTextHtml());
                }
            }
        }
        // start list code
        html.append("<div class='listArea'>\n");
        if (isBoxed()) {
            html.append(getWp().dialogBlock(CmsWorkplace.HTML_START, m_name.key(getWp().getLocale()), false));
        }
        html.append("\t\t<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n");
        html.append("\t\t\t<tr><td>\n");
        return html.toString();
    }
1042663
public function generateAndIncludeJavaScript()
    {
        $filePath = $this->assetHandlerConnectorManager->getFormzGeneratedFilePath() . '.js';

        $this->assetHandlerConnectorManager->createFileInTemporaryDirectory(
            $filePath,
            function () {
                return
                    // Form initialization code.
                    $this->getFormInitializationJavaScriptAssetHandler()
                        ->getFormInitializationJavaScriptCode() .
                    LF .
                    // Fields validation code.
                    $this->getFieldsValidationJavaScriptAssetHandler()
                        ->getJavaScriptCode() .
                    LF .
                    // Fields activation conditions code.
                    $this->getFieldsActivationJavaScriptAssetHandler()
                        ->getFieldsActivationJavaScriptCode() .
                    LF .
                    // Fields validation activation conditions code.
                    $this->getFieldsValidationActivationJavaScriptAssetHandler()
                        ->getFieldsValidationActivationJavaScriptCode();
            }
        );

        $this->includeJsFile(StringService::get()->getResourceRelativePath($filePath));

        return $this;
    }
501314
public int doEndTag() throws JspException
    {
        boolean usingDefault = false;
        boolean bypassEscape = false;

        String scriptId = null;
        ServletRequest req = pageContext.getRequest();
        Object labelObject = null;

        String labelValue = null;

        // if this is not client side binding, evalute the value
        if (_value != null)
            labelObject = _value;
        else {
            if (_defaultValue != null) {
                labelObject = _defaultValue;
                bypassEscape = HtmlUtils.containsEntity(_defaultValue.toString());
            }
            else {
                logger.warn(Bundle.getString("Tags_LabelExpressionNull", _value));
                labelObject = DEFAULT_NULL_TEXT;
            }
            usingDefault = true;
        }

        // we assume that tagId will over have override id if both
        // are defined.
        if (_state.id != null) {
            scriptId = renderNameAndId((HttpServletRequest) req, _state, null);
        }

        // push the evaluated expression when we are not client side bound...
        labelValue = (usingDefault && !_formatDefaultValue) ?
                labelObject.toString() : formatText(labelObject);

        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        // fully qualify the for attribute if it exists
        if (_state.forAttr != null) {
            _state.forAttr = getIdForTagId(_state.forAttr);

        }

        WriteRenderAppender writer = new WriteRenderAppender(pageContext);
        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.LABEL_TAG, req);
        br.doStartTag(writer, _state);

        // push the evaluated expression when we are not client side bound...
        //if (!usingDefault)
        //    labelValue = formatText(labelValue);

        if (!bypassEscape)
            filter(labelValue, writer, _escapeWhiteSpace);
        else
            write(labelValue);
        br.doEndTag(writer);

        if (scriptId != null)
            write(scriptId);

        localRelease();
        return EVAL_PAGE;
    }
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();
    }
385815
public int doStartTag() throws JspException
    {
        Object val = evaluateDataSource();
        _defaultSelections = (List) evaluateDefaultValue();

        // if there were expression errors report them
        if (hasErrors())
            return SKIP_BODY;

        buildMatch(val);
        if (hasErrors())
            return SKIP_BODY;


        _formatters = new ArrayList();
        _optionList = new ArrayList();

        // Walk the options data source
        _dynamicOptions = evaluateOptionsDataSource();
        if (_repeater) {
            _repCurStage = _order[0];
            boolean valid = doRepeaterAfterBody();
            if (!valid)
                return SKIP_BODY;
            DataAccessProviderStack.addDataAccessProvider(this, pageContext);
        }

        // Continue processing this page
        return EVAL_BODY_BUFFERED;
    }
1325530
public String dialog(int segment, String attributes) {

        if (segment == HTML_START) {
            StringBuffer html = new StringBuffer(512);
            if (useNewStyle()) {
                html.append(dialogTitle());
            }
            html.append("<table class=\"dialog\" cellpadding=\"0\" cellspacing=\"0\"");
            if (attributes != null) {
                html.append(" ");
                html.append(attributes);
            }
            html.append("><tr><td>\n<table class=\"dialogbox\" cellpadding=\"0\" cellspacing=\"0\">\n");
            html.append("<tr><td>\n");
            if (useNewStyle() && getToolManager().hasToolPathForUrl(getJsp().getRequestContext().getUri())) {
                html.append(getAdminTool().groupHtml(this));
            }
            return html.toString();
        } else {
            return "</td></tr></table>\n</td></tr></table>\n<p>&nbsp;</p>\n";
        }
    }
602273
public void displayDialog() throws Exception {

        initAdminTool();

        JspWriter out = getJsp().getJspContext().getOut();
        out.print(htmlStart());
        out.print(bodyStart(null));
        out.print("<form name='editor' method='post' target='_top' action='");
        out.print(getJsp().link("/system/workplace/editors/editor.jsp"));
        out.print("'>\n");
        out.print(paramsAsHidden());
        out.print("</form>\n");
        out.print("<script type='text/javascript'>\n");
        out.print("document.forms['editor'].submit();\n");
        out.print("</script>\n");
        out.print(bodyEnd());
        out.print(htmlEnd());
    }
180381
public int doStartTag()
            throws JspException {

        Tag parent = getParent();
        if (parent != null) {
            String s = Bundle.getString("TempExcp_ContainedTemplate");
            registerTagError(s,null);
            reportErrors();
            _fatalError = true;
            return SKIP_BODY;
        }

        ServletRequest req = pageContext.getRequest();
        _savedContext = (TemplateContext) req.getAttribute(TEMPLATE_SECTIONS);
        TemplateContext ctxt = new TemplateContext();
        req.setAttribute(TEMPLATE_SECTIONS,ctxt);

        return EVAL_BODY_INCLUDE;
    }
734815
@Override
    public String dialogBlockStart(String headline) {

        StringBuffer result = new StringBuffer(8);
        result.append("<tr><td colspan=\"5\">\n");
        result.append(super.dialogBlockStart(headline));
        return result.toString();
    }
1089329
public int doEndTag() throws JspException
    {
        ServletRequest req = pageContext.getRequest();

        String fmtErrors = null;
        if (_formatterError) {
            fmtErrors = getErrorsFromBody();
        }
        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        _state.disabled = isDisabled();

        //Create hidden field for state tracking
        ByRef ref = new ByRef();
        nameHtmlControl(_state, ref);

        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        // Only write out the hidden field if the select is not
        // disabled.  If it is disabled, then nothing will be posted
        // back from this.
        WriteRenderAppender writer = new WriteRenderAppender(pageContext);
        if (!_state.disabled) {
            _hiddenState.clear();
            String hiddenParamName = null;
            hiddenParamName = _state.name + OLDVALUE_SUFFIX;
            _hiddenState.name = hiddenParamName;
            _hiddenState.value = "true";

            TagRenderingBase hiddenTag = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_HIDDEN_TAG, req);
            hiddenTag.doStartTag(writer, _hiddenState);
            hiddenTag.doEndTag(writer);
            write("\n");
        }

        // Render any formatting errors that may have occurred.
        if (fmtErrors != null)
            write(fmtErrors);


        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.SELECT_TAG, req);
        br.doStartTag(writer, _state);

        // Render the content of the body, these would be the options
        if (_saveBody != null) {
            write(_saveBody);
        }

        // if we are repeating then the body contained the options so we can exit here
        if (_repeater) {

            if (hasErrors())
                return reportAndExit(EVAL_PAGE);

            br.doEndTag(writer);
            if (!ref.isNull())
                write((String) ref.getRef());

            // Continue processing this page
            localRelease();
            return EVAL_PAGE;
        }

        // All of the code below will pass through the optionsDataSource, the dataSource and defaultValue and
        // create a full Select.
        if (_dynamicOptions != null) {
            if (_dynamicOptions instanceof Map) {
                Map dynamicOptionsMap = (Map) _dynamicOptions;
                Iterator keyIterator = dynamicOptionsMap.keySet().iterator();
                while (keyIterator.hasNext()) {
                    Object optionValue = keyIterator.next();
                    String optionDisplay = null;
                    if (dynamicOptionsMap.get(optionValue) != null) {
                        optionDisplay = dynamicOptionsMap.get(optionValue).toString();
                    }

                    if (optionValue != null) {
                        addOption(req, optionValue.toString(), optionDisplay);
                    }
                }
            }
            else if (_dynamicOptions instanceof Iterator) {
                Iterator dynamicOptionsIterator = (Iterator) evaluateOptionsDataSource();
                while (dynamicOptionsIterator.hasNext()) {
                    Object o = dynamicOptionsIterator.next();
                    if (o != null) {
                        String optionValue = o.toString();
                        addOption(req, optionValue, optionValue);
                    }
                }
            }
        }

        // add the value from the DataSource and Default value
        addDatasourceIfNeeded(req);
        addDefaultsIfNeeded(req);
        if (_nullable && !isMultiple()) {
            String txt = (_nullableOptionText != null) ? _nullableOptionText : "";
            addOption(req, NULL_VALUE, txt);
        }

        br.doEndTag(writer);
        if (!ref.isNull())
            write((String) ref.getRef());

        // Continue processing this page
        localRelease();
        return EVAL_PAGE;
    }
394202
protected String defaultActionHtmlStart() {

        StringBuffer result = new StringBuffer(2048);
        result.append(htmlStart(null));
        result.append(getList().listJs());
        result.append(bodyStart("dialog", null));
        result.append(dialogStart());
        result.append(dialogContentStart(getParamTitle()));
        return result.toString();
    }
125852
@Override
	public int doStartTag() throws JspException {

		String string = null;
		Boolean bool = null;
		if (getBase64Expr() != null
				&& (bool = EvalHelper.evalBoolean("base64", getBase64Expr(), this, pageContext)) != null) {
			setBase64(bool);
		}

		if (getSrcExpr() != null
				&& (string = EvalHelper.evalString("srcExpr", getSrcExpr(), this, pageContext)) != null) {

			setSrc(string);
		}

		return super.doStartTag();
	}
371409
public static String generatePageEndExtended() {

        StringBuffer result = new StringBuffer(128);
        result.append("</div>\n");
        result.append("</body>\n");
        result.append("</html>\n");
        return result.toString();
    }
36091
@Override
    public int doStartTag() {

        if (CmsFlexController.isCmsRequest(pageContext.getRequest())) {
            m_paramState = new ParamState(
                CmsFlexController.getController(pageContext.getRequest()).getCurrentRequest());
            m_paramState.init();
        }
        return EVAL_BODY_BUFFERED;
    }
64192
private String prepareForStartOfJavascriptExecution(List<WebView> webViews) {
		webElementCreator.prepareForStart();

		WebChromeClient currentWebChromeClient = getCurrentWebChromeClient();

		if(currentWebChromeClient != null && !currentWebChromeClient.getClass().isAssignableFrom(RobotiumWebClient.class)){
			originalWebChromeClient = currentWebChromeClient;	
		}
		robotiumWebCLient.enableJavascriptAndSetRobotiumWebClient(webViews, originalWebChromeClient);
		return getJavaScriptAsString();
	}