Render the label.
@throws JspException if a JSP exception has occurred
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;
    }
986666
public void actionPreview() throws IOException, JspException {

        try {
            // save content of the editor to the temporary file
            performSaveContent(getParamElementname(), getElementLocale());
        } catch (CmsException e) {
            // show error page
            showErrorPage(this, e);
        }

        // redirect to the temporary file with current active element language
        String param = "?" + org.opencms.i18n.CmsLocaleManager.PARAMETER_LOCALE + "=" + getParamElementlanguage();
        sendCmsRedirect(getParamTempfile() + param);
    }
719863
@Override
	public void render() {
		final String callback = Request.getParam(callbackParamName, Response.DEFAULT_CALLBACK_NAME);
		this.text = StrUtil.format("{}({})", callback, this.text);
		super.render();
	}
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;
    }
275844
@Override
	public void render() {
		String text = this.getErrorContent();
		if(isHtml){
			Response.setStatus(getErrorCode());
			new HtmlView(text).render();
		}else{
			super.render();
		}
	}
430317
@Override
    public int doEndTag() throws JspException {
        try {
            // If we didn't expose a Reader earlier...
            if (varReader == null) {
                // ... store it in 'var', if available ...
                if (var != null) {
                    pageContext.setAttribute(var, acquireString(), scope);
                }
                // ... or simply output it, if we have nowhere to expose it
                else {
                    pageContext.getOut().print(acquireString());
                }
            }
            return EVAL_PAGE;
        } catch (IOException ex) {
            throw new JspTagException(ex.toString(), ex);
        }
    }
1079835
protected function RenderImpl()
    {

        if (strlen($this->title) > 0)
            $this->setAttribute("title", $this->title);

        $this->setSource();
    }
455596
@Override
	public void render() {
		try {
			final HttpServletRequest request = Request.getServletRequest();
			request.getRequestDispatcher(uri).forward(request, Response.getServletResponse());
		} catch (Exception e) {
			throw new RenderException("Forward to " + uri + " error!", e);
		}
	}
1202262
public int doEndTag() throws JspException
    {
        // report errors that may have occurred when the required attributes are being set
        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        // build the anchor into the results
        ByRef script = new ByRef();

        WriteRenderAppender writer = new WriteRenderAppender(pageContext);
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
        TagRenderingBase trb = TagRenderingBase.Factory.getRendering(TagRenderingBase.AREA_TAG, request);

        if (!createAnchorBeginTag(request, script, trb, writer, REQUIRED_ATTR)) {
            if (!script.isNull())
                write(script.getRef().toString());
            return reportAndExit(EVAL_PAGE);
        }

        assert(trb != null) : "trb is null";
        trb.doEndTag(writer);

        if (!script.isNull())
            write(script.getRef().toString());

        // Render the remainder to the output stream
        localRelease();
        return EVAL_PAGE;
    }
16894
public function render(Exception $e)
    {
        if ($e instanceof HttpResponseException) {
            /* error occurs */
            switch ($e->getCode()) {
                case HttpResponseException::ERR_NOTFOUND_CONTROLLER:
                case HttpResponseException::ERR_NOTFOUND_ACTION:
                case HttpResponseException::ERR_NOTFOUND_VIEW:
                    response()->setStatusCode(404);
                    echo htmlspecialchars($e->getMessage());
                    break;
                default :
                    echo 0, ':', htmlspecialchars($e->getMessage());
                    break;
            }
        } else {
            $this->convertExceptionToResponse($e);
        }
    }
955738
protected void renderLabel(AbstractRenderAppender writer, TreeElement node)
    {
        String label = node.getLabel();
        if (label != null) {
            renderLabelPrefix(writer, node);
            if (_trs.escapeContent) {
                HtmlUtils.filter(label, writer);
            }
            else {
                writer.append(label);
            }
            renderLabelSuffix(writer, node);
        }
    }
