This methods generates the HTML code of the current b:slider.

@param context
the FacesContext.
@param component
the current b:slider.
@throws IOException
thrown if something goes wrong when writing the HTML code.
340388
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		if (!component.isRendered()) {
			return;
		}
		Slider slider = (Slider) component;
		ResponseWriter rw = context.getResponseWriter();
		encodeHTML(slider, context, rw);

		Tooltip.activateTooltips(context, slider);
	}
230358
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		XmlStringBuilder xml = renderContext.getWriter();
		xml.appendTagOpen("hr");
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendEnd();
	}
1060263
protected void renderARIARequired(FacesContext context, UIInput component) throws IOException {
        if (component.isRequired()) {
            ResponseWriter writer = context.getResponseWriter();
            writer.writeAttribute(HTML.ARIA_REQUIRED, "true", null);
        }
    }
301224
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		SelectOneMenu menu = (SelectOneMenu) component;

		if (!menu.isRendered()) {
			return;
		}
		ResponseWriter rw = context.getResponseWriter();
		String outerClientId = menu.getClientId(context);
		boolean clientIdHasBeenRendered = false;
		String clientId = outerClientId + "Inner";
		String span = null;
		if (!isHorizontalForm(component)) {
			span = startColSpanDiv(rw, menu, outerClientId);
			if (null != span) {
				Tooltip.generateTooltip(context, menu, rw);
				clientIdHasBeenRendered = true;
			}
		}
		rw.startElement("div", menu);

		rw.writeAttribute("class", getWithFeedback(getInputMode(menu.isInline()), component), "class");
		if (!clientIdHasBeenRendered) {
			rw.writeAttribute("id", outerClientId, "id");
			Tooltip.generateTooltip(context, menu, rw);
		}
		writeAttribute(rw, "dir", menu.getDir(), "dir");

		addLabel(rw, clientId, menu, outerClientId);
		if (isHorizontalForm(component)) {
			span = startColSpanDiv(rw, menu, null);
		}

		UIComponent prependingAddOnFacet = menu.getFacet("prepend");
		UIComponent appendingAddOnFacet = menu.getFacet("append");
		final boolean hasAddon = startInputGroupForAddOn(rw, (prependingAddOnFacet != null),
				(appendingAddOnFacet != null), menu);

		addPrependingAddOnToInputGroup(context, rw, prependingAddOnFacet, (prependingAddOnFacet != null), menu);
		renderSelectTag(context, rw, clientId, menu, outerClientId);
		addAppendingAddOnToInputGroup(context, rw, appendingAddOnFacet, (appendingAddOnFacet != null), menu);

		closeInputGroupForAddOn(rw, hasAddon);
		rw.endElement("div"); // form-group
		closeColSpanDiv(rw, span);
		Tooltip.activateTooltips(context, menu);
	}
7158
public void encodeEnd(FacesContext facesContext, UIComponent component)
            throws IOException
    {
        RendererUtils.checkParamValidity(facesContext, component, null);
        
        Map<String, List<ClientBehavior>> behaviors = null;
        if (component instanceof ClientBehaviorHolder)
        {
            behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
            if (!behaviors.isEmpty())
            {
                ResourceUtils.renderDefaultJsfJsInlineIfNecessary(
                        facesContext, facesContext.getResponseWriter());
            }
        }

        if (component instanceof UISelectMany)
        {
            renderMenu(facesContext,
                                         (UISelectMany)component,
                                         isDisabled(facesContext, component),
                                         getConverter(facesContext, component));
        }
        else if (component instanceof UISelectOne)
        {
            renderMenu(facesContext,
                                         (UISelectOne)component,
                                         isDisabled(facesContext, component),
                                         getConverter(facesContext, component));
        }
        else
        {
            throw new IllegalArgumentException("Unsupported component class " + component.getClass().getName());
        }
    }
350048
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WImageEditor editorComponent = (WImageEditor) component;
		XmlStringBuilder xml = renderContext.getWriter();

		xml.appendTagOpen("wc-imageedit");
		xml.appendAttribute("id", editorComponent.getId());
		xml.appendOptionalAttribute("class", editorComponent.getHtmlClass());
		xml.appendOptionalUrlAttribute("overlay", editorComponent.getOverlayUrl());
		xml.appendOptionalAttribute("camera", editorComponent.getUseCamera());
		xml.appendOptionalAttribute("face", editorComponent.getIsFace());
		xml.appendOptionalAttribute("inline", editorComponent.getRenderInline());

		// Check for size information on the image
		Dimension size = editorComponent.getSize();
		if (size != null) {
			if (size.getHeight() >= 0) {
				xml.appendAttribute("height", size.height);
			}

			if (size.getWidth() >= 0) {
				xml.appendAttribute("width", size.width);
			}
		}

		xml.appendEnd();
	}
