Package org.richfaces.skin

Examples of org.richfaces.skin.Theme


    return namespace;
  }


  public Theme getTheme(FacesContext context, UIPage page) {
    Theme theme = null;
    String themeName = page.getTheme();
    if(null != themeName && themeName.length()>0){
      theme = SkinFactory.getInstance().getTheme(context, themeName);
    }
    return theme;
View Full Code Here


    }
    return theme;
  }
 
  public void themeStyle(FacesContext context, UIPage component) throws IOException{
    Theme theme = getTheme(context, component);
    if(null != theme){
      String style = theme.getStyle();
      if(null != style){
        ResponseWriter writer = context.getResponseWriter();
        writer.startElement(HTML.LINK_ELEMENT, component);
        writer.writeAttribute(HTML.TYPE_ATTR, "text/css", null);
        writer.writeAttribute(HTML.REL_ATTR, "stylesheet", null);
View Full Code Here

    }
   
  }

  public void themeScript(FacesContext context, UIPage component) throws IOException{
    Theme theme = getTheme(context, component);
    if(null != theme){
      String script = theme.getScript();
      if(null != script){
        ResponseWriter writer = context.getResponseWriter();
        writer.startElement(HTML.SCRIPT_ELEM, component);
        writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
        script = context.getApplication().getViewHandler().getResourceURL(context, script);
View Full Code Here

            child.encodeAll(context);
        }
    }

    public Theme getTheme(FacesContext context, UIComponent component) {
        Theme theme = null;
        String themeName = ((AbstractPage) component).getTheme();
        if (null != themeName && themeName.length() > 0) {
            theme = SkinFactory.getInstance().getTheme(context, themeName);
        }
        return theme;
View Full Code Here

        }
        child.encodeEnd(facesContext);
    }

    public void themeScript(FacesContext context, UIComponent component) throws IOException {
        Theme theme = getTheme(context, component);
        if (null != theme) {
            String script = theme.getScript();
            if (null != script) {
                ResponseWriter writer = context.getResponseWriter();
                writer.startElement(HtmlConstants.SCRIPT_ELEM, component);
                writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.JAVASCRIPT_TYPE, null);
                script = context.getApplication().getViewHandler().getResourceURL(context, script);
View Full Code Here

            }
        }
    }

    public void themeStyle(FacesContext context, UIComponent component) throws IOException {
        Theme theme = getTheme(context, component);
        if (null != theme) {
            String style = theme.getStyle();
            if (null != style) {
                ResponseWriter writer = context.getResponseWriter();
                writer.startElement(HtmlConstants.LINK_ELEMENT, component);
                writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.CSS_TYPE, null);
                writer.writeAttribute(HtmlConstants.REL_ATTR, HtmlConstants.REL_STYLESHEET, null);
View Full Code Here

    return namespace;
  }


  public Theme getTheme(FacesContext context, UIPage page) {
    Theme theme = null;
    String themeName = page.getTheme();
    if(null != themeName && themeName.length()>0){
      theme = SkinFactory.getInstance().getTheme(context, themeName);
    }
    return theme;
View Full Code Here

    }
    return theme;
  }
 
  public void themeStyle(FacesContext context, UIPage component) throws IOException{
    Theme theme = getTheme(context, component);
    if(null != theme){
      String style = theme.getStyle();
      if(null != style){
        ResponseWriter writer = context.getResponseWriter();
        writer.startElement(HTML.LINK_ELEMENT, component);
        writer.writeAttribute(HTML.TYPE_ATTR, "text/css", null);
        writer.writeAttribute(HTML.REL_ATTR, "stylesheet", null);
View Full Code Here

    }
   
  }

  public void themeScript(FacesContext context, UIPage component) throws IOException{
    Theme theme = getTheme(context, component);
    if(null != theme){
      String script = theme.getScript();
      if(null != script){
        ResponseWriter writer = context.getResponseWriter();
        writer.startElement(HTML.SCRIPT_ELEM, component);
        writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
        script = context.getApplication().getViewHandler().getResourceURL(context, script);
View Full Code Here

TOP

Related Classes of org.richfaces.skin.Theme

Copyright © 2018 www.massapicom. 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.