896763
public void render() throws IOException {

        I_CmsFormatterBean formatterConfig = OpenCms.getADEManager().getCachedFormatters(
            m_cms.getRequestContext().getCurrentProject().isOnlineProject()).getFormatters().get(
                m_element.getFormatterId());
        if (formatterConfig instanceof CmsFlexFormatterBean) {
            CmsFlexFormatterBean config = (CmsFlexFormatterBean)formatterConfig;
            String template = config.getStringTemplate();
            if (m_element.isInMemoryOnly()) {
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(config.getPlaceholderStringTemplate())) {
                    template = config.getPlaceholderStringTemplate();
                }
                if (config.getDefaultContentStructureId() != null) {
                    try {
                        CmsResource defaultContent = m_cms.readResource(
                            ((CmsMacroFormatterBean)formatterConfig).getDefaultContentStructureId());
                        CmsFile defaultFile = m_cms.readFile(defaultContent);
                        m_element = new CmsContainerElementBean(
                            defaultFile,
                            m_element.getFormatterId(),
                            m_element.getIndividualSettings(),
                            true,
                            m_element.editorHash(),
                            m_element.isCreateNew());
                    } catch (CmsException e) {
                        //      LOG.error("Error reading default content for new resource", e);
                    }
                }
            }
            try {
                Map<String, Object> context = new HashMap<String, Object>();
                context.put(KEY_SETTINGS, wrapSettings(m_cms, m_element.getSettings()));
                context.put(
                    KEY_FUNCTIONS,
                    CmsCollectionsGenericWrapper.createLazyMap(new CmsObjectFunctionTransformer(m_cms)));
                String output = renderTemplate(m_cms, template, m_element.getResource(), context);
                if (CmsJspTagEditable.isEditableRequest(m_request)) {
                    CmsHtmlValidator validator = new CmsHtmlValidator();
                    validator.validate(output);
                    if (!validator.isBalanced()) {
                        Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
                        String messages = "";
                        for (CmsMessageContainer message : validator.getMessages()) {
                            messages += message.key(locale) + "\n";
                        }
                        output = String.format(
                            ERROR_DISPLAY_WITH_DETAILS,
                            Messages.get().getBundle(locale).key(Messages.GUI_FORMATTER_RENDERING_ERROR_0),
                            formatterConfig.getJspRootPath(),
                            Messages.get().getBundle(locale).key(Messages.GUI_FORMATTER_RENDERING_NOT_WELL_FORMED_0),
                            messages);
                    } else if (validator.getRootElementCount() > 1) {
                        Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
                        output = String.format(
                            ERROR_DISPLAY,
                            Messages.get().getBundle(locale).key(Messages.GUI_FORMATTER_RENDERING_ERROR_0),
                            formatterConfig.getJspRootPath(),
                            Messages.get().getBundle(locale).key(
                                Messages.GUI_FORMATTER_RENDERING_MULTIPLE_ROOT_ELEMENTS_0));
                    }

                }
                m_context.getOut().print(output);
            } catch (Throwable t) {
                if (CmsJspTagEditable.isEditableRequest(m_request)) {
                    String stackTrace = "";
                    for (StackTraceElement element : t.getStackTrace()) {
                        stackTrace += element.toString() + "\n";
                    }
                    Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
                    m_context.getOut().println(
                        String.format(
                            ERROR_DISPLAY_WITH_DETAILS,
                            Messages.get().getBundle(locale).key(Messages.GUI_FORMATTER_RENDERING_ERROR_0),
                            formatterConfig.getJspRootPath(),
                            t.getMessage(),
                            stackTrace));
                }
            }
        }
    }
