Renders the end of a row of body content.
@param facesContext the <code>FacesContext</code>.
@param writer the <code>ResponseWriter</code>.
@param uiData the <code>UIData</code> being rendered.
@throws IOException if an exceptoin occurs.
967900
protected void renderRowEnd(
        FacesContext facesContext,
        ResponseWriter writer,
        UIData uiData) throws IOException
    {
        writer.endElement(HTML.TR_ELEM);
    }
545564
protected void renderSelectTag(FacesContext context, ResponseWriter rw, String clientId, SelectOneMenu menu,
			String outerClientId) throws IOException {
		renderSelectTag(rw, menu);
		renderSelectTagAttributes(rw, clientId, menu, outerClientId);
		renderOptions(context, rw, menu);

		renderInputTagEnd(rw);
		renderJQueryAfterComponent(rw, clientId, menu);
	}
636398
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
	    if (!component.isRendered()) {
	        return;
	    }
		Canvas canvas = (Canvas) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = canvas.getClientId();

		rw.startElement("canvas", canvas);
		Tooltip.generateTooltip(context, canvas, rw);

//	    rw.writeAttribute("initial-drawing", canvas.getInitial-drawing(), "initial-drawing");
	    rw.writeAttribute("id", clientId, "id");
	    writeAttribute(rw, "style", canvas.getStyle(), "style");
	    String styleClass = canvas.getStyleClass();
	    if (null != styleClass)
	    	styleClass += Responsive.getResponsiveStyleClass(canvas, false);
	    else
	    	styleClass = Responsive.getResponsiveStyleClass(canvas, false);
		writeAttribute(rw, "class", styleClass, "class");
	    writeAttribute(rw, "width", canvas.getWidth(), "width");
	    writeAttribute(rw, "height", canvas.getHeight(), "height");
		rw.endElement("canvas");
		Tooltip.activateTooltips(context, canvas);
		Drawing drawing = canvas.getDrawing();
		if (null != drawing) {
			String script = ((Drawing) drawing).getJavaScript();
			rw.startElement("script", component);
			rw.write("\nnew function(){\n");
			rw.write("    var canvas=document.getElementById('" + clientId + "');\n");
			rw.write("    var ctx = canvas.getContext('2d');\n");

			rw.write(script);
			rw.write("\n}();\n");
			rw.endElement("script");
		}
	}
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");

	}
650751
@Override
	protected void render(FacesContext context) throws IOException {

		// Generate the name definition or image element
		StringBuffer results = new StringBuffer(getElementOpen());

		prepareImageUrl(context, results);

		prepareAttribute(results, "name", getAttribute("name"));
		prepareAttribute(results, "align", getAttribute("align"));
		prepareAttribute(results, "border", getAttribute("border"));
		prepareAttribute(results, "value", getAttribute("value"));
		prepareAttribute(results, "accesskey", getAttribute("accesskey"));
		prepareAttribute(results, "tabindex", getAttribute("tabindex"));
		prepareAttribute(results, "disabled", getAttribute("disabled"));
		results.append(prepareStyles());
		results.append(prepareEventHandlers());
		results.append(" />");

		ResponseWriter writer = context.getResponseWriter();
		writer.write(results.toString());
	}
732333
public static void renderAutoScrollHiddenInput(FacesContext facesContext,
            ResponseWriter writer) throws IOException
    {
        writer.startElement(HTML.INPUT_ELEM, null);
        writer.writeAttribute(HTML.TYPE_ATTR, "hidden", null);
        writer.writeAttribute(HTML.NAME_ATTR, AUTO_SCROLL_PARAM, null);
        writer.endElement(HTML.INPUT_ELEM);
    }
589616
protected void renderARIAInvalid(FacesContext context, UIInput component) throws IOException {
        if (!component.isValid()) {
            ResponseWriter writer = context.getResponseWriter();
            writer.writeAttribute(HTML.ARIA_INVALID, "true", null);
        }
    }
464352
private static void writeFooter(Writer writer) throws IOException {
        writer.write(ICAL_END);
        writer.write(COLON);
        writer.write(ICAL_VTIMEZONE);
        writer.write(NEWLINE);
    }
