1 Reply Latest reply on Dec 20, 2010 6:27 PM by Nick Belaevski

    Manually load js/styles ?

    moha mida Newbie

      Hi everybody !

       

      From what i understood, i can't make certain pages not to load richfaces's scripts, and make other do.

       

      The solution is to set the NONE strategy, and load manually the scripts using a4j:loadScript for each page.

      (for example :<a4j:loadScript src="resource:///org/richfaces/renderkit/html/scripts/jquery/jquery.js" />

       

      So these are my questions:

       

      1) how to know which are the scripts that i need for a certain page (dependencies)

      2) What's the right format for the "src" attribute that i need to put in <a4j:loadScript /> (is it src="http://mydomain...jquery.js" or...)

        • 1. Re: Manually load js/styles ?
          Nick Belaevski Master

          Hi,

           

          1) Check META-INF/*.component-dependencies.xml files

          2) 'src' attribute can point to an instance of org.ajax4jsf.resource.InternetResource or string referring to context-relative URI or URIs in resource:/// schema; in general, all resources are requested via ViewHandler, so you can create your own schema to handle external URIs.