Examples of StyleProvider


Examples of org.apache.myfaces.trinidadinternal.style.StyleProvider

     if (!"true".equals(
          external.getInitParameter(
            Configuration.DISABLE_CONTENT_COMPRESSION)))
     {
       StyleContext sContext = ((CoreRenderingContext)arc).getStyleContext();
       StyleProvider sProvider = sContext.getStyleProvider();
       return sProvider.getShortStyleClasses(sContext);
     }
     return null;
   }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleProvider

      RenderingContext rc = RenderingContext.getCurrentInstance();
      assert(rc instanceof CoreRenderingContext);
     
      CoreRenderingContext crc = (CoreRenderingContext)rc;
      StyleContext styleContext = crc.getStyleContext();
      StyleProvider styleProvider = styleContext.getStyleProvider();
      _icons = styleProvider.getIcons(styleContext);
     
      // Under normal circumstances, the StyleProvider will return
      // a non-null, modifiable map.  If the skin/style subsystem
      // has failed to initialize, however, the map may be null.
      // Substitute an empty map so we don't need to check for null
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleProvider

      RenderingContext rc = RenderingContext.getCurrentInstance();
      assert(rc instanceof CoreRenderingContext);
     
      CoreRenderingContext crc = (CoreRenderingContext)rc;
      StyleContext styleContext = crc.getStyleContext();
      StyleProvider styleProvider = styleContext.getStyleProvider();
      // skin properties are stored in an Map<Object, Object>
      _properties = styleProvider.getSkinProperties(styleContext);
     
      // Under normal circumstances, the StyleProvider will return
      // a non-null, modifiable map.  If the skin/style subsystem
      // has failed to initialize, however, the map may be null.
      // Substitute an empty map so we don't need to check for null
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleProvider

    FacesBean           bean) throws IOException
  {
    ResponseWriter writer = context.getResponseWriter();

    StyleContext sContext = ((CoreRenderingContext) arc).getStyleContext();
    StyleProvider provider = sContext.getStyleProvider();
    if (provider != null)
    {
      String href = provider.getStyleSheetURI(sContext);

      // If the requestMap has a skin-id, a skin's stylesheet's id and suppressStylesheet
      // is true, and the skin information matches our current skin, then it is safe
      // to not write out the css. This means that it will be written out by the external
      // source, like the portal container.
      boolean suppressStylesheet = _isSuppressStylesheet(context, arc);
      if (!suppressStylesheet)
      {
        if (href != null)
        {
          ExternalContext externalContext = context.getExternalContext();
          String contextUri = externalContext.getRequestContextPath();
          String baseURL = contextUri + XhtmlConstants.STYLES_CACHE_DIRECTORY;

          String outputMode = arc.getOutputMode();
          // =-=AEW Don't like hardcoding facet names...
          if (XhtmlConstants.OUTPUT_MODE_PORTLET.equals(outputMode) &&
              supportsScripting(arc))
          {
            writer.startElement("script", null);
            writer.writeText("var _adfSS;if(!_adfSS){_adfSS=1;document.write(\"" +
                          "<link rel=\\\"stylesheet\\\" "+
                          "charset=\\\"UTF-8\\\" type=\\\"text/css\\\" " +
                          "href=\\\"",
              null);
            String uri = context.getExternalContext().encodeResourceURL(baseURL+href);
            writer.writeText(uri, null);
            writer.writeText("\\\">\")}", null);
            writer.endElement("script");
          }
          else
          {
            writer.startElement("link", null);
            renderId(context, comp);
            writer.writeAttribute("rel", "stylesheet", null);
            writer.writeAttribute("charset", "UTF-8", null);

            String type = provider.getContentStyleType(sContext);
            writer.writeAttribute("type", type, null);

            renderEncodedResourceURI(context, "href", baseURL + href);
            writer.endElement("link");
          }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleProvider

     if (!"true".equals(
          external.getInitParameter(
            Configuration.DISABLE_CONTENT_COMPRESSION)))
     {
       StyleContext sContext = ((CoreRenderingContext)arc).getStyleContext();
       StyleProvider sProvider = sContext.getStyleProvider();
       return sProvider.getShortStyleClasses(sContext);  
     }
     return null;
   }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleProvider

      RenderingContext rc = RenderingContext.getCurrentInstance();
      assert(rc instanceof CoreRenderingContext);

      CoreRenderingContext crc = (CoreRenderingContext)rc;
      StyleContext styleContext = crc.getStyleContext();
      StyleProvider styleProvider = styleContext.getStyleProvider();
      _icons = styleProvider.getIcons(styleContext);

      // Under normal circumstances, the StyleProvider will return
      // a non-null, modifiable map.  If the skin/style subsystem
      // has failed to initialize, however, the map may be null.
      // Substitute an empty map so we don't need to check for null
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleProvider

      RenderingContext rc = RenderingContext.getCurrentInstance();
      assert(rc instanceof CoreRenderingContext);

      CoreRenderingContext crc = (CoreRenderingContext)rc;
      StyleContext styleContext = crc.getStyleContext();
      StyleProvider styleProvider = styleContext.getStyleProvider();
      // skin properties are stored in an Map<Object, Object>
      _properties = styleProvider.getSkinProperties(styleContext);

      // Under normal circumstances, the StyleProvider will return
      // a non-null, modifiable map.  If the skin/style subsystem
      // has failed to initialize, however, the map may be null.
      // Substitute an empty map so we don't need to check for null
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleProvider

     if (!"true".equals(
          external.getInitParameter(
            Configuration.DISABLE_CONTENT_COMPRESSION)))
     {
       StyleContext sContext = ((CoreRenderingContext)arc).getStyleContext();
       StyleProvider sProvider = sContext.getStyleProvider();
       return sProvider.getShortStyleClasses(sContext);  
     }
     return null;
   }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleProvider

     if (!"true".equals(
          external.getInitParameter(
            Configuration.DISABLE_CONTENT_COMPRESSION)))
     {
       StyleContext sContext = ((CoreRenderingContext)arc).getStyleContext();
       StyleProvider sProvider = sContext.getStyleProvider();
       return sProvider.getShortStyleClasses(sContext);
     }
     return null;
   }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleProvider

   {
     FacesContext context = FacesContext.getCurrentInstance();
     if (!_isDisableContentCompressionParameterTrue(context))
     {
        StyleContext sContext = ((CoreRenderingContext)arc).getStyleContext();
        StyleProvider sProvider = sContext.getStyleProvider()
        // make sure that we want to disable style compression - there could be other
        // reasons that the styleContext knows about.
        if (!(sContext.isDisableStyleCompression()))
          return sProvider.getShortStyleClasses(sContext);
     }
     return null;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.