3 Replies Latest reply on Oct 19, 2009 10:19 AM by Nick Belaevski

    Skinnability - CSS images from servlet with query params

    ike erhascy Newbie

      This is actually about PortletBridge. It slightly modifies ajax4jsf resource loading mechanism so dynamic resource loading is quite common in richfaces CSS files.

      Resulting CSS would contain something like:

      background-image: /rfRes/image.png?param1=1&param2=2
      


      But the problem that TemplateCSSRendererer renders this block as
      background-image: /rfRes/image.png?param1=1&param2=2
      

      So it makes some xml encoding replacing & to & etc. But that is invalid for urls in CSS resulting lost images.

      Dirty hack like .replaceAll("&", "&") in TemplateCSSRendererer helps, but is there any better solution?