### .renderContentBegin()

Renders the opening of the content element and the optional content
327980
public function renderContentBegin() {
		
		echo CHtml::openTag('div', $this->contentHtmlOptions);
		if (!empty($this->content)) {
			echo $this->content;
		}
	}
1091807
function() {
      
      /**
       * Main container 
       */
      this.element = inputEx.cn('div', {id: this.options.id });
      
      if(this.options.showHideColumnsDlg) {
         this.renderShowHideColumnsDlg();
      }

      // append it immediatly to the parent DOM element
      this.options.parentEl.appendChild(this.element);
      
   }
263957
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		if (!component.isRendered()) {
			return;
		}
		SelectBooleanCheckbox selectBooleanCheckbox = (SelectBooleanCheckbox) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = selectBooleanCheckbox.getClientId(context);
		
		String span = null;
		if (!isHorizontalForm(component)) {
			span = startColSpanDiv(rw, selectBooleanCheckbox);
		}
		rw.startElement("div", component);
		rw.writeAttribute("id", clientId, null);
        writeAttribute(rw,"class", getWithFeedback(InputMode.DEFAULT, component), "class");
        if (null != selectBooleanCheckbox.getDir()) {
			rw.writeAttribute("dir", selectBooleanCheckbox.getDir(), "dir");
		}

		addLabel(rw, clientId, selectBooleanCheckbox);

		renderInputTag(context, rw, clientId, selectBooleanCheckbox);

		rw.endElement("div");
		closeColSpanDiv(rw, span);

		Tooltip.activateTooltips(context, selectBooleanCheckbox);

	}
219044
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WCollapsible collapsible = (WCollapsible) component;
		XmlStringBuilder xml = renderContext.getWriter();
		WComponent content = collapsible.getContent();
		boolean collapsed = collapsible.isCollapsed();

		xml.appendTagOpen("ui:collapsible");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendAttribute("groupName", collapsible.getGroupName());
		xml.appendOptionalAttribute("collapsed", collapsed, "true");
		xml.appendOptionalAttribute("hidden", collapsible.isHidden(), "true");

		switch (collapsible.getMode()) {
			case CLIENT:
				xml.appendAttribute("mode", "client");
				break;
			case LAZY:
				xml.appendAttribute("mode", "lazy");
				break;
			case EAGER:
				xml.appendAttribute("mode", "eager");
				break;
			case DYNAMIC:
				xml.appendAttribute("mode", "dynamic");
				break;
			case SERVER:
				xml.appendAttribute("mode", "server");
				break;
			default:
				throw new SystemException("Unknown collapsible mode: " + collapsible.getMode());
		}

		HeadingLevel level = collapsible.getHeadingLevel();
		if (level != null) {
			xml.appendAttribute("level", level.getLevel());
		}

		xml.appendClose();

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

		// Label
		collapsible.getDecoratedLabel().paint(renderContext);

		// Content
		xml.appendTagOpen("ui:content");
		xml.appendAttribute("id", component.getId() + "-content");
		xml.appendClose();

		// Render content if not EAGER Mode or is EAGER and is the current AJAX trigger
		if (CollapsibleMode.EAGER != collapsible.getMode() || AjaxHelper.isCurrentAjaxTrigger(
				collapsible)) {
			// Visibility of content set in prepare paint
			content.paint(renderContext);
		}

		xml.appendEndTag("ui:content");

		xml.appendEndTag("ui:collapsible");
	}
43622
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WPanel panel = (WPanel) component;
		XmlStringBuilder xml = renderContext.getWriter();
		ColumnLayout layout = (ColumnLayout) panel.getLayout();
		int childCount = panel.getChildCount();
		Size hgap = layout.getHorizontalGap();
		String hgapString = hgap == null ? null : hgap.toString();
		Size vgap = layout.getVerticalGap();
		String vgapString = vgap == null ? null : vgap.toString();
		int cols = layout.getColumnCount();

		xml.appendTagOpen("ui:columnlayout");
		xml.appendOptionalAttribute("hgap", hgapString);
		xml.appendOptionalAttribute("vgap", vgapString);
		xml.appendClose();

		// Column Definitions
		for (int col = 0; col < cols; col++) {
			xml.appendTagOpen("ui:column");
			int width = layout.getColumnWidth(col);
			xml.appendOptionalAttribute("width", width > 0, width);

			switch (layout.getColumnAlignment(col)) {
				case LEFT:
					// left is assumed if omitted
					break;

				case RIGHT:
					xml.appendAttribute("align", "right");
					break;

				case CENTER:
					xml.appendAttribute("align", "center");
					break;

				default:
					throw new IllegalArgumentException("Invalid alignment: " + layout.
							getColumnAlignment(col));
			}

			xml.appendEnd();
		}

		for (int i = 0; i < childCount; i++) {
			xml.appendTag("ui:cell");
			WComponent child = panel.getChildAt(i);
			child.paint(renderContext);
			xml.appendEndTag("ui:cell");
		}

		xml.appendEndTag("ui:columnlayout");
	}
