|
Hi,
I started having an issue and can't find what changed/caused it. The symptom is a 404 on a plugin's js files. When I dig further, I saw that the js files are in the plugin/myplugin/js directory, but are not found. A workaround is to copy them in the war root directory (/js)... Does anybody know how to troubleshoot this, or know of any known bug with grails 1.3.5? Thanks, Olivier |
|
Hi again,
Any insight on this? Things I should try? Debug/log flags/options?? Thanks, Olivier On Wed, Feb 2, 2011 at 9:15 PM, Olivier Gourment <[hidden email]> wrote: Hi, |
|
Hi Olivier,
How are you resolving your JS resource in your gsp ? Seb
On Thu, Feb 3, 2011 at 10:10 PM, Olivier Gourment <[hidden email]> wrote: Hi again, |
|
Hello Oliver,
If you are using the grails taglib to include your javascript files, there is an option to specify the name of the plugin it is installed in. For instance, if your plugin's name was "foo", and
had a javascript file named "bar.js" that lives in foo/web-app/js directory, then: <g:javascript plugin="foo" src="bar.js"/> That one got me too once upon a time. ;-)
Another tip: If you need to load something that is in the web-app directory of a plugin that isn't where it should be, like a CSS file that is in the javascript directory, you can use the resource tag like this:
<link rel="stylesheet" type="text/css" href="${resource(plugin: 'richui', dir: 'js/yui/reset-fonts-grids', file: 'reset-fonts-grids.css')}"/>
Hope that helps, --scottie On Thu, Feb 3, 2011 at 4:40 PM, Sébastien Blanc <[hidden email]> wrote: Hi Olivier, |
|
Hi Scott,
You were right on! I added plugin='my-plugin' to all my g:javascript and $resource() (for the css files) and the problem was solved. Not sure why I didn't have the problem before... Now, strangely enough, IntelliJ has started complaining. Apparently, if thinks you should only use "plugin" to include resources from *other* plugins, NOT the plugin you are developing! If someone from IntelliJ is reading this.. Cheers, Olivier On Thu, Feb 3, 2011 at 5:01 PM, scott bortman <[hidden email]> wrote: Hello Oliver, |
| Powered by Nabble | Edit this page |
