So I can either contribute a markup renderer that can access the
renderSupport object OR inject a service that can in turn inject
ComponentSource
but I can't create/contribute/inject my own object/service/etc that has
access to all of RenderSupport, ComponentResources, ComponentSource and
PageRenderQueue
or at least I can't piece together the snippets of information i can
find to achieve this...
I need an object, populated with all of RenderSupport,
ComponentResources, ComponentSource and PageRenderQueue
accessible/injectable from every component (and page) whether partial or
full rendering. Is this at all possible?
Thanks, Paul.
Thiago H. de Paula Figueiredo wrote:
On Fri, 06 Aug 2010 23:11:52 -0300, Paul Stanton <p...@mapshed.com.au>
wrote:
That doesn't seem to work Thiago, or maybe I'm missing something:
public class TapestryExtensionImpl implements TapestryExtension
{
@Inject
private Environment environment;
@SuppressWarnings("unchecked")
public <T> T getPage(Class<T> pageClass)
{
ComponentSource componentSource =
environment.peekRequired(ComponentSource.class);
return (T) componentSource.getPage(pageClass);
}
}
ComponentSource is a service, not an environmental object, so you
should inject it directly.
As Christophe said, you can learn a lot of Tapestry by looking at the
TapestryModule source. That's how I got most of my Tapestry knowledge.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org