Thanks - that gets the service instantiated. However, I discover
that my service doesn't get initialized the same way that the regular
HomeService does.
Without my implementation xml in place the standard HomeService gets
initialized (calls to setResponseRenderer() and setPageName()) when
it is referenced in
tapestry.services.impl.ServiceMapImpl.resolveEngineService(). But
when I've got my MyHomeService in place that same routine does not
result in the calls to setResponseRenderer and setPageName - which
basically makes it impossible to work. Huh? I would have thought
that the service would have been treated the same - is there more
configuration I have to set up somewhere?
Thanks,
Kevin Whitley
podtech.net
On Nov 3, 2006, at 11:03 AM, James Carman wrote:
Try this:
<implementation service-id="tapestry.services.Home">
<invoke-factory>
<construct class="net.podtech.ui.tapestry.MyHomeService"/>
</invoke-factory>
</implementation>
On 11/3/06, Kevin Whitley <[EMAIL PROTECTED]> wrote:
In Tapestry 4.0 I'd like to override the HomeService (varying the
home page depending on the user - unfortunately not as simple as
merely changing the home page name). Javadoc comments in HomeService
make it sound like this is expected and trivial.
I created a test class to try this out - MyHomeService. And then in
my hivemodule.xml file I have:
<module id="podtech" version="1.0.0"
package="net.podtech.ui.tapestry.Xx">
<implementation service-id="home">
<create-instance
class="net.podtech.ui.tapestry.MyHomeService"/>
</implementation>
</module>
But when HiveMind is initializing I get complaints that "Module
podtech contributed to unknown service point podtech.home". On a
guess I tried changing the service-id to "tapestry.home" but I got
the same error ("unknown service point tapestry.home").
I'm basing the service-override on the HiveMind "overriding a service
doc" at http://hivemind.apache.org/override.html. Is this the right
approach? hivemodule.xml the right place? What is the service-id
that is needed? Do I need to have this in a particular module? (Is
there some way to ask HiveMind for an enumeration of legal service
points?)
By the way, once I get my HomeService hooked in, I assume that
overriding the getPageName() method will be all I need to do to
redirect to different pages?
Thanks for any advice,
Kevin Whitley
Podtech.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]