Thanks! I looked into this and it wasn't too hard to figure out (as usual).
But in the end, i realized that it's a silly idea that only leads to other people having even more problems finding out what's going on in my code :) I can afford the typing required to include the javascript companion for my components :) On Fri, Feb 5, 2010 at 10:05 AM, cordenier christophe < [email protected]> wrote: > Hi, > > Your worker should use AssetSource and RenderSupport to automatically add > the js file if it exists, have a look at IncludeJavaScriptLibraryWorker > source file to see an exemple of script injection. > BTW in my experience, the multiplication of JS/CSS files is not really > appreciated by IE, so if you decide to work this way i advise you to also > turn on (default) combine-scripts feature. > > Regards, > Christophe Cordenier > > Developer of wooki @wookicentral.com > > 2010/2/5 Inge Solvoll <[email protected]> > > > Hi! > > > > I find myself repeating myself. Quite often when creating a page or a > > component, I create a companion javascript file with the same name as my > > component class. I got the idea today to try to create some kind of > worker > > or service that automatically includes a javascript that has the same > name > > as the component class and exists in the same folder on the classpath. > > After > > all, this is how the tml and properties files are hooked up to component > > classes, so why not do it for javascript as well? > > > > Any pointers to get me started? :) > > > > > > -- > Regards, > Christophe Cordenier. > > Developer of wooki @wookicentral.com >
