On Jun 11, 2010, at 3:31 PM, Manuel Sugawara wrote:

> On Fri, Jun 11, 2010 at 4:35 PM, Josh Canfield <joshcanfi...@gmail.com>wrote:
> 
>> Read the bit about template inheritance at the bottom of this page:
>> http://tapestry.apache.org/tapestry5.1/guide/templates.html
>> Although I agree with the sentiment in that page about not overusing
>> these features and preferring composition over inheritance.
>> 
>> If you map your PlatformModule to "core" then your components and
>> pages can be accessed without a prefix. Your page classes would live
>> in x.y.platform.pages.
>> 
> 
> Just be careful that this might not work in the upcoming tapestry release.
> See this 
> link<http://old.nabble.com/Re:-Libarary-"core"-mapping-not-working-in-5.2.0-SNAPSHOT-p28758883.html>
> .
> 
> Regards,<http://old.nabble.com/Re:-Libarary-"core"-mapping-not-working-in-5.2.0-SNAPSHOT-p28758883.html>
> Manuel.


   ARRGH! I'm using 5.2.0-SNAPSHOT.

   Hmmm... And Howard kind of blew you off. 

   I think Howard is wrong in this case, I think I can see reasons why you 
might want to supplant core things, like change the GridPager or something.  

   But looking at the error (which seems to have nothing to do with supplanting 
core but rather a detail of LibraryMappings), what this seems to be saying is 
that it wants a common base package of at least two elements. 

   So in PlatformModule, I would need to do:

public static void
contributeComponentClassResolver(Configuration<LibraryMapping>
configuration) {
       configuration.add(new LibraryMapping("paceap", "com.paceap.platform"));
}

 Then in AppModule, I would need to do:

public static void
contributeComponentClassResolver(Configuration<LibraryMapping>
configuration) {
       configuration.add(new LibraryMapping("paceap", "com.paceap.cust"));
}

 Then tapestry will be happy because it can reduce that to "com.paceap", which 
is two terms. I'll have to change every component reference to have "paceap" in 
front, i.e.: <t:paceap.foo />

 Though if its going to reduce these to a base package, one wonders if it would 
resolve paceap.foo to a class in com.paceap.not.included.in.the.library.mapping 
as well, which definitely seems like a bug!

 Pierce




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to