if (contextMap.containsKey(key)) {
return;
}
contextMap.put(key, Boolean.TRUE);
Resource resource = context.getApplication().getResourceHandler()
.createResource(name, library);
ResponseWriter writer = context.getResponseWriter();
writer.startElement("link", component);
writer.writeAttribute("type", "text/css", "type");
writer.writeAttribute("rel", "stylesheet", "rel");
String resourceUrl = "RES_NOT_FOUND";
if (resource != null) {
resourceUrl = context.getExternalContext().encodeResourceURL(resource.getRequestPath());
}
writer.writeURIAttribute("href", resourceUrl, "href");
if (media != null) {
writer.writeAttribute("media", media, "media");
}