367351
public void startElementContents(ElementBox elem)
    {
        if (elem instanceof BlockBox && ((BlockBox) elem).getOverflowX() != BlockBox.OVERFLOW_VISIBLE)
        {
            //for blocks with overflow != visible generate a clipping group
            Rectangle cb = elem.getClippedContentBounds();
            String clip = "cssbox-clip-" + idcounter;
            out.print("<clipPath id=\"" + clip + "\">");
            out.print("<rect x=\"" + cb.x + "\" y=\"" + cb.y + "\" width=\"" + cb.width + "\" height=\"" + cb.height + "\" />");
            out.println("</clipPath>");
            out.println("<g id=\"cssbox-obj-" + idcounter + "\" clip-path=\"url(#" + clip + ")\">");
            idcounter++;
        }
    }
701772
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		if (!component.isRendered()) {
			return;
		}
		InternalCssScriptResource internalCssScriptResource = (InternalCssScriptResource) component;
		ResponseWriter rw = context.getResponseWriter();

		rw.startElement("link", internalCssScriptResource);
		rw.writeAttribute("type", "text/css", null);
		rw.writeAttribute("rel", "stylesheet", null);
		rw.writeAttribute("href", internalCssScriptResource.getUrl(), null);

		rw.endElement("link");

	}
852682
function(content){

			var html = '';

			html += '<div class="ja_wrap '+backgroundClasses.join(' ')+'">'+
					'<div class="jAlert '+classes.join(' ')+ '" style="' +styles.join(' ')+ '" id="' +alert.id+ '">'+
					'<div>';

			if( alert.closeBtn )
			{
				html += 		"<div class='closejAlert ja_close";
				if( alert.closeBtnAlt )
				{
					html += ' ja_close_alt';
				}
                else if( alert.closeBtnRoundWhite )
                {
                    html += ' ja_close_round_white';
                }
                else if( alert.closeBtnRound )
                {
                    html += ' ja_close_round';
                }
				html += "'>&times;</div>"; //closejAlert has a close handler attached, ja_close is for styling
			}

			if( alert.title )
			{
				html += 		"<div class='ja_title'><div>"+alert.title+"</div></div>";
			}

			html += 			'<div class="ja_body">'+content;


			if( alert.btns )
			{
				html += 			'<div class="ja_btn_wrap ';

				if( alert.btnBackground )
				{
					html += 		'optBack';
				}

				html += 			'">';
			}

			if( typeof alert.btns[0] == 'object' )
			{
				$.each(alert.btns, function(index, btn){
					if( typeof btn == 'object' )
					{
						html += 		getBtnHTML(btn);
					}
				});
			}
			else if( typeof alert.btns == 'object' )
			{
				html += 				getBtnHTML(alert.btns);
			}
			else if( alert.btns )
			{
				console.log('jAlert Config Error: Incorrect value for btns (must be object or array of objects): '+alert.btns);
			}

			if( alert.btns )
			{
				html += 			'</div>';
			}

			html += 			'</div>'+
					'</div>'+
					'</div>'+
					'</div>';

			var alertHTML = $(html);

			if( alert.replaceOtherAlerts )
			{
                var alerts = $('.jAlert:visible');
                alerts.each(function(){
                    $(this).jAlert().closeAlert();
                });
			}

			$('body').append(alertHTML);

            //cache instance
			alert.instance = $('#'+alert.id);

            //attach alert object to dom element
            alert.instance[0]['jAlert'] = alert;

            //doing this now will prevent it from happening mid-animation
            $('html,body').css('overflow', 'hidden');

            //show the new alert
			alert.animateAlert('show');

            //add close button handler
			if( alert.closeBtn ){

				alert.instance.on('click', '.closejAlert', function(e){
					e.preventDefault();
					$(this).parents('.jAlert:first').jAlert().closeAlert();
					return false;
				});

			}

			/* Bind mouseup handler to document if this alert has closeOnClick enabled */
			if( alert.closeOnClick ){

				/* Unbind if already exists */
				$(document).off('mouseup touchstart', $.fn.jAlert.onMouseUp);

				/* Bind mouseup */
				$(document).on('mouseup touchstart', $.fn.jAlert.onMouseUp);

			}

			/* Bind on keydown handler to document and if esc was pressed, find all visible jAlerts with that close option enabled and close them */
			if( alert.closeOnEsc ){

				/* Unbind if already exists */
				$(document).off('keydown', $.fn.jAlert.onEscKeyDown);

				/* Bind keydown */
				$(document).on('keydown', $.fn.jAlert.onEscKeyDown);

			}

			/* If there are onOpen callbacks, run them. */
			if( alert.onOpen )
			{
				$.each(alert.onOpen, function(index, onOpen){
					onOpen(alert.instance);
				});
			}

			/* If the alert has an element that should be focused by default */
			if( alert.autofocus )
			{
				alert.instance.find(alert.autofocus).focus();
			}
			else
			{
				alert.instance.focus();
			}
            /*
            	Set Auto
            	usage $.jAlert({
            		autoClose : 3500,
            	});
             */
            if(alert.autoClose)
            {
                $.fn.closeTimer(function()
				{
                    var currentAlert = $.jAlert('current');
                    if(currentAlert !== false)
                    {
                        currentAlert.closeAlert();
                    }
				}, alert.autoClose);
            }

			return alert.instance;

		}