861924
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		if (!component.isRendered()) {
			return;
		}
		Image image = (Image) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = image.getClientId();
		
		boolean useXHRLoader = false;
		if (image.getOnloadend()!= null || image.getOnloadstart() != null || image.getOnprogress() != null) {
			useXHRLoader = true;
		}

		rw.startElement("img", image);
		Tooltip.generateTooltip(context, image, rw);
		rw.writeAttribute("id", clientId, "id");
		if (!useXHRLoader) {
			rw.writeURIAttribute("src", getImageSource(context, component), "value");
		}

		renderPassThruAttributes(context, image, new String[] { "alt", "height", "lang", "style", "title", "width" });

		String styleClass = image.getStyleClass();
		if (null == styleClass)
			styleClass = Responsive.getResponsiveStyleClass(image, false);
		else
			styleClass += Responsive.getResponsiveStyleClass(image, false);
		if (styleClass != null && styleClass.trim().length() > 0) {
			writeAttribute(rw, "class", styleClass, "styleClass");
		}

		AJAXRenderer.generateBootsFacesAJAXAndJavaScript(FacesContext.getCurrentInstance(), image, rw, false);

		rw.endElement("img");
		if (useXHRLoader) {
			rw.startElement("script", image);
			rw.writeText("document.getElementById('" + clientId + "').load('" + getImageSource(context, component) + "', " 
			+ getJSFunction(image.getOnloadstart()) + "," + getJSFunction(image.getOnprogress())
			+ ", " + getJSFunction(image.getOnloadend()) + ");", null);
			rw.endElement("script");
		}
		Tooltip.activateTooltips(context, image);
	}
1020474
private static void decorateComponent(UIComponent parent, UIComponent comp, FacesContext ctx, ResponseWriter rw)
			throws IOException {
		if (comp instanceof Icon)
			((Icon) comp).setAddon(true); // modifies the id of the icon

		String classToApply = "input-group-addon";
		if (comp.getClass().getName().endsWith("Button") || comp.getChildCount() > 0)
			classToApply = "input-group-btn";

		if (comp instanceof HtmlOutputText) {
			HtmlOutputText out = (HtmlOutputText)comp;
			
			String sc = out.getStyleClass();
			if (sc == null)
				sc = classToApply;
			else
				sc = sc + " " + classToApply;
			out.setStyleClass(sc);
			comp.encodeAll(ctx);
		}
		else {
			rw.startElement("span", parent);
			rw.writeAttribute("class", classToApply, "class");
			comp.encodeAll(ctx);
		 rw.endElement("span");
		}
	}
475267
protected void render(FacesContext context) throws IOException {

		String src = (String) getAttributes().get("src");
		boolean base64 = Boolean.parseBoolean((String) getAttributes().get("src"));
		String imagePath = getImageUrl(context, src, base64);
		ResponseWriter writer = context.getResponseWriter();
		writer.write(imagePath);
	}
1342011
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		ResponseWriter writer = context.getResponseWriter();
		writer.startElement("span", component);
		String keys = (String) component.getAttributes().get("attributeNames");
		if (null != keys) {
			String[] keyArray = keys.split(",");
			for (String key:keyArray) {
				writer.writeAttribute(key, AttributeUtilities.getAttributeAsString(component, key), key);				
			}
		}
	}
38657
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WField field = (WField) component;
		XmlStringBuilder xml = renderContext.getWriter();
		int inputWidth = field.getInputWidth();

		xml.appendTagOpen("ui:field");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", field.isHidden(), "true");
		xml.appendOptionalAttribute("inputWidth", inputWidth > 0, inputWidth);
		xml.appendClose();

		// Label
		WLabel label = field.getLabel();

		if (label != null) {
			label.paint(renderContext);
		}

		// Field
		if (field.getField() != null) {
			xml.appendTag("ui:input");
			field.getField().paint(renderContext);

			if (field.getErrorIndicator() != null) {
				field.getErrorIndicator().paint(renderContext);
			}

			if (field.getWarningIndicator() != null) {
				field.getWarningIndicator().paint(renderContext);
			}

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

		xml.appendEndTag("ui:field");
	}
