Hi.
I am fairly new to Tapestry 5 and I have a few questions.
* Is there a way to declare a pagename alias for the URL generation e.g.
"article" for ArticlePage class or do I need to to do URL rewriting like
described here :
http://tapestry.apache.org/tapestry5.1/guide/url-rewriting.html
I'd like to keep Page-suffixes for my Page class names, but I don't want
to see them in the URLs. Without the Page-suffix there would be
simplename clashes with domain types.
* What is the preferred way to do Tapestry / Guice integration. While
the Tapestry IoC seems quite powerful, I got used to Guice and would
like to continue using it in my Tapestry projects.
I managed to wire up something like this which pulls
ImplementedBy-annotated services from a Guice module. Have you been
successful with something more general?
private static Injector injector = Guice.createInjector(new
BlogModule());
public static void
contributeMasterObjectProvider(OrderedConfiguration<ObjectProvider>
configuration) {
configuration.add("Guice", new ObjectProvider() {
@SuppressWarnings("unchecked")
@Override
public <T> T provide(Class<T> objectType, AnnotationProvider
annotationProvider, ObjectLocator locator) {
ImplementedBy implementedBy =
objectType.getAnnotation(ImplementedBy.class);
if (implementedBy != null){
return (T) injector.getInstance(implementedBy.value());
} else {
return null;
}
}
});
}
Best regards,
Timo.
--
Timo Westkämper <timo.westkam...@mysema.com>
Mysema Ltd, Vilhonkatu 5 A, 00100 Helsinki, Finland
Mob. +358 (0)40 591 2172
Internet: http://www.mysema.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org