Dear fellow Tap-fans, I'm looking to implement a very simple, re-usable security library for my web applications. The path I'm going down is one that seems to be common (and embraced by Howard himself) - extending BasePage and implementing the PageValidateListener to perform authorization checks within (call this the BaseProtectedPage).
I'm a little bit stuck with a small detail though: part of my library design is a service that should be accessible (and configurable) through the HiveMind registry (e.g. a "PageProtectionService") which needs to be injected into the BaseProtectedPage as part of the authorization mechanism. Is there a clean way to inject this service into my BaseProtectedPage? Ideally, I'd like to just be able to create a .page file corresponding to BaseProtectedPage and specify service injections through that way, but as far as I know, this doesn't work (as far as I'm aware, Tapestry only listens to the page/component specification files of the lowest sub-class - doesn't process any superclass page/component specs). Thus the only alternative I have is to resolve the service programmatically through the HiveMind registry. I don't mind doing this, but what's the cleanest way to access the HiveMind registry held by Tapestry? Do I have to create my own copy of a Registry to be used within every instance of BaseProtectedPage? Thanks for any help and guidance! =] - Chris