290088
@Override
	public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
        if (!component.isRendered()) {
            return;
        }
        PanelGrid panelGrid = (PanelGrid) component;
		ResponseWriter writer = context.getResponseWriter();

		boolean idHasBeenRendered=false;
		String responsiveStyle= Responsive.getResponsiveStyleClass(panelGrid, false);
		if (null != responsiveStyle) {
			writer.startElement("div", panelGrid);
			writer.writeAttribute("class", responsiveStyle.trim(), null);
			String clientId = panelGrid.getClientId();
			writer.writeAttribute("id", clientId, "id");
			idHasBeenRendered=true;
		}
		generateContainerStart(writer, panelGrid, idHasBeenRendered);
		beginDisabledFieldset(panelGrid, writer);

		int[] columns = getColSpanArray(panelGrid);
		String[] columnClasses = getColumnClasses(panelGrid, columns);
		String[] rowClasses = getRowClasses(panelGrid);

		int row = 0;
		int column = 0;
		List<UIComponent> children = panelGrid.getChildren();
		for (UIComponent child : children) {
			if (0 == column) {
				generateRowStart(writer, row, rowClasses, panelGrid);
			}
			generateColumnStart(child, columnClasses[column], writer);
			child.encodeAll(context);
			generateColumnEnd(writer, columns[column]);
			column++;
			if (column >= columns.length) {
				generateRowEnd(writer, row, rowClasses);
				column = 0;
				row++;
			}
		}
		if (column != 0) {
			generateRowEnd(writer, row, rowClasses);
			column = 0;
			row++;
		}


		endDisabledFieldset(panelGrid, writer);
		generateContainerEnd(writer);
		if (null != responsiveStyle) {
			writer.endElement("div");
		}
        Tooltip.activateTooltips(context, panelGrid);
	}
147112
protected void startTable(FacesContext facesContext, UIComponent uiComponent) throws IOException
    {
        ResponseWriter writer = facesContext.getResponseWriter();
        writer.startElement(HTML.TABLE_ELEM, uiComponent);
        
        Map<String, List<ClientBehavior>> behaviors = null;
        if (uiComponent instanceof ClientBehaviorHolder)
        {
            behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
            if (!behaviors.isEmpty())
            {
                HtmlRendererUtils.writeIdAndName(writer, uiComponent, facesContext);
            }
            else
            {
                HtmlRendererUtils.writeIdIfNecessary(writer, uiComponent, facesContext);
            }
            if (behaviors.isEmpty() && isCommonPropertiesOptimizationEnabled(facesContext))
            {
                CommonPropertyUtils.renderEventProperties(writer, 
                        CommonPropertyUtils.getCommonPropertiesMarked(uiComponent), uiComponent);
            }
            else
            {
                if (isCommonEventsOptimizationEnabled(facesContext))
                {
                    CommonEventUtils.renderBehaviorizedEventHandlers(facesContext, writer, 
                           CommonPropertyUtils.getCommonPropertiesMarked(uiComponent),
                           CommonEventUtils.getCommonEventsMarked(uiComponent), uiComponent, behaviors);
                }
                else
                {
                    HtmlRendererUtils.renderBehaviorizedEventHandlers(facesContext, writer, uiComponent, behaviors);
                }
            }
            if (isCommonPropertiesOptimizationEnabled(facesContext))
            {
                HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.TABLE_ATTRIBUTES);
                CommonPropertyUtils.renderCommonPassthroughPropertiesWithoutEvents(writer, 
                        CommonPropertyUtils.getCommonPropertiesMarked(uiComponent), uiComponent);
            }
            else
            {
                HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, 
                        HTML.TABLE_PASSTHROUGH_ATTRIBUTES_WITHOUT_EVENTS);
            }
        }
        else
        {
            HtmlRendererUtils.writeIdIfNecessary(writer, uiComponent, facesContext);
            if (isCommonPropertiesOptimizationEnabled(facesContext))
            {
                HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.TABLE_ATTRIBUTES);
                CommonPropertyUtils.renderCommonPassthroughProperties(writer, 
                        CommonPropertyUtils.getCommonPropertiesMarked(uiComponent), uiComponent);
            }
            else
            {
                HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, 
                        HTML.TABLE_PASSTHROUGH_ATTRIBUTES);
            }
        }
    }