700651
public void doTag()
            throws JspException
    {
        PageContext pageContext = getPageContext();

        // Were any error messages specified?
        ActionMessages errors = null;
        try {
            errors = RequestUtils.getActionMessages(pageContext, Globals.ERROR_KEY);
        }
        catch (JspException e) {
            RequestUtils.saveException(pageContext, e);
            throw e;
        }

        if ((errors == null) || errors.isEmpty()) {
            if (hasErrors())
                reportErrors();
            return;
        }

        String qualifiedBundle = InternalUtils.getQualifiedBundleName(_bundleName, pageContext.getRequest());

        boolean headerPresent = false;
        boolean footerPresent = false;
        boolean prefixPresent = false;
        boolean suffixPresent = false;

        String locale = _locale;
        if (!isMissingUserDefaultMessages(pageContext)) {
            try {
                // Check for presence of header and footer message keys
                headerPresent =
                        RequestUtils.present(pageContext, qualifiedBundle, locale, "errors.header");
                footerPresent =
                        RequestUtils.present(pageContext, qualifiedBundle, locale, "errors.footer");
                prefixPresent =
                        RequestUtils.present(pageContext, qualifiedBundle, locale, "errors.prefix");
                suffixPresent =
                        RequestUtils.present(pageContext, qualifiedBundle, locale, "errors.suffix");
            }
            catch (JspException e) {
                String s = Bundle.getString("Tags_ErrorsException",
                        new Object[]{e.getMessage()});
                registerTagError(s, null);
                reportErrors();
                return;
            }
        }

        // Render the error messages appropriately
        InternalStringBuilder results = new InternalStringBuilder(128);
        boolean headerDone = false;
        String message = null;
        Iterator reports = null;
        reports = errors.get();

        while (reports.hasNext()) {
            ActionMessage report = (ActionMessage) reports.next();
            if (!headerDone) {
                if (headerPresent) {
                    message = RequestUtils.message(pageContext, qualifiedBundle, locale, "errors.header");
                    results.append(message);
                    results.append("\r\n");
                }
                headerDone = true;
            }
            if (prefixPresent) {
                message = RequestUtils.message(pageContext, qualifiedBundle, locale, "errors.prefix");
                results.append(message);
            }
            message = getErrorMessage(report, qualifiedBundle);
            if (message != null) {
                results.append(message);
                results.append("\r\n");
            }
            if (suffixPresent) {
                message = RequestUtils.message(pageContext, qualifiedBundle, locale, "errors.suffix");
                results.append(message);
            }
        }
        if (headerDone && footerPresent) {
            message = RequestUtils.message(pageContext, qualifiedBundle, locale, "errors.footer");
            results.append(message);
            results.append("\r\n");
        }

        if (hasErrors())
            reportErrors();

        // Print the results to our output writer
        write(results.toString());
    }
150721
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WFieldSet fieldSet = (WFieldSet) component;
		XmlStringBuilder xml = renderContext.getWriter();

		xml.appendTagOpen("ui:fieldset");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", fieldSet.isHidden(), "true");

		switch (fieldSet.getFrameType()) {
			case NO_BORDER:
				xml.appendOptionalAttribute("frame", "noborder");
				break;

			case NO_TEXT:
				xml.appendOptionalAttribute("frame", "notext");
				break;

			case NONE:
				xml.appendOptionalAttribute("frame", "none");
				break;

			case NORMAL:
			default:
				break;
		}

		xml.appendOptionalAttribute("required", fieldSet.isMandatory(), "true");
		xml.appendClose();

		// Render margin
		MarginRendererUtil.renderMargin(fieldSet, renderContext);

		// Label
		WDecoratedLabel label = fieldSet.getTitle();
		label.paint(renderContext);

		// Children
		xml.appendTag("ui:content");
		int size = fieldSet.getChildCount();

		for (int i = 0; i < size; i++) {
			WComponent child = fieldSet.getChildAt(i);

			// Skip label, as it has already been painted
			if (child != label) {
				child.paint(renderContext);
			}
		}

		xml.appendEndTag("ui:content");
		DiagnosticRenderUtil.renderDiagnostics(fieldSet, renderContext);
		xml.appendEndTag("ui:fieldset");
	}
220893
protected void showErrorPage(Object editor, Exception exception) throws JspException {

        // save initialized instance of the editor class in request attribute for included sub-elements
        getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, editor);

        // reading of file contents failed, show error dialog
        setAction(ACTION_SHOW_ERRORMESSAGE);
        setParamTitle(key(Messages.GUI_TITLE_EDIT_1, new Object[] {CmsResource.getName(getParamResource())}));
        if (exception != null) {
            getJsp().getRequest().setAttribute(ATTRIBUTE_THROWABLE, exception);
            if (CmsLog.getLog(editor).isWarnEnabled()) {
                CmsLog.getLog(editor).warn(exception.getLocalizedMessage(), exception);
            }
        }
        // include the common error dialog
        getJsp().include(FILE_DIALOG_SCREEN_ERRORPAGE);
    }
56185
public int doEndTag()
            throws JspException {
        if(hasErrors())
            reportErrors();
        else if(_valid) {
            closeTableTag(_appender);
            write(_sb.toString());
        }

        return EVAL_PAGE;
    }
366563
public void doTag()
            throws JspException, IOException
    {
        String value = getBufferBody(true);
        if (value != null)
            _text = value;

        Object o = getParent();
        assert (o != null);
        if (!(o instanceof TreeItem)) {
            logger.error("Invalid Parent (expected a TreeItem):" + o.getClass().getName());
            return;
        }

        // assign the value to the parent's label value
        TreeItem ti = (TreeItem) o;
        ti.setItemContent(_text);
    }