On May 27, 2011, at 8:19 AM, Jan Haderka wrote:
> Hi Mark, > > On May 26, 2011, at 9:59 PM, Mark Halvorson wrote: > >> Question 1: >> >> I have two groovy scripts: >> >> api.model.Utility >> >> and >> >> api.model.apiDispactcher >> >> Inside apiDispatcher I have a routine that creates the Utility object: >> >> def util = new Utility() >> >> And calls a method on the Utility class. >> >> What I have found is that with that line in my code when I try to save >> api.model.apiDispatcher I get the error: >> >> "api.model.apiDispatcher should declare at least one class named >> apiDispatcher" > > I could track this one to > http://nexus.magnolia-cms.com/content/sites/magnolia.public.sites/modules/magnolia-module-groovy/1.1/magnolia-module-groovy/xref/info/magnolia/module/groovy/support/classes/MgnlGroovyClassLoader.html#233 > > As for the reason ... I "think" you are saving the script with the dots in > name, while Magnolia is looking for a package structure (i.e. for file > "apiDispatcher" in folder "model" in folder "api") That's correct. I would only suggest that if it is just groovy scripts you might want to tick the "Is a script?" checkbox, so that those checks on source are skipped. HTH, Federico ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