146442
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WPopup popup = (WPopup) component;
		XmlStringBuilder xml = renderContext.getWriter();
		int width = popup.getWidth();
		int height = popup.getHeight();
		String targetWindow = popup.getTargetWindow();

		xml.appendTagOpen("ui:popup");
		xml.appendUrlAttribute("url", popup.getUrl());
		xml.appendOptionalAttribute("width", width > 0, width);
		xml.appendOptionalAttribute("height", height > 0, height);
		xml.appendOptionalAttribute("resizable", popup.isResizable(), "true");
		xml.appendOptionalAttribute("showScrollbars", popup.isScrollable(), "true");
		xml.appendOptionalAttribute("targetWindow", !Util.empty(targetWindow), targetWindow);
		xml.appendClose();
		xml.appendEndTag("ui:popup");
	}
130576
function(content, title) {
        if (content === true) {
            return; // AJAX is currently loading
        }

        this.fireEvent('showing');

        // Set the node state
        var node = this.node.aria('describedby', this.id());

        // Load runtime options
        var options = this.inheritOptions(this.options, node);

        // Load the element
        var element = this.loadElement(node);

        // Set the title and content
        title = title || this.readValue(node, options.getTitle);

        element
            .find(this.ns('header'))
                .html(title).toggle(Boolean(title) && options.showTitle)
            .end()
            .find(this.ns('content'))
                .html(content);

        this.fireEvent('load', [content, title]);

        // Follow the mouse
        if (options.follow) {
            var follow = this.onFollow.bind(this);

            node.off('mousemove', follow).on('mousemove', follow);

        // Position offset node
        } else {
            element.reveal().positionTo(options.position, node, {
                left: options.xOffset,
                top: options.yOffset
            });
        }

        this.fireEvent('shown');
    }
217165
function(content, options) {
        options = $.extend({}, this.options, options || {});

        var self = this,
            toast = this.render(options.template)
                .addClass(options.animation)
                .attr('role', 'note')
                .html(content)
                .conceal()
                .prependTo(this.wrapper);

        this.fireEvent('create', [toast]);

        // Set a timeout to trigger show transition
        setTimeout(function() {
            self.show(toast);
        }, 15); // IE needs a minimum of 15

        // Set a timeout to remove the toast
        if (options.duration) {
            setTimeout(function() {
                self.hide(toast);
            }, options.duration + 15);
        }
    }
383519
function render() {
      var checked = rgCtrl.getViewValue() == attr.value;

      if (checked === lastChecked) return;

      if (element[0].parentNode.nodeName.toLowerCase() !== 'md-radio-group') {
        // If the radioButton is inside a div, then add class so highlighting will work
        element.parent().toggleClass(CHECKED_CSS, checked);
      }

      if (checked) {
        rgCtrl.setActiveDescendant(element.attr('id'));
      }

      lastChecked = checked;

      element
        .attr('aria-checked', checked)
        .toggleClass(CHECKED_CSS, checked);
    }
772222
function(rendered, manager, def) {
    // Actually put the rendered contents into the element.
    if (_.isString(rendered)) {
      // If no container is specified, we must replace the content.
      if (manager.noel) {
        rendered = $.parseHTML(rendered, true);

        // Remove extra root elements.
        this.$el.slice(1).remove();

        // Swap out the View on the first top level element to avoid
        // duplication.
        this.$el.replaceWith(rendered);

        // Don't delegate events here - we'll do that in resolve()
        this.setElement(rendered, false);
      } else {
        this.html(this.$el, rendered);
      }
    }

    // Resolve only after fetch and render have succeeded.
    def.resolveWith(this, [this]);
  }
