Search code examples
dojojavascriptspring-roo

Including dojo/dom library to Spring Roo


How is it possible to include and use the dojo/dom library in Spring roo.

This:

 <script type="text/javascript">
                      dojo.require('dojo/dom');
                      dojo.ready(function remAttr(){
                          dojo.removeAttr('theId', 'value');
                        }
                     );
</script>

results in:

"NetworkError: 404 Introuvable - http://localhost:8131/suivitrc/resources/dojo/dom.js"
dom.js
Could not load 'dojo/dom'; last tried '../dojo/dom.js'

Can anyone please help?


Solution

  • I think the version of dojo in roo is currently less than 1.7. This means you can remove the following line from your code because the remoteAttr function is part of dojo.js:

    dojo.require('dojo/dom');
    

    see here: http://dojotoolkit.org/reference-guide/1.7/dojo/removeAttr.html