label methods generates the HTML code of the current b:label.
@param context the FacesContext.
@param component the current b:label.
@throws IOException thrown if something goes wrong when writing the HTML code.
194567
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
	    if (!component.isRendered()) {
	        return;
	    }
		Label label = (Label) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = label.getClientId();
	
		boolean idHasBeenRendered = false;

		String sev = label.getSeverity();
		String txt = label.getValue();
		if (txt == null) {
			txt = label.getText();
		}

		// add responsive style
		String clazz = Responsive.getResponsiveStyleClass(label, false).trim();
		boolean isResponsive = clazz.length() > 0;
		if (isResponsive) {
			rw.startElement("div", label);
			rw.writeAttribute("class", clazz, null);
			rw.writeAttribute("id", clientId, "id");
			idHasBeenRendered = true;
		}

		rw.startElement("span", label);
		if (!idHasBeenRendered) {
			rw.writeAttribute("id", clientId, "id");
		}
		Tooltip.generateTooltip(context, label, rw);
		String sclass = "label" + " " + "label";
		if (sev != null) {
			sclass += "-" + sev;
		} else {
			sclass += "-default";
		}
		String styleClass = label.getStyleClass();
		sclass += styleClass != null ? " " + styleClass : "";
		rw.writeAttribute("class", sclass, "class");
		String style = label.getStyle();
		if (isResponsive) {
			if (null == style) {
				style = "display:block";
			} else {
				style += ";display:block";
			}
		}

		if (style != null)
			rw.writeAttribute("style", style, "style");

		rw.writeText(txt, null);
		rw.endElement("span");
		if (isResponsive) {
			rw.endElement("div");
		}

		Tooltip.activateTooltips(context, label);
	}
20351
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WDialog dialog = (WDialog) component;
		int state = dialog.getState();

		if (state == WDialog.ACTIVE_STATE || dialog.getTrigger() != null) {
			int width = dialog.getWidth();
			int height = dialog.getHeight();
			String title = dialog.getTitle();
			XmlStringBuilder xml = renderContext.getWriter();

			xml.appendTagOpen("ui:dialog");
			xml.appendAttribute("id", component.getId());
			xml.appendOptionalAttribute("class", component.getHtmlClass());
			xml.appendOptionalAttribute("track", component.isTracking(), "true");
			xml.appendOptionalAttribute("width", width > 0, width);
			xml.appendOptionalAttribute("height", height > 0, height);
			xml.appendOptionalAttribute("modal", dialog.getMode() == WDialog.MODAL, "true");
			xml.appendOptionalAttribute("open", dialog.getState() == WDialog.ACTIVE_STATE, "true");
			xml.appendOptionalAttribute("title", title);

			DialogOpenTrigger trigger = dialog.getTrigger();
			if (trigger != null) {
				xml.appendOptionalAttribute("triggerid", trigger.getId());
				if (dialog.hasLegacyTriggerButton()) {
					xml.appendClose();
					trigger.paint(renderContext);
					xml.appendEndTag("ui:dialog");
				} else {
					xml.appendEnd();
				}
			} else {
				xml.appendEnd();
			}
		}
	}
1116660
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WPanel panel = (WPanel) component;
		XmlStringBuilder xml = renderContext.getWriter();
		ListLayout layout = (ListLayout) panel.getLayout();
		int childCount = panel.getChildCount();
		Size gap = layout.getSpace();
		String gapString = gap != null ? gap.toString() : null;

		xml.appendTagOpen("ui:listlayout");

		switch (layout.getType()) {
			case FLAT:
				xml.appendAttribute("type", "flat");
				break;

			case STACKED:
				xml.appendAttribute("type", "stacked");
				break;

			case STRIPED:
				xml.appendAttribute("type", "striped");
				break;

			default:
				throw new IllegalArgumentException("Invalid type: " + layout.getType());
		}

		switch (layout.getAlignment()) {
			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.getAlignment());
		}

		switch (layout.getSeparator()) {
			case NONE:
				// none is assumed if omitted
				break;

			case BAR:
				xml.appendAttribute("separator", "bar");
				break;

			case DOT:
				xml.appendAttribute("separator", "dot");
				break;

			default:
				throw new IllegalArgumentException("Invalid separator: " + layout.getSeparator());
		}

		xml.appendOptionalAttribute("ordered", layout.isOrdered(), "true");

		xml.appendOptionalAttribute("gap", gapString);

		xml.appendClose();

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

		xml.appendEndTag("ui:listlayout");
	}