1112510
def _render_after(self, element):
        ''''''
        if element.inline_content:
            return "</%s>%s" % (element.tag, self.render_newlines())
        elif element.self_close:
            return self.render_newlines()
        elif self.children:
            return "%s</%s>\n" % (self.spaces, element.tag)
        else:
            return "</%s>\n" % (element.tag)
577028
function _renderImmediateInfo(contentsDiv, contents, context) {						
			// If it's an annotation then process the annotation(s) to get the actual data
			if (contents instanceof Array) {
				contents = this._getAnnotationContents(contents, context);			
				if (!contents) {
					return false;
				}
			}
			
			if (typeof contents === "string") {
				contentsDiv.textContent = contents;
				return true;
			} else if (this._isNode(contents)) {
				contentsDiv.appendChild(contents);
				return true;
			} else if (contents instanceof mProjectionTextModel.ProjectionTextModel) {
				var view = this._view;
				var options = view.getOptions();
				options.wrapMode = false;
				options.parent = contentsDiv;
				var tooltipTheme = "tooltipTheme"; //$NON-NLS-0$
				var theme = options.themeClass;
				if (theme) {
					theme = theme.replace(tooltipTheme, "");
					if (theme) { theme = " " + theme; } //$NON-NLS-0$
					theme = tooltipTheme + theme;
				} else {
					theme = tooltipTheme;
				}
				options.themeClass = theme;
				var contentsView = this._contentsView = new mTextView.TextView(options);
				//TODO need to find a better way of sharing the styler for multiple views
				var listener = {
					onLineStyle: function(e) {
						view.onLineStyle(e);
					}
				};
				contentsView.addEventListener("LineStyle", listener.onLineStyle);
				contentsView.setModel(contents);
				
				// TODO This is a hack to compute the projection size we will have in the tooltip, we remove the child after computing
				this._tooltipDiv.appendChild(contentsDiv);
				// Use the editor colors with a simple border
				this._tooltipDiv.classList.add("textviewTooltipCodeProjection"); //$NON-NLS-0$
				var size = contentsView.computeSize();
				// Adjust the size for the padding
				contentsDiv.style.width = (size.width+16) + "px"; //$NON-NLS-0$
				contentsDiv.style.height = (size.height+16) + "px"; //$NON-NLS-0$
				contentsView.resize();
				this._tooltipDiv.removeChild(contentsDiv);
				return true;
			}
			return false;
		}
403589
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WPanel panel = (WPanel) component;
		XmlStringBuilder xml = renderContext.getWriter();
		WButton submitButton = panel.getDefaultSubmitButton();
		String submitId = submitButton == null ? null : submitButton.getId();
		String titleText = panel.getTitleText();

		boolean renderChildren = isRenderContent(panel);

		xml.appendTagOpen("ui:panel");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		if (PanelMode.LAZY.equals(panel.getMode())) {
			xml.appendOptionalAttribute("hidden", !renderChildren, "true");
		} else {
			xml.appendOptionalAttribute("hidden", component.isHidden(), "true");
		}
		xml.appendOptionalAttribute("buttonId", submitId);
		xml.appendOptionalAttribute("title", titleText);
		xml.appendOptionalAttribute("accessKey", Util.upperCase(panel.getAccessKeyAsString()));
		xml.appendOptionalAttribute("type", getPanelType(panel));
		xml.appendOptionalAttribute("mode", getPanelMode(panel));

		xml.appendClose();

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

		if (renderChildren) {
			renderChildren(panel, renderContext);
		} else {
			// Content will be loaded via AJAX
			xml.append("<ui:content/>");
		}

		xml.appendEndTag("ui:panel");
	}
482087
protected function renderContent()
    {
        if (is_string($this->content)
            || $this->content instanceof SafeHtmlWrapper
            || $this->content instanceof SafeHtmlProducerInterface
        ) {
            return Html::escape($this->content);
        } elseif ($this->content instanceof RenderableInterface) {
            return Html::escape($this->content->render());
        } elseif (is_array($this->content)
            || $this->content instanceof ArrayableInterface
        ) {
            return ArrayList::of($this->content)
                ->map(function ($child) {
                    if (is_string($child)
                        || $child instanceof SafeHtmlWrapper
                        || $child instanceof SafeHtmlProducerInterface
                    ) {
                        return Html::escape($child);
                    } elseif ($child instanceof RenderableInterface) {
                        return Html::escape($child->render());
                    }

                    throw new NodeChildRenderingException($child);
                })
                ->join();
        }

        throw new NodeRenderingException($this->content);
    }