FAQ page
http://people.apache.org/~uli/tapestry-site/frequently-asked-questions.html#FrequentlyAskedQuestions-HowdoIstoremypageclassesinadifferentpackage
?
Question: How do I store my page classes in a different package?
Answer: you can't

The statement there is that pages must be in root-ackage.pages subpackage
and subpackages under it...

it is true for a single root-package, but by adding a library mapping you
can have multiple root-packages

if you stop using src/main/webapp as place for page templates and use
src/main/resources
same like you use for components then the following is done easy:

public static void
contributeComponentClassResolver(Configuration<LibraryMapping>
configuration){
        configuration.add(new LibraryMapping("", "my.app.tasks"));
        configuration.add(new LibraryMapping("", "my.app.chat"));
}

you are still bound to have pages under root-package.pages for each mapping

.... this only a partial explanation ... a more detailed one should be
used...

I used this to separate my app into few sub-modules, each having own pages,
and to be able to add/remove module from production server by just omitting,
certain module's jar.


in the end the faq item mentioned could rephrased:
short answer: you can't ....original explanation...
long answer: you can but there are limitations, click here for a detailed
description on using library mappings.

Davor Hrg

Reply via email to