11767
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WTextArea textArea = (WTextArea) component;
		XmlStringBuilder xml = renderContext.getWriter();
		boolean readOnly = textArea.isReadOnly();
		xml.appendTagOpen("ui:textarea");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", textArea.isHidden(), "true");

		if (readOnly) {
			xml.appendAttribute("readOnly", "true");
		} else {
			int cols = textArea.getColumns();
			int rows = textArea.getRows();
			int minLength = textArea.getMinLength();
			int maxLength = textArea.getMaxLength();
			WComponent submitControl = textArea.getDefaultSubmitButton();
			String submitControlId = submitControl == null ? null : submitControl.getId();

			xml.appendOptionalAttribute("disabled", textArea.isDisabled(), "true");
			xml.appendOptionalAttribute("required", textArea.isMandatory(), "true");
			xml.appendOptionalAttribute("minLength", minLength > 0, minLength);
			xml.appendOptionalAttribute("maxLength", maxLength > 0, maxLength);
			xml.appendOptionalAttribute("toolTip", textArea.getToolTip());
			xml.appendOptionalAttribute("accessibleText", textArea.getAccessibleText());
			xml.appendOptionalAttribute("rows", rows > 0, rows);
			xml.appendOptionalAttribute("cols", cols > 0, cols);
			xml.appendOptionalAttribute("buttonId", submitControlId);
			String placeholder = textArea.getPlaceholder();
			xml.appendOptionalAttribute("placeholder", !Util.empty(placeholder), placeholder);

			String autocomplete = textArea.getAutocomplete();
			xml.appendOptionalAttribute("autocomplete", !Util.empty(autocomplete), autocomplete);
		}
		xml.appendClose();

		if (textArea.isRichTextArea()) {
			/*
			 * This is a nested element instead of an attribute to cater for future enhancements
			 * such as turning rich text features on or off, or specifying JSON config either as
			 * a URL attribute or a nested CDATA section.
			 */
			xml.append("<ui:rtf />");
		}

		String textString = textArea.getText();
		if (textString != null) {
			if (textArea.isReadOnly() && textArea.isRichTextArea()) {
				// read only we want to output unescaped, but it must still be XML valid.
				xml.write(HtmlToXMLUtil.unescapeToXML(textString));
			} else {
				xml.appendEscaped(textString);
			}
		}

		if (!readOnly) {
			DiagnosticRenderUtil.renderDiagnostics(textArea, renderContext);
		}
		xml.appendEndTag("ui:textarea");
	}
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");
	}
738844
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WRadioButton button = (WRadioButton) component;

		XmlStringBuilder xml = renderContext.getWriter();
		boolean readOnly = button.isReadOnly();
		String value = button.getValue();

		xml.appendTagOpen("ui:radiobutton");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", button.isHidden(), "true");
		xml.appendAttribute("groupName", button.getGroupName());
		xml.appendAttribute("value", WebUtilities.encode(value));
		if (readOnly) {
			xml.appendAttribute("readOnly", "true");
		} else {
			xml.appendOptionalAttribute("disabled", button.isDisabled(), "true");
			xml.appendOptionalAttribute("required", button.isMandatory(), "true");
			xml.appendOptionalAttribute("submitOnChange", button.isSubmitOnChange(), "true");
			xml.appendOptionalAttribute("toolTip", button.getToolTip());
			xml.appendOptionalAttribute("accessibleText", button.getAccessibleText());
			// Check for null option (ie null or empty). Match isEmpty() logic.
			boolean isNull = value == null ? true : (value.length() == 0);
			xml.appendOptionalAttribute("isNull", isNull, "true");
		}
		xml.appendOptionalAttribute("selected", button.isSelected(), "true");
		xml.appendEnd();
	}
106878
protected void renderCaptionFacet(FacesContext facesContext, ResponseWriter writer, UIComponent component)
            throws IOException
    {
        HtmlRendererUtils.renderTableCaption(facesContext, writer, component);
    }
1211674
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		if (!component.isRendered())
			return;

		ProgressBar progressBar = (ProgressBar) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = progressBar.getClientId();

        String span = startColSpanDiv(rw, progressBar);
		rw.startElement("div", progressBar); // outer div
		rw.writeAttribute("class", "progress", "class");
		rw.writeAttribute("id", clientId, "id");
		rw.writeAttribute("class", progressBar.getStyleClass(), null);
		rw.writeAttribute("style", progressBar.getStyle(), null);
		Tooltip.generateTooltip(context, progressBar, rw);

		rw.startElement("div", progressBar); // inner div, responsible for the actual bar

		int max = progressBar.getMax();
		int min = progressBar.getMin();

		if (max == min)
			throw new FacesException("ProgressBar: max and min values must not match.");

		String svalue = progressBar.getValue();
		if (null == svalue) {
			throw new FacesException("Please define the value of the progressbar. It must not be null, nor may it be omitted.");
		}
		double value = Double.parseDouble(svalue);
		double progressCompletion = (value - min) / (max - min) * 100;

		String style = "width: " + progressCompletion + "%;";
		//append inline style, if set
		style += progressBar.getContentStyle() != null ? progressBar.getContentStyle() : "";

		rw.writeAttribute("style", style, null);

		rw.writeAttribute("role", "progressbar", "role");
		rw.writeAttribute("aria-valuemax", max, "aria-valuemax");
		rw.writeAttribute("aria-valuemin", min, "aria-valuemin");
		rw.writeAttribute("aria-valuenow", progressCompletion, "aria-valuenow");

		NumberFormat nf = NumberFormat.getInstance();
		nf.setMaximumFractionDigits(progressBar.getMaxDecimalPlaces());

		String caption = progressBar.getCaption();

		if (caption != null && !caption.isEmpty())
			rw.writeAttribute("aria-valuetext", caption, "aria-valuetext");

		writeStyleClass(progressBar, rw);

		String labelText = caption != null ? caption : nf.format(progressCompletion) + "%";
		writeCaption(progressBar, rw, labelText);

		rw.endElement("div");
		rw.endElement("div");
        closeColSpanDiv(rw, span);
		Tooltip.activateTooltips(context, progressBar);
	}
