0 Replies Latest reply on Mar 18, 2014 11:47 AM by Steven Lennon

    jsf portlet javascript problems

    Steven Lennon Newbie

      Hi,

       

      I am trying to write a JSF portlet  that uses JavaScript extensively: OpenLayers, JQuery JQueryToolbar, JSTree, bootstrap.  I have one xhtml file and one JavaScript file and have defined my gatein-resources.xml modules like so:

       

         

          <module>

         <name>jstree</name>

            <script>

              <path>/thirdparty/jstree/jstree.js</path>

            </script>

            <depends>

              <module>jquery</module>

              <as>$</as>

            </depends>

          </module>

         

          <module>

         <name>jqtoolbar</name>

            <script>

              <path>/thirdparty/toolbar/jquery.toolbar.min.js</path>

            </script>

            <depends>

              <module>jquery</module>

              <as>$</as>

            </depends>

          </module>

         

          <module>

         <name>openlayers</name>

            <script>

              <path>/thirdparty/OpenLayers/OpenLayers.js</path>

            </script>

            <depends>

              <module>jquery</module>

              <as>$</as>

            </depends>

          </module>

         

        <portlet>

          <name>LandMap</name>

          <module>

            <script>

              <path>/landmap.js</path>

            </script>

            <depends>

              <module>jquery</module>

              <as>$</as>

            </depends>

            <depends>

              <module>bootstrap</module>

            </depends>

            <depends>

              <module>jstree</module>

            </depends>

            <depends>

              <module>jqtoolbar</module>

            </depends>

            <depends>

              <module>openlayers</module>

            </depends>

          </module>   

        </portlet>

       

       

      My landmap.js sits at the top level of my resources folder and the code is wrapped like:

       

      (function($) {

       

      // my code

       

      })($)

       

       

       

      However my code in landmap.js is never executed, and I can't see any of the js scripts in firebug/developer tools, is there anything obviously wrong with this setup?

       

       

      cheers,

      Steven