1 Reply Latest reply on Feb 28, 2008 8:03 AM by Paul Iov

    Applying skin to other components - what I'm doing wrong?

    Alexey Kakunin Newbie

      According to http://livedemo.exadel.com/richfaces-demo/richfaces/style.jsf?c=loadStyle
      I tried to apply skin to non-RichFaces components.

      I created xcss file, and included <a4j:loadStyle src="resources/css/emforge-skin.xcss" /> into xhtml.

      But... then page is loaded - I'm getting followed error in FireFox bug-console:

      Error: The stylesheet http://www.emforge.org/resources/css/emforge-skin.xcss was not loaded because its MIME type, "text/xml", is not "text/css".
      Source File: http://www.emforge.org/login.faces
      Line: 0

      Then I trying to load http://www.emforge.org/resources/css/emforge-skin.xcss in browser - I'm getting source xcss - but not css what should be generated.

      It seems for me like this xcss file is not processed by faces - and returned as-is. What else I need to do in configuration?

      And yes - we are using Richfaces 3.1.4 + myFaces 1.1.6 + Facelets 1.1.14

        • 1. Re: Applying skin to other components - what I'm doing wrong
          Paul Iov Newbie

          To let RF resource framework process this file, you have to reference it in code with "resource://" prefix.

          <a4j:loadStyle src="resource:///resources/css/emforge-skin.xcss" />

          Pay attention to this triple slashes... the first two are the part of prefix, the third one means "root" of your application. Without prefix (in your case) it is delivered as any other "conventional" resource. Thats why you have this MIME Type error :)