6 Replies Latest reply on Dec 6, 2010 9:27 AM by Ivan Sundt

    Components are not being skinned

    Billy Welch Newbie

      Hi!

      I am new to working with RichFaces, and have come across a problem. When viewing RichFaces pages, none of the components are skinned. They all show up as either standard HTML renderings, or just the associated text shows. A screenshot of this is available at [img]http://wwsvr.dyndns.org/Rich Faces IMG.jpg[/img].

      I use JDeveloper 11.1.1.1.0 as my IDE, if it makes any difference.

      Here is a list of all of the libraries included:


      JSF 1.2
      JSTL 1.2
      JSP Runtime
      Richfaces-api-3.3.1.GA.jar
      Richfaces-ui-3.3.1.GA.jar
      Richfaces-impl-3.3.1.GA.jar
      Commons Logging 1.0.4
      Commons-beanutils-1.7.0.jar
      Commons Collections 3.1
      Commons Digester 1.7


      Here is my web.xml:
      <?xml version="1.0"?>
      <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
       <display-name>Greeter</display-name>
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>server</param-value>
       </context-param>
       <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>ruby</param-value>
       </context-param>
       <context-param>
       <param-name>org.richfaces.CONTROL_SKINNING</param-name>
       <param-value>enable</param-value>
       </context-param>
       <filter>
       <display-name>RichFaces Filter</display-name>
       <filter-name>richfaces</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       </filter>
       <filter-mapping>
       <filter-name>richfaces</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
       <listener>
       <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
       </listener>
       <!-- Faces Servlet -->
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <!-- Faces Servlet Mapping -->
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.jsf</url-pattern>
       </servlet-mapping>
       <login-config>
       <auth-method>BASIC</auth-method>
       </login-config>
      </web-app>
      


      Here is my faces-config.xml:
      <?xml version="1.0" encoding="windows-1252"?>
      <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
       <managed-bean>
       <managed-bean-name>backing_untitled1</managed-bean-name>
       <managed-bean-class>project3.backing.Untitled1</managed-bean-class>
       <managed-bean-scope>request</managed-bean-scope>
       <!--oracle-jdev-comment:managed-bean-jsp-link:1untitled1.jsp-->
       </managed-bean>
       <managed-bean>
       <description>UsernName Bean</description>
       <managed-bean-name>user</managed-bean-name>
       <managed-bean-class>demo.user</managed-bean-class>
       <managed-bean-scope>request</managed-bean-scope>
       <managed-property>
       <property-name>name</property-name>
       <property-class>java.lang.String</property-class>
       <value></value>
       </managed-property>
       </managed-bean>
       <managed-bean>
       <managed-bean-name>backing_richdemo</managed-bean-name>
       <managed-bean-class>project3.backing.Richdemo</managed-bean-class>
       <managed-bean-scope>request</managed-bean-scope>
       <!--oracle-jdev-comment:managed-bean-jsp-link:1richdemo.jsp-->
       </managed-bean>
      </faces-config>
      


      For testing, this is deployed to a (integrated w/ JDev) WebLogic 11gR1 server (at least thats what it appears to be).

      Please let me know if you need any more information.

      Thank you in advance for your help!

        • 1. Re: Components are not being skinned
          Ilya Shaikovsky Master

          check please Net tab in Firebug. I mean responses on resources requests.

          • 2. Re: Components are not being skinned
            Billy Welch Newbie

            Everything is returned with a 200 OK response.

            Here's a link to a screenshot of it: http://wwsvr.dyndns.org/RichFaces%20IMG2.jpg

            • 3. Re: Components are not being skinned
              Billy Welch Newbie

              Also, here's a list of the responses for each resource:

              *http://127.0.0.1:7101/AgentPortal-Project3-context-root/a4j/s/3_3_1.GAorg/richfaces/renderkit/html/css/basic_both.xcss/DATB/eAGbUnaFO3T5DGkAEaUDmQ__.jsf

              Response:

              <template xmlns:f="http:/jsf.exadel.com/template" xmlns:u="http:/jsf.exadel.com/template/util" xmlns
              ="http://www.w3.org/1999/xhtml"><importResource src="org/richfaces/renderkit/html/css/basic.xcss"></importResource
              ><importResource src="org/richfaces/renderkit/html/css/basic_classes.xcss"></importResource></template
              >
              


              *http://127.0.0.1:7101/AgentPortal-Project3-context-root/a4j/s/3_3_1.GAorg/richfaces/renderkit/html/css/extended_both.xcss/DATB/eAGbUnaFO3T5DGkAEaUDmQ__.jsf

              Response:
              <template xmlns:f="http:/jsf.exadel.com/template" xmlns:u="http:/jsf.exadel.com/template/util" xmlns="http://www.w3.org/1999/xhtml"><importResource src="org/richfaces/renderkit/html/css/extended.xcss"></importResource><importResource src="org/richfaces/renderkit/html/css/extended_classes.xcss"></importResource></template>
              
              
              *http://127.0.0.1:7101/AgentPortal-Project3-context-root/a4j/s/3_3_1.GAcss/panel.xcss/DATB/eAGbUnaFO3T5DGkAEaUDmQ__.jsf
              
              Response:
              
              <template xmlns:f="http:/jsf.exadel.com/template" xmlns:u="http:/jsf.exadel.com/template/util" xmlns="http://www.w3.org/1999/xhtml"><verbatim></verbatim><selector name=".dr-pnl"><style name="background-color" skin="generalBackgroundColor"></style><style name="border-color" skin="panelBorderColor"></style></selector><selector name=".dr-pnl-h"><style name="background-color" skin="headerBackgroundColor"></style><style name="border-color" skin="headerBackgroundColor"></style><style name="font-size" skin="headerSizeFont"></style><style name="color" skin="headerTextColor"></style><style name="font-weight" skin="headerWeightFont"></style><style name="font-family" skin="headerFamilyFont"></style><style name="background-image"><resource f:key="org.richfaces.renderkit.html.GradientA"></resource></style></selector><selector name=".dr-pnl-b"><style name="font-size" skin="generalSizeFont"></style><style name="color" skin="generalTextColor"></style><style name="font-family" skin="generalFamilyFont"></style></selector></template>
              
              
              
              *http://127.0.0.1:7101/AgentPortal-Project3-context-root/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/skinning.js.jsf
              
              Response:
              
              
              {var mediaName="rich-extended-skinning";var userAgent=navigator.userAgent;var skipNavigator=window.opera||(userAgent.indexOf('AppleWebKit/')>-1&&userAgent.indexOf('Chrome/')==-1);if(!skipNavigator){var resetMedia=function(elt){var media=elt.getAttribute('media');if(mediaName==media){elt.removeAttribute('media');}};if(!window._RICH_FACES_SKINNING_ADDED_TO_BODY){var getElementByTagName=function(elt,name){var elements;try{elements=elt.selectNodes(".//*[local-name()=\""+
              name+"\"]");}catch(ex){try{elements=elt.getElementsByTagName(name);}catch(nf){}}
              return elements;};var f=function(){if(window.RICH_FACES_EXTENDED_SKINNING_ON){var styles=getElementByTagName(document,'link');if(styles){var l=styles.length;for(var i=0;i<l;i++){var elt=styles;resetMedia(elt);}}}};if(window.addEventListener){window.addEventListener("load",f,false);}else{window.attachEvent("onload",f);}
               window._RICH_FACES_SKINNING_ADDED_TO_BODY=true;}
               if(!window._RICH_FACES_SKINNING_ADDED_TO_AJAX&&typeof A4J!="undefined"&&A4J.AJAX){A4J.AJAX.AddHeadElementTransformer(function(elt){if(window.RICH_FACES_EXTENDED_SKINNING_ON){if(elt.tagName&&elt.tagName.toLowerCase()=='link'){resetMedia(elt);}}});window._RICH_FACES_SKINNING_ADDED_TO_AJAX=true;}}};
              
              
              


              • 5. Re: Components are not being skinned
                Ivan Sundt Newbie

                I have the excact same problem with Richfaces 3.3.3 on a weblogic 10.3.3.0 server. Did you ever figure this out?

                 

                http://localhost:7001/iscustomer-server/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/basic_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=KZvfM0bWQxynQlRKPzy3hYTP1sn1GZ5cx3dnLv8DhjjyV2XcBPXS!573669214

                 

                gives this result:

                 

                <template><importResource src="org/richfaces/renderkit/html/css/basic.xcss"></importResource><importResource src="org/richfaces/renderkit/html/css/basic_classes.xcss"></importResource></template>

                from firebug:
                Response Headersview source
                Cache-Controlmax-age=86400
                DateTue, 30 Nov 2010 11:18:50 GMT
                Content-Length195
                Content-Typetext/css; charset=UTF-8
                ExpiresWed, 01 Dec 2010 11:18:50 GMT
                Last-ModifiedTue, 30 Nov 2010 11:05:01 GMT
                X-Powered-ByServlet/2.5 JSP/2.1
                Request Headersview source
                Hostlocalhost:7001
                User-AgentMozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.10 (maverick) Firefox/3.6.12
                Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                Accept-Languageen-us,en;q=0.5
                Accept-Encodinggzip,deflate
                Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7
                Keep-Alive115
                Connectionkeep-alive
                CookieJSESSIONID=KZvfM0bWQxynQlRKPzy3hYTP1sn1GZ5cx3dnLv8DhjjyV2XcBPXS!573669214
                Pragmano-cache
                Cache-Controlno-cache
                • 6. Re: Components are not being skinned
                  Ivan Sundt Newbie

                  I had wstx--asl 4.0.0 on my classpath. Upgrading to oodstox-core-asl 4.0.9 solved the problem for me. The problem was a bit weird since it only occured on some weblogic installations.