177007
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WValidationErrors errors = (WValidationErrors) component;
		XmlStringBuilder xml = renderContext.getWriter();

		if (errors.hasErrors()) {
			xml.appendTagOpen("ui:validationerrors");
			xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
			xml.appendOptionalAttribute("track", component.isTracking(), "true");
			xml.appendOptionalAttribute("title", errors.getTitleText());
			xml.appendClose();

			for (GroupedDiagnositcs nextGroup : errors.getGroupedErrors()) {
				// Render each diagnostic message in this group.
				for (Diagnostic nextMessage : nextGroup.getDiagnostics()) {
					xml.appendTagOpen("ui:error");
					WComponent forComponent = nextMessage.getComponent();

					if (forComponent != null) {
						UIContextHolder.pushContext(nextMessage.getContext());

						try {
							xml.appendAttribute("for", forComponent.getId());
						} finally {
							UIContextHolder.popContext();
						}
					}

					xml.appendClose();

					// DiagnosticImpl has been extended to support rendering
					// of a WComponent as the message.
					if (nextMessage instanceof DiagnosticImpl) {
						WComponent messageComponent = ((DiagnosticImpl) nextMessage)
								.createDiagnosticErrorComponent();

						// We add the component to a throw-away container so that it renders with the correct ID.
						WContainer container = new WContainer() {
							@Override
							public String getId() {
								return component.getId();
							}
						};

						container.add(messageComponent);
						messageComponent.paint(renderContext);
						container.remove(messageComponent);
						container.reset();
					} else {
						xml.append(nextMessage.getDescription());
					}

					xml.appendEndTag("ui:error");
				}
			}

			xml.appendEndTag("ui:validationerrors");
		}
	}
515059
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		if (!component.isRendered()) {
			return;
		}
		FetchBeanInfos fetchBeanInfos = (FetchBeanInfos) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = fetchBeanInfos.getClientId();

		boolean validationFailed = context.isValidationFailed();
		Severity maximumSeverity = context.getMaximumSeverity();
		String maximum="null";
		if (maximumSeverity!=null) {
			maximum=String.valueOf(maximumSeverity.getOrdinal());
		}
		String variables = "bfMaximumMessageSeverity=" + maximum + ";";
		boolean hasFatalError = false;
		boolean hasError = false;
		boolean hasWarning = false;
		boolean hasInfo = false;
		List<FacesMessage> messageList = context.getMessageList();
		for (FacesMessage message : messageList) {
			if (FacesMessage.SEVERITY_FATAL.equals(message.getSeverity())) {
				hasFatalError = true;
			} else if (FacesMessage.SEVERITY_ERROR.equals(message.getSeverity())) {
				hasError = true;
			} else if (FacesMessage.SEVERITY_WARN.equals(message.getSeverity())) {
				hasWarning = true;
			} else if (FacesMessage.SEVERITY_INFO.equals(message.getSeverity())) {
				hasInfo = true;
			}
		}
		variables += "bfHasFatalError=" + hasFatalError + ";";
		variables += "bfHasError=" + hasError + ";";
		variables += "bfHasWarning=" + hasWarning + ";";
		variables += "bfHasInfo=" + hasInfo + ";";

		rw.startElement("script", fetchBeanInfos);
		rw.writeAttribute("id", clientId, null);
		rw.writeText("validationFailed=" + validationFailed + ";" + variables, null);
		rw.endElement("script");
	}
