Renders the content before the backing component.

@param writer the writer to write to.
506179
protected void beforePaint(final PrintWriter writer) {
		PageShell pageShell = Factory.newInstance(PageShell.class);

		pageShell.openDoc(writer);
		pageShell.writeHeader(writer);
	}
91530
protected void onAfterRender(final Component component) {
		final Response response = component.getResponse();
		response.write(onWriteAfterRender());
	}
1360183
public static void renderAutoScrollHiddenInput(FacesContext facesContext,
            ResponseWriter writer) throws IOException
    {
        HtmlJavaScriptUtils.renderAutoScrollHiddenInput(facesContext, writer);
    }
129643
@Override
	public void paint(final RenderContext renderContext) {
		WebXmlRenderContext webRenderContext = (WebXmlRenderContext) renderContext;
		PrintWriter writer = webRenderContext.getWriter();

		beforePaint(writer);
		getBackingComponent().paint(renderContext);
		afterPaint(writer);
	}
697242
public void write(BufferedWriter writer) throws Exception {
		Enumeration enm;

		// header
		writer.write("# generated " + new Date());
		writer.newLine();

		enm = elements();

		while (enm.hasMoreElements()) {
			writer.write(enm.nextElement().toString());
			writer.newLine();
		}

		writer.flush();
		writer.close();
	}
1214463
@Override
	public void render() {
		if(null == this.in){
			throw new RenderException("InputStream is null !");
		}
		
		Response.setContentType(this.contentType);
		Response.write(this.in, this.bufferSize);
	}
640450
protected void renderBooleanValue(final UIComponent component,
                                      final ResponseWriter writer,
                                      final String attributeName) throws IOException {
        if (component.getAttributes().get(attributeName) != null && Boolean.valueOf(component.getAttributes().get(attributeName).toString())) {
            writer.writeAttribute(attributeName, true, attributeName);
        }
    }
1304127
public static final boolean renderHTMLStringPreserveEmptyAttribute(ResponseWriter writer,
            UIComponent component, String componentProperty, String htmlAttrName)
            throws IOException
    {
        String value = (String) component.getAttributes().get(componentProperty);
        if (!isDefaultStringPreserveEmptyAttributeValue(value))
        {
            writer.writeAttribute(htmlAttrName, value, componentProperty);
            return true;
        }
        return false;
    }
207112
public void render(OutputStream outputStream, Format format, int dpi) throws PrintingException {
		try {
			if (baos == null) {
				prepare();
			}
			writeDocument(outputStream, format, dpi);
		} catch (Exception e) { // NOSONAR
			throw new PrintingException(e, PrintingException.DOCUMENT_RENDER_PROBLEM);
		}
	}
87521
public void write(PrintWriter writer) {
        this.output = writer;
        dispatch(base, false);
        writer.flush();
    }
37856
public static void toWriter(Node node, Writer writer) throws TransformerException {
		toWriter(node, writer, new HashMap<String, String>());
	}
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);
    }
1251860
protected void onRender() {

		MarkupStream markupStream = findMarkupStream();
		try {
			final ComponentTag openTag = markupStream.getTag();
			final ComponentTag tag = openTag.mutable();
			final IValueMap attributes = tag.getAttributes();

			String src = (String) attributes.get("src");
			boolean base64 = Boolean.valueOf((String) attributes.get("base64"))
					.booleanValue();

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

			// Retrieve the image resource handler
			ServletWebRequest servletWebRequest = (ServletWebRequest) getRequest();
			HttpServletRequest request = servletWebRequest
					.getContainerRequest();
			BinaryResourcesHandler binaryRsHandler = (BinaryResourcesHandler) WebApplication
					.get().getServletContext()
					.getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE);

			if (null == binaryRsHandler)
				throw new IllegalStateException(
						"You are using a Jawr image tag while the Jawr Image servlet has not been initialized. Initialization of Jawr Image servlet either failed or never occurred.");

			final Response response = getResponse();

			src = ImageTagUtils.getImageUrl(src, base64, binaryRsHandler, request,
					getHttpServletResponseUrlEncoder(response));

			Writer writer = new RedirectWriter(response);

			this.renderer = RendererFactory.getImgRenderer(
					binaryRsHandler.getConfig(), isPlainImage());
			this.renderer.renderImage(src, attributes, writer);

		} catch (IOException ex) {
			LOGGER.error("onRender() error : ", ex);
		} finally {

			// Reset the Thread local for the Jawr context
			ThreadLocalJawrContext.reset();
		}

		markupStream.skipComponent();
	}
805650
public static void renderAutoScrollFunction(FacesContext facesContext,
            ResponseWriter writer) throws IOException
    {
        writer.startElement(HTML.SCRIPT_ELEM, null);
        writer.writeAttribute(HTML.SCRIPT_TYPE_ATTR,
                HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT, null);
        writer.writeText(getAutoScrollFunction(facesContext), null);
        writer.endElement(HTML.SCRIPT_ELEM);
    }
638957
private static BufferedWriter bufferOutput( Writer writer )
    {
        BufferedWriter out;
        if( writer instanceof BufferedWriter )
        {
            out = (BufferedWriter) writer;
        }
        else
        {
            out = new BufferedWriter( writer );
        }
        return out;
    }
951036
@Override
	public void paint(final RenderContext renderContext) {
		if (renderContext instanceof WebXmlRenderContext) {
			PageContentHelper.addAllHeadlines(((WebXmlRenderContext) renderContext).getWriter(),
					getUI().getHeaders());
		}

		getBackingComponent().paint(renderContext);
	}
468388
private void renderRecipe() throws IOException {
		StringBuilder sb = new StringBuilder();

		// First pages
		if( ! Constants.GENERATED.equalsIgnoreCase( this.applicationTemplate.getName())) {
			sb.append( renderDocumentTitle());
			sb.append( renderPageBreak());

			sb.append( renderParagraph( this.messages.get( "intro" ))); //$NON-NLS-1$
			sb.append( renderPageBreak());

			sb.append( renderDocumentIndex());
			sb.append( renderPageBreak());

			sb.append( startTable());
			sb.append( addTableLine( this.messages.get( "app.name" ), this.applicationTemplate.getName())); //$NON-NLS-1$
			sb.append( addTableLine( this.messages.get( "app.qualifier" ), this.applicationTemplate.getVersion())); //$NON-NLS-1$
			sb.append( endTable());

			sb.append( renderApplicationDescription());
			sb.append( renderPageBreak());
			sb.append( renderSections( new ArrayList<String>( 0 )));

		} else {
			sb.append( renderDocumentIndex());
			sb.append( renderPageBreak());
		}

		// Render information about components
		sb.append( renderComponents());

		// Render information about facets
		sb.append( renderFacets());

		writeFileContent( sb.toString());
	}