9 Replies Latest reply on Dec 30, 2007 2:43 PM by fabmars

    Stylesheet not loading

    earniedyke

      Greetings all!!!

      I have upgraded to Richfaces 3.1.3.GA in hopes that it would correct a problem whereby the RichFaces related stylesheets are not being loaded in my app. The strange thing is that sometimes they are loaded but more times than not, they are not loaded. I have tried the refresh button within the browser, restarting the app server (JB 4.2.2.GA) and have flushed the browser (IE6 & Firefox 2.0.0.11) cache all to no avail.

      Any one else run into this problem? Any ideas on what else I can try?

      Thanks in advance for any and all help!!

      Earnie!

        • 1. Re: Stylesheet not loading
          nbelaevski
          • 2. Re: Stylesheet not loading
            earniedyke

            Thanks for the reply Nick. I tried:

            <context-param>
             <param-name>org.richfaces.LoadStyleStrategy</param-name>
             <param-value>ALL</param-value>
            </context-param>
            


            but it made no difference. Still looking for a solution. :-)

            Earnie!

            • 3. Re: Stylesheet not loading
              earniedyke

              Have done some more research and discovered when my login page is first displayed, the link to the richfaces stylesheet looks like this:

              <link rel='stylesheet' type='text/css' href='/WAITC/a4j_3_1_3.GAorg/richfaces/skin.xcss/DATB/eAFjlrb0AAAC6gHS'/>


              When I put this into my web browser, nothing is returned. I don't get a 404, just an empty document. This is obviously why my page isn't being styled but why would this file e empty?

              Earnie!

              • 4. Re: Stylesheet not loading
                earniedyke

                I added this to my components.xml and flushed the browser cache and pages subsequent to my login page now use the style. The login page still does not use it however. Not to mention that this makes the app VERY slow!

                <web:ajax4jsf-filter enable-cache="false"/>


                Earnie!

                • 5. Re: Stylesheet not loading
                  akushunin

                  in files, that you attached to JIRAs issue, in web.xml missing filter for rich* components.
                  Add following strings in your web.xml:

                  <filter>
                   <display-name>Ajax4jsf Filter</display-name>
                   <filter-name>ajax4jsf</filter-name>
                   <filter-class>org.ajax4jsf.Filter</filter-class>
                   </filter>
                  
                   <filter-mapping>
                   <filter-name>ajax4jsf</filter-name>
                   <url-pattern>*.seam</url-pattern>
                   </filter-mapping>
                  
                   <context-param>
                   <param-name>org.ajax4jsf.SKIN</param-name>
                   <param-value>wine</param-value>
                   </context-param>
                  

                  and remember filter for RichFaces must come first in web.xml

                  • 6. Re: Stylesheet not loading
                    akushunin

                    and please add one more context-param:

                    <context-param>
                     <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                     <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
                     </context-param>
                    


                    • 7. Re: Stylesheet not loading
                      fabmars

                      I ran into the same problem using 3.1.3 or 3.1.4 snaps with JSF RI 1.2.07 and a JDK 6 on Glassfish V2b58.

                      Still unexplained to me.

                      • 8. Re: Stylesheet not loading
                        fabmars

                        For your infos, I just installed the latest glassfisg version glassfish-installer-v2ur1-b09d and all works fine now !
                        Another computer science mystery...

                        • 9. Re: Stylesheet not loading
                          fabmars

                          More clues: I had upgraded JSF RI to version 1.2.07 on my previous glassfish. The Glassfish I just installed contains 1.2.04.

                          In order to test the assumption that RI 1.2.07 has some regression, I upgraded the JSF lib to 1.2.07 again, and...css don't load anymore !!

                          Ok, rollback to 1.2.04...css load again !!

                          This is clear, something is wrong with the JSF version. I checked on the JSF forums, nothing like that matches. To be continued...