0 Replies Latest reply on Aug 23, 2012 4:03 PM by Ken Finnigan

    RichFaces Resource URLs in Portlet

    Ken Finnigan Master

      I'm in the process of getting the RichFaces Showcase working in a portlet on GateIn and had a question around Resource URLs for images, css, JS, etc.

       

      Currently RichFaces uses relative URLs in a lot of places which are resolved as web context urls at runtime.  This poses problems when running in a portal as URLs need to be portal URLs to ensure that WSRP, clustering, etc work.

       

      I found https://issues.jboss.org/browse/RF-12190 which covers the same issue.  This issue talked about being able to use Resource Mapping files to change the URL to which a resource is retrieved.  This sounds great, but I'm not that making a call to facesContext.getExternalContext().encodeResourceURL() within that property file for a resource value would actually be executed as intended.

       

      Basically looking at fairly non intrusive ways to rewrite all the RichFaces resource urls.  One option inside the Portlet Bridge is to modify the resource content being served by JSF such that it checks for RichFaces relative urls and replaces them with calls to encodeResourceURL().

       

      Are there any other options that may be cleaner and not involve parsing the resource stream and replacing it's content?

       

      Thanks

      Ken