...
Only component classes should go in the Tapestry-controlled packages (pages
, components
, mixins
and base
under your application's root package). By convention, simple data objects should go in a data
package, and Hibernate entities should go in an entities
package.
Why do I get "Service 'MetaWorker' is configured using org.apache.tapestry5.ioc.MappedConfiguration, not org.apache.tapestry5.ioc.OrderedConfiguration" ... I'm not even contributing to MetaWorker?
Service MetaWorker extends ComponentClassTransformWorker2 ... because of how Tapestry's rules for contributions work, a method that contributes values to the ComponentClassTransformWorker service (which uses an OrderedConfiguration) will also be invoked to contribute to MetaWorker (which uses a MappedConfiguration). This can happen because of code such as:
Code Block |
---|
@Contribute(ComponentClassTransformWorker2.class)
public void installWorker(OrderedConfiguration<ComponentClassTransformWorker2> configuration) {
configuration.addInstance("EnableAnalytics", EnableAnalyticsWorker.class);
}
|
The solution is to limit the contribution just to the main ComponentClassTransformWorker service; a glance at the source for the service provides the answer:
Code Block |
---|
@Marker(Primary.class)
public ComponentClassTransformWorker2 buildComponentClassTransformWorker(List<ComponentClassTransformWorker2> configuration) {
return chainBuilder.build(ComponentClassTransformWorker2.class, configuration);
}
|
The ComponentClassTransformWorker uses the @Primary marker annotation; adding @Primary to the installWorker() method (in the above example) causes Tapestry to only invoke the method when contributing the ComponentClassTransformWorker, but not MetaWorker.
I get an error about "Page did not generate any markup when rendered." but I have a template, what happened?
...