1181753
public static void decorateFacetComponent(UIComponent parent, UIComponent comp, FacesContext ctx, ResponseWriter rw)
			throws IOException {
		/*
		 * System.out.println("COMPONENT CLASS = " + comp.getClass().getName());
		 * System.out.println("FAMILY = " + comp.getFamily());
		 * System.out.println("CHILD COUNT = " + comp.getChildCount());
		 * System.out.println("PARENT CLASS = " + comp.getParent().getClass());
		 * 
		 * 
		 * if (app.getClass().getName().endsWith("Button") ||
		 * (app.getChildCount() > 0 &&
		 * app.getChildren().get(0).getClass().getName().endsWith("Button"))) {
		 * rw.startElement("div", inputText); rw.writeAttribute("class",
		 * "input-group-btn", "class"); app.encodeAll(context);
		 * rw.endElement("div"); } else { if (app instanceof Icon) ((Icon)
		 * app).setAddon(true); rw.startElement("span", inputText);
		 * rw.writeAttribute("class", "input-group-addon", "class");
		 * app.encodeAll(context); rw.endElement("span"); }
		 */
		if (comp.getChildCount() >= 1 && comp.getClass().getName().endsWith("Panel")) {
			for (UIComponent child : comp.getChildren()) {
				decorateComponent(parent, child, ctx, rw);
			}
		} else {
			decorateComponent(parent, comp, ctx, rw);
		}
	}
628667
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WRadioButtonSelect rbSelect = (WRadioButtonSelect) component;
		XmlStringBuilder xml = renderContext.getWriter();
		int cols = rbSelect.getButtonColumns();
		boolean readOnly = rbSelect.isReadOnly();

		xml.appendTagOpen("ui:radiobuttonselect");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", rbSelect.isHidden(), "true");
		if (readOnly) {
			xml.appendAttribute("readOnly", "true");
		} else {
			xml.appendOptionalAttribute("disabled", rbSelect.isDisabled(), "true");
			xml.appendOptionalAttribute("required", rbSelect.isMandatory(), "true");
			xml.appendOptionalAttribute("submitOnChange", rbSelect.isSubmitOnChange(), "true");
			xml.appendOptionalAttribute("toolTip", component.getToolTip());
			xml.appendOptionalAttribute("accessibleText", component.getAccessibleText());
		}
		xml.appendOptionalAttribute("frameless", rbSelect.isFrameless(), "true");

		switch (rbSelect.getButtonLayout()) {
			case COLUMNS:
				xml.appendAttribute("layout", "column");
				xml.appendOptionalAttribute("layoutColumnCount", cols > 0, String.valueOf(cols));
				break;
			case FLAT:
				xml.appendAttribute("layout", "flat");
				break;
			case STACKED:
				xml.appendAttribute("layout", "stacked");
				break;
			default:
				throw new SystemException("Unknown radio button layout: " + rbSelect.getButtonLayout());
		}

		xml.appendClose();

		// Options
		List<?> options = rbSelect.getOptions();
		boolean renderSelectionsOnly = readOnly;

		if (options != null) {
			int optionIndex = 0;
			Object selectedOption = rbSelect.getSelected();

			for (Object option : options) {
				if (option instanceof OptionGroup) {
					throw new SystemException("Option groups not supported in WRadioButtonSelect.");
				} else {
					renderOption(rbSelect, option, optionIndex++, xml, selectedOption, renderSelectionsOnly);
				}
			}
		}

		if (!readOnly) {
			DiagnosticRenderUtil.renderDiagnostics(rbSelect, renderContext);
		}
		xml.appendEndTag("ui:radiobuttonselect");

		if (rbSelect.isAjax()) {
			paintAjax(rbSelect, xml);
		}
	}
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);	
	}
1154504
public void encodeChildren(FacesContext facesContext, UIComponent component) throws IOException
    {
        RendererUtils.checkParamValidity(facesContext, component, UIData.class);

        beforeBody(facesContext, (UIData) component);

        encodeInnerHtml(facesContext, component);

        afterBody(facesContext, (UIData) component);
    }
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");
		}
	}
1096422
@Override
	public void render(final WComponent component, final RenderContext context) {
		PrintWriter out = ((WebXmlRenderContext) context).getWriter();

		// If we are debugging the layout, write markers so that the html
		// designer can see where templates start and end.
		boolean debugLayout = ConfigurationProperties.getDeveloperVelocityDebug();

		if (debugLayout) {
			String templateUrl = url;

			if (url == null && component instanceof AbstractWComponent) {
				templateUrl = ((AbstractWComponent) component).getTemplate();
			}

			out.println("<!-- Start " + templateUrl + " -->");
			paintXml(component, out);
			out.println("<!-- End   " + templateUrl + " -->");
		} else {
			paintXml(component, out);
		}
	}
1060263
protected void renderARIARequired(FacesContext context, UIInput component) throws IOException {
        if (component.isRequired()) {
            ResponseWriter writer = context.getResponseWriter();
            writer.writeAttribute(HTML.ARIA_REQUIRED, "true", null);
        }
    }