1 Reply Latest reply on Feb 10, 2010 7:25 AM by ilya_shaikovsky

    NONE LoadScriptStrategy and js dependancy

      Hi all,

       

       

      I've to use the NONE to LoadScriptStrategy so i need to add the js of richfaces by hand used to my application.

       

      I added the two js framework.pack.js and ui.pack.js in a way similar to this one:

       

      <script type="text/javascript" src="http://mymachine/donald/framework.pack.js"></script>
      <script type="text/javascript" src="http://mymachine/donald/
      ui.pack.js"></script>

      they are from external address; i add them on the top of the DOM in the head section and they are the first.

      But if i have a browser with empty cache if i load the page the uses them i got full errors complaining
      about the lack of functions that should be delivered from the two javascript files. The url are correct i'm
      sure and when i try to load the same page with the cache full i get no errors.

      Using ALL to LoadStyleStrategy all is working correctly but i need to retrieve these two from a different
      address.


      If i load them each file two times like this example:
      <script type="text/javascript" src="http://mymachine/donald/
      framework.pack.js"></script>
      <script type="text/javascript" src="http://mymachine/donald/framework.pack.js"></script>
      <script type="text/javascript" src="http://mymachine/donald/
      ui.pack.js"></script>
      <script type="text/javascript" src="http://mymachine/donald/
      ui.pack.js"></script>

      All works correctly. But i don't think they are dependant to each other, or not ?

      The other js i'm using are dependant to these so i need to load them first.

      If i try to load each of them alternate
      <script type="text/javascript" src="http://mymachine/donald/framework.pack.js"></script>
      <script type="text/javascript" src="http://mymachine/donald/ui.pack.js"></script>
      <script type="text/javascript" src="http://mymachine/donald/framework.pack.js"></script>
      <script type="text/javascript" src="http://mymachine/donald/
      ui.pack.js"></script>

      I get the same errors as before.



      I don't know if this section is correct but i don't know where i should ask for.


      Thanks for any help