545441
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
	    if (!component.isRendered()) {
	        return;
	    }
		Video video = (Video) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = video.getClientId();
		boolean idHasBeenRendered=false;
		rw.startElement("div", video);
		String responsiveStyle = Responsive.getResponsiveStyleClass(video, false);
		if (null != responsiveStyle && responsiveStyle.trim().length()>0) {
			rw.writeAttribute("class", responsiveStyle, null);
			rw.writeAttribute("id", clientId, null);
			idHasBeenRendered=true;
		}
	
		rw.startElement("video", video);
		Tooltip.generateTooltip(context, video, rw);
		rw.writeAttribute("src", video.getSrc(), null);
		rw.writeAttribute("autoplay", video.isAutoplay(), null);
		rw.writeAttribute("controls", video.isControls(), null);
		rw.writeAttribute("loop", video.isLoop(), null);
		String videoId = clientId;
		if (idHasBeenRendered) {
			videoId = clientId + "_video";
		}
		rw.writeAttribute("id", videoId, null);
		String style = video.getStyle();
		if (null != style) {
			rw.writeAttribute("style", style, null);
		}
		String styleClass = video.getStyleClass();
		if (null == styleClass)
			styleClass = "";
		else
			styleClass = " " + styleClass;
		
		Tooltip.generateTooltip(context, video, rw);

		rw.writeAttribute("class", styleClass, "class");
		
		// Render Ajax Capabilities
		AJAXRenderer.generateBootsFacesAJAXAndJavaScript(FacesContext.getCurrentInstance(), video, rw, false);
	
		rw.endElement("video");
		if (null != responsiveStyle && responsiveStyle.trim().length()>0) {
			rw.endElement("div");
		}		
		Tooltip.activateTooltips(context, video, videoId);	
	}
1210754
@Override
	public void encodeBegin(FacesContext context) throws IOException {

		// Initialize attributes
		this.useRandomParam = (String) getAttributes().get("useRandomParam");

		String src = (String) getAttributes().get("src");

		ResponseWriter writer = context.getResponseWriter();
		HttpServletRequest request = ((HttpServletRequest) context.getExternalContext().getRequest());

		ResourceBundlesHandler bundler = getResourceBundlesHandler(context);

		// src is mandatory
		if (null == src)
			throw new IllegalStateException("The src attribute is mandatory for this Jawr tag. ");

		// Refresh the config if needed
		if (RendererRequestUtils.refreshConfigIfNeeded(request, bundler.getConfig())) {
			bundler = getResourceBundlesHandler(context);
		}

		// Get an instance of the renderer.
		if (null == this.renderer || !this.renderer.getBundler().getConfig().isValid())
			this.renderer = createRenderer(context);

		RendererRequestUtils.setRequestDebuggable(request, renderer.getBundler().getConfig());
		try {
			BundleRendererContext ctx = RendererRequestUtils.getBundleRendererContext(request, renderer);
			renderer.renderBundleLinks(src, ctx, writer);
		} finally {
			// Reset the Thread local for the Jawr context
			ThreadLocalJawrContext.reset();
		}
		super.encodeBegin(context);

	}
631235
public static void debugHtml(Writer writer, FacesContext faces, Throwable e) throws IOException
    {
        debugHtml(writer, faces, faces.getViewRoot(), null,  e);
    }
392499
private static void _writeExtendedComponentTree(Writer writer,
            FacesContext facesContext) throws IOException
    {
        VisitContext visitContext = VisitContext.createVisitContext(
                facesContext, null, EnumSet.of(VisitHint.SKIP_UNRENDERED));
        facesContext.getViewRoot().visitTree(visitContext, new ExtendedComponentTreeVisitCallback(writer));
        _clearVisitedFacetCountMap(facesContext);
    }
794861
protected void renderDummyMarkup(FacesContext context, UIComponent component, String clientId) throws IOException {
        ResponseWriter writer = context.getResponseWriter();

        writer.startElement("div", null);
        writer.writeAttribute("id", clientId, null);
        writer.writeAttribute("style", "display: none;", null);

        renderPassThruAttributes(context, component, null);

        writer.endElement("div");
    }
1360183
public static void renderAutoScrollHiddenInput(FacesContext facesContext,
            ResponseWriter writer) throws IOException
    {
        HtmlJavaScriptUtils.renderAutoScrollHiddenInput(facesContext, writer);
    }
383157
private void doPaintRows(final WDataTable table, final WebXmlRenderContext renderContext) {
		TableDataModel model = table.getDataModel();
		WRepeater repeater = table.getRepeater();
		List<?> beanList = repeater.getBeanList();
		final int rowCount = beanList.size();
		WComponent row = repeater.getRepeatedComponent();

		for (int i = 0; i < rowCount; i++) {
			if (model instanceof TreeTableDataModel) {
				Integer nodeIdx = (Integer) beanList.get(i);
				TableTreeNode node = ((TreeTableDataModel) model).getNodeAtLine(nodeIdx);

				if (node.getLevel() != 1) {
					// Handled by the layout, so don't paint the row.
					continue;
				}
			}

			// Each row has its own context. This is why we can reuse the same
			// WComponent instance for each row.
			UIContext rowContext = repeater.getRowContext(beanList.get(i), i);

			UIContextHolder.pushContext(rowContext);

			try {
				row.paint(renderContext);
			} finally {
				UIContextHolder.popContext();
			}
		}
	}