0 Replies Latest reply on Dec 5, 2014 3:02 PM by Pat Bevak

    Programmatically override resource loading?

    Pat Bevak Newbie

      Hello,

       

      Currently when we load a RF page it loads source relative to our context path.

       

      //--></script><script type="text/javascript" src="/contextpath/javax.faces.resource/jquery.js.jsf"><!--

      //--></script><script type="text/javascript" src="/contextpath/javax.faces.resource/richfaces.js.jsf"><!--

      //--></script><script type="text/javascript" src="/contextpath/javax.faces.resource/richfaces-base-component.js.jsf"><!--

       

      We're trying to use an HAproxy that hits our pages, and this happens to be a different context path, like /proxy/contextpath/....  However, the pages must continue to work through the normal url.

       

      Using a class that extends ResourceHandlerWrapper, I was able to change the resource for the myfaces loaded source.

       

      //--></script><script type="text/javascript" src="/contextpath/javax.faces.resource/richfaces-base-component.js.jsf"><!--

      //--></script><script type="text/javascript" src="/proxy/contextpath/javax.faces.resource/datatable.js.jsf?ln=org.richfaces"><!--

       

      I haven't been able to find a way to override this for RF though.  I don't think I can use the config settings as I don't want to append the proxy path all the time, just when we come in through the HAproxy.

       

      We're currently RF 4.3.1.Final.

       

      Any ideas?

       

      Thanks,

      Pat