3 Replies Latest reply on Nov 26, 2010 2:26 PM by funkybreizh

    GateIn & Spring-JS

    funkybreizh

      Hello,

       

      Is there a way to declare dependancies to a javascript librairy embedded in a jar file in the gatein-resources.xml?

       

      I want to use Spring-JS from Spring Webflow and they say to declare like this.

       

      <script type="text/javascript" src="<c:url value="/resources/dojo/dojo.js" />"> </script>
      <script type="text/javascript" src="<c:url value="/resources/spring/Spring.js" />"> </script>
      <script type="text/javascript" src="<c:url value="/resources/spring/Spring-Dojo.js" />"> </script>
      
      

      I want to do this in the gatein-resources.xml but when I try something like this :

       

       

      <javascript>
           <param>
                <js-module>Spring-Dojo</js-module>
                <js-path>/resources/spring/Spring-Dojo.js</js-path>
           </param>
      </javascript>
      

       

      It doesn't work, gateIn can't find librairies.

       

      Any solution?

        • 1. Re: GateIn & Spring-JS
          kien_nguyen

          Did Spring-Dojo.js file put into '/resources/spring' folder of your project path? Your Spring-Dojo.js and gatein-resources.xml files must be located in the same project.

          • 2. Re: GateIn & Spring-JS
            funkybreizh

            Yes it was, but now it works!!! I don't know why!? I didn't change anything

            • 3. Re: GateIn & Spring-JS
              funkybreizh

              Mhhh, it's not yet finished. I used to run GateIn inside my Eclipse Environnement and it worked.

               

              I explain my problem,

               

              Spring-JS and Spring-Dojo are in Jar files which are in the classpath of my project. The javascripts files are inside these Jar. When I "declare" them in gatein-resources.xml and run via Eclipse it was working. But now, I want to run the portal via "./gatein run" and I saw that GateIn took all my JS files into one big "merge.js" and so my Javascrpit files which are inside jar files can't be find anymore and add to this merge file. It doesn't work anymore, any solution?

               

              Thanks