417864
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		AbstractWFieldIndicator fieldIndicator = (AbstractWFieldIndicator) component;
		XmlStringBuilder xml = renderContext.getWriter();

		WComponent validationTarget = fieldIndicator.getTargetComponent();

		// no need to render an indicator for nothing.
		// Diagnosables takes care of thieir own  messaging.
		if (validationTarget == null || (validationTarget instanceof Diagnosable && !(validationTarget instanceof Input))) {
			return;
		}

		if (validationTarget instanceof Input && !((Input) validationTarget).isReadOnly()) {
			return;
		}

		List<Diagnostic> diags = fieldIndicator.getDiagnostics();

		if (diags != null && !diags.isEmpty()) {
			xml.appendTagOpen("ui:fieldindicator");
			xml.appendAttribute("id", component.getId());
			xml.appendOptionalAttribute("track", component.isTracking(), "true");

			switch (fieldIndicator.getFieldIndicatorType()) {
				case INFO:
					xml.appendAttribute("type", "info");
					break;

				case WARN:
					xml.appendAttribute("type", "warn");
					break;

				case ERROR:
					xml.appendAttribute("type", "error");
					break;

				default:
					throw new SystemException("Cannot paint field indicator due to an invalid field indicator type: "
							+ fieldIndicator.getFieldIndicatorType());
			}

			xml.appendAttribute("for", fieldIndicator.getRelatedFieldId());
			xml.appendClose();

			for (Diagnostic diag : diags) {
				xml.appendTag("ui:message");
				xml.appendEscaped(diag.getDescription());
				xml.appendEndTag("ui:message");
			}

			xml.appendEndTag("ui:fieldindicator");
		}
	}
547901
@Override
    public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException
    {
        super.encodeEnd(facesContext, component); // check for NP
        
        Map<String, List<ClientBehavior>> behaviors = null;
        if (component instanceof ClientBehaviorHolder)
        {
            behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
            if (!behaviors.isEmpty())
            {
                ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, facesContext.getResponseWriter());
            }
        }
        
        renderMessage(facesContext, component, false, true);
    }
47867
protected void renderTextAreaValue(FacesContext facesContext, UIComponent uiComponent) throws IOException
    {
        ResponseWriter writer = facesContext.getResponseWriter();
        
        Object addNewLineAtStart = uiComponent.getAttributes().get(ADD_NEW_LINE_AT_START_ATTR);
        if (addNewLineAtStart != null)
        {
            boolean addNewLineAtStartBoolean = false;
            if (addNewLineAtStart instanceof String)
            {
                addNewLineAtStartBoolean = Boolean.valueOf((String)addNewLineAtStart);
            }
            else if (addNewLineAtStart instanceof Boolean)
            {
                addNewLineAtStartBoolean = (Boolean) addNewLineAtStart;
            }
            if (addNewLineAtStartBoolean)
            {
                writer.writeText("\n", null);
            }
        }
        
        String strValue = org.apache.myfaces.shared.renderkit.RendererUtils.getStringValue(facesContext, uiComponent);
        if (strValue != null)
        {
            writer.writeText(strValue, org.apache.myfaces.shared.renderkit.JSFAttr.VALUE_ATTR);
        }
    }
1278776
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WList list = (WList) component;
		XmlStringBuilder xml = renderContext.getWriter();
		WList.Type type = list.getType();
		WList.Separator separator = list.getSeparator();
		Size gap = list.getSpace();
		String gapString = gap == null ? null : gap.toString();
		xml.appendTagOpen("ui:panel");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("type", list.isRenderBorder(), "box");
		xml.appendClose();

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

		xml.appendTagOpen("ui:listlayout");
		xml.appendOptionalAttribute("gap", gapString);

		if (type != null) {
			switch (type) {
				case FLAT:
					xml.appendAttribute("type", "flat");
					break;

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

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

				default:
					throw new SystemException("Unknown list type: " + type);
			}
		}

		if (separator != null) {
			switch (separator) {
				case BAR:
					xml.appendAttribute("separator", "bar");
					break;

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

				case NONE:
					break;

				default:
					throw new SystemException("Unknown list type: " + type);
			}
		}

		xml.appendClose();

		paintRows(list, renderContext);

		xml.appendEndTag("ui:listlayout");
		xml.appendEndTag("ui:panel");
	}
1148169
@Override
	protected BundleRenderer createRenderer(FacesContext context) {

		ResourceBundlesHandler rsHandler = getResourceBundlesHandler(context);
		String type = (String) getAttributes().get(JawrConstant.TYPE_ATTR);
		boolean async = Boolean.parseBoolean((String) getAttributes().get(JawrConstant.ASYNC_ATTR));
		boolean defer = Boolean.parseBoolean((String) getAttributes().get(JawrConstant.DEFER_ATTR));
		String crossorigin = (String) getAttributes().get(JawrConstant.CROSSORIGIN_ATTR);
		return RendererFactory.getJsBundleRenderer(rsHandler, type, getUseRandomParamFlag(rsHandler.getConfig()), async,
				defer, crossorigin);
	}
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);
		}
	}