* @param component UIComponent to be rendered
* @throws java.io.IOException if an input/output error occurs while rendering
*/
protected void writeLink(final FacesContext context, final UIComponent component) throws IOException {
final ResponseWriter writer = context.getResponseWriter();
final UICustomResource crl = (UICustomResource) component;
if (crl.isRendered()) {
writer.startElement("link", component);
writer.writeAttribute("type", "text/css", null);
writer.writeAttribute("rel", "stylesheet", null);
if (crl.getMedia() != null) {
writer.writeAttribute("media", crl.getMedia(), null);
}
writer.writeAttribute("href", crl.getSrc(), null);
writer.endElement("link");
}
}