4 Replies Latest reply on Jun 27, 2008 4:37 PM by imcmahon

    context rewriting for CSS path

    imcmahon

      I have /layout/layout.xhtml which is my facelet template, and in any jsf rendered tag I can use absolute paths and it'll all work regardless of the web path...  however, the css <link> tag isn't jsf rendered, so I don't get that benefit.   I know this is a problem that has gone unsolved in the past, but since seam folks seem to be solving all the other quirky problems, has anyone come up with a solution for this one?


      as a note, I don't have <link> inside an <f:view> block, and I'd rather not.

        • 1. Re: context rewriting for CSS path
          dhinojosa

          Got it....


          Use the Ajax4JSF/RichFaces solution that comes bundled with Seam


            <a:loadStyle src="/stylesheet/theme.css"/>
          

          • 2. Re: context rewriting for CSS path
            imcmahon

            Doesnt work.   Renders nothing.   Tried wrapping it in f:view with no luck.


            I even tried sticking it down inside the actual body content's f:view, and it still renders nothing.

            • 3. Re: context rewriting for CSS path
              dhinojosa

              Did you include it in the header?...Works fine for me..


              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
              <html xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:f="http://java.sun.com/jsf/core"
                    xmlns:rich="http://richfaces.org/rich"
                    xmlns:a="https://ajax4jsf.dev.java.net/ajax"
                    xmlns:s="http://jboss.com/products/seam/taglib">
              


              • 4. Re: context rewriting for CSS path
                imcmahon

                it was a deployment issue again... got it sorted out and now that's working great.



                Thanks again, Dan!