Beispiel #1
0
 public static String getResourceUrl(
     String frameworkBindingName,
     String filenameBindingName,
     String hrefBindingName,
     IWodElement wodElement,
     Stack<WodParserCache> caches) {
   String resourceUrl;
   IWodBinding hrefBinding = wodElement.getBindingNamed(hrefBindingName);
   if (hrefBinding != null && !hrefBinding.isKeyPath()) {
     resourceUrl = hrefBinding.getValue();
   } else {
     resourceUrl =
         TagDelegate.getResourceUrl(frameworkBindingName, filenameBindingName, wodElement, caches);
   }
   return resourceUrl;
 }
 @Override
 public void renderNode(
     IWodElement wodElement,
     FuzzyXMLElement xmlElement,
     RenderContext renderContext,
     StringBuffer htmlBuffer,
     StringBuffer cssBuffer,
     Stack<WodParserCache> caches,
     Stack<FuzzyXMLNode> nodes) {
   String cssUrl = TagDelegate.getResourceUrl("framework", "filename", "href", wodElement, caches);
   htmlBuffer.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + cssUrl + "\"");
   String media = wodElement.getBindingValue("media");
   if (media != null) {
     htmlBuffer.append(" media=\"" + media + "\"");
   }
   htmlBuffer.append("/>");
 }