On Dec 7, 2009, at 4:37 PM, Piero Sartini wrote:

Do I then create multiple filters in the web.xml for each sub-app? Or
just one for /*? Seems to require multiple filter definitions, but
then other stuff fails.

Only one filter!

Yes, that seemed obvious after I figured out the multiple IoC issue.

Further, it's claiming I have multiple IoCs. Removing the extra
filters from the web.xml eliminates the multiple IoC issue, but
doesn't load my sub-apps. Despite the @SubModule, they don't seem to
be loading.

You need to annotate your main AppModule which is configured in the web-
context with @SubModule({WebAppModule1.class, WebAppModule2.class})

Somehow, I mis-read that. I was annotating the sub-modules. I don't think it's actually possible to really do what I wanted.

Tapestry IoC will then load the two given classes as new Modules. Then, in
your new submodules, you do this:

   public static void
contributeComponentClassResolver(Configuration<LibraryMapping> configuration)
{
       configuration.add(new LibraryMapping("moduleId",
"your.root.package"));
   }

That was the missing part. I googled for an hour and never came across that.

Ultimately, this wasn't really what I wanted exactly, since I have to still rename all pages and components in the .tml files to be preceded by the new submodule. I'll debate that.

Also see here for more info:
http://tapestry.apache.org/tapestry5.1/tapestry-ioc/autoload.html


        Piero



Norman Franke
Answering Service for Directors, Inc.
www.myasd.